OSDN Git Service

[PATCH] netdrv: b44 driver must ignore carrier lost errors
authorWilly TARREAU <willy@pcw.(none)>
Sun, 7 May 2006 21:38:01 +0000 (23:38 +0200)
committerWilly TARREAU <willy@pcw.(none)>
Sun, 7 May 2006 21:38:01 +0000 (23:38 +0200)
some (?) hardware seems to be buggy and is reporting bogus carrier lost
values. Both reference implementations from Broadcom indicate that this
counter is not reliable and therefore ignore it. We should do the same.
"Fixes" the carrier lost problem i've seen.

Signed-off-by: Florian Schirmer <jolt@tuxbox.org>
Note: This patch was merged in 2.6 in early 2005.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

drivers/net/b44.c

index 0c489a9..081e506 100644 (file)
@@ -1320,7 +1320,10 @@ static struct net_device_stats *b44_get_stats(struct net_device *dev)
                                   hwstat->rx_symbol_errs);
 
        nstat->tx_aborted_errors = hwstat->tx_underruns;
+#if 0
+       /* Carrier lost counter seems to be broken for some devices */
        nstat->tx_carrier_errors = hwstat->tx_carrier_lost;
+#endif
 
        return nstat;
 }