]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] pm3386: add hook for setting carrier
authorLennert Buytenhek <buytenh@wantstofly.org>
Wed, 23 Nov 2005 11:49:51 +0000 (12:49 +0100)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 1 Dec 2005 07:25:27 +0000 (02:25 -0500)
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>
drivers/net/ixp2000/pm3386.c
drivers/net/ixp2000/pm3386.h

index 870b486f5deafb0789eb1a3e4007fcf84766672c..ec70b1d553e379053657c4a8b9f53c83309d0b37 100644 (file)
@@ -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;
index 117f50afcdeabee7d55132d95404bbdc67d47348..fe92bb056ac424c9279ca8501016d2f3452187c3 100644 (file)
@@ -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);