Commit 1764f150 authored by Dan Williams's avatar Dan Williams Committed by Jeff Garzik

usb-net/pegasus: simplify carrier detection

Simplify pegasus carrier detection; rely only on the periodic MII
polling.  Reverts pieces of c43c49bd.
Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent f0054636
...@@ -847,16 +847,6 @@ static void intr_callback(struct urb *urb) ...@@ -847,16 +847,6 @@ static void intr_callback(struct urb *urb)
* d[0].NO_CARRIER kicks in only with failed TX. * d[0].NO_CARRIER kicks in only with failed TX.
* ... so monitoring with MII may be safest. * ... so monitoring with MII may be safest.
*/ */
if (pegasus->features & TRUST_LINK_STATUS) {
if (d[5] & LINK_STATUS)
netif_carrier_on(net);
else
netif_carrier_off(net);
} else {
/* Never set carrier _on_ based on ! NO_CARRIER */
if (d[0] & NO_CARRIER)
netif_carrier_off(net);
}
/* bytes 3-4 == rx_lostpkt, reg 2E/2F */ /* bytes 3-4 == rx_lostpkt, reg 2E/2F */
pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4]; pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4];
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#define PEGASUS_II 0x80000000 #define PEGASUS_II 0x80000000
#define HAS_HOME_PNA 0x40000000 #define HAS_HOME_PNA 0x40000000
#define TRUST_LINK_STATUS 0x20000000
#define PEGASUS_MTU 1536 #define PEGASUS_MTU 1536
#define RX_SKBS 4 #define RX_SKBS 4
...@@ -204,7 +203,7 @@ PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701, ...@@ -204,7 +203,7 @@ PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701,
PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100, PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
DEFAULT_GPIO_RESET | PEGASUS_II ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121, PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
DEFAULT_GPIO_RESET | PEGASUS_II | TRUST_LINK_STATUS ) DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986, PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
DEFAULT_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987, PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment