summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2005-11-23 11:49:51 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2005-12-01 07:25:27 (GMT)
commitdf86550602f320d28fdaeb577c25f9821525bfa0 (patch)
treebabe84aafa5f1dda0849d87954f76d6b844e1d28 /drivers/net
parent0b85c0ebde63a41d57b6214977ac2752bf5a086f (diff)
downloadlinux-fsl-qoriq-df86550602f320d28fdaeb577c25f9821525bfa0.tar.xz
[PATCH] pm3386: add hook for setting carrier
Add a pm3386 hook for disabling/enabling the SERDES carrier, so that we can disable it when the interface is administratively downed, and enable it when it is upped. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ixp2000/pm3386.c5
-rw-r--r--drivers/net/ixp2000/pm3386.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ixp2000/pm3386.c b/drivers/net/ixp2000/pm3386.c
index 870b486..ec70b1d 100644
--- a/drivers/net/ixp2000/pm3386.c
+++ b/drivers/net/ixp2000/pm3386.c
@@ -250,6 +250,11 @@ void pm3386_get_stats(int port, struct net_device_stats *stats)
/* @@@ Add other stats. */
}
+void pm3386_set_carrier(int port, int state)
+{
+ pm3386_port_reg_write(port, 0x703, 0x10, state ? 0x1001 : 0x0000);
+}
+
int pm3386_is_link_up(int port)
{
u16 temp;
diff --git a/drivers/net/ixp2000/pm3386.h b/drivers/net/ixp2000/pm3386.h
index 117f50a..fe92bb0 100644
--- a/drivers/net/ixp2000/pm3386.h
+++ b/drivers/net/ixp2000/pm3386.h
@@ -17,6 +17,7 @@ void pm3386_init_port(int port);
void pm3386_get_mac(int port, u8 *mac);
void pm3386_set_mac(int port, u8 *mac);
void pm3386_get_stats(int port, struct net_device_stats *stats);
+void pm3386_set_carrier(int port, int state);
int pm3386_is_link_up(int port);
void pm3386_enable_rx(int port);
void pm3386_disable_rx(int port);