diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2010-09-27 07:41:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-27 18:40:29 -0400 |
commit | 387a85628782690b56492dae4bbf544639f5d4a9 (patch) | |
tree | 537e5ecdeed9d630134cd25dffe502541db51c7d /drivers | |
parent | 824044c19552e8a5f345781ccd1c2062673a41ad (diff) |
de2104x: fix ethtool
When the interface is up, using ethtool breaks it because:
a) link is put down but media_timer interval is not shortened to NO_LINK
b) rxtx is stopped but not restarted
Also manual 10baseT-HD (and probably FD too - untested) mode does not work -
the link is forced up, packets are transmitted but nothing is received.
Changing CSR14 value to match documentation (not disabling link check) fixes this.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tulip/de2104x.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 9124c5c638d8..6888e3d41462 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -364,9 +364,9 @@ static u16 t21040_csr15[] = { 0, 0, 0x0006, 0x0000, 0x0000, }; | |||
364 | 364 | ||
365 | /* 21041 transceiver register settings: TP AUTO, BNC, AUI, TP, TP FD*/ | 365 | /* 21041 transceiver register settings: TP AUTO, BNC, AUI, TP, TP FD*/ |
366 | static u16 t21041_csr13[] = { 0xEF01, 0xEF09, 0xEF09, 0xEF01, 0xEF09, }; | 366 | static u16 t21041_csr13[] = { 0xEF01, 0xEF09, 0xEF09, 0xEF01, 0xEF09, }; |
367 | static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x6F3F, 0x6F3D, }; | 367 | static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, }; |
368 | /* If on-chip autonegotiation is broken, use half-duplex (FF3F) instead */ | 368 | /* If on-chip autonegotiation is broken, use half-duplex (FF3F) instead */ |
369 | static u16 t21041_csr14_brk[] = { 0xFF3F, 0xF7FD, 0xF7FD, 0x6F3F, 0x6F3D, }; | 369 | static u16 t21041_csr14_brk[] = { 0xFF3F, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, }; |
370 | static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; | 370 | static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; |
371 | 371 | ||
372 | 372 | ||
@@ -1596,12 +1596,15 @@ static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd) | |||
1596 | return 0; /* nothing to change */ | 1596 | return 0; /* nothing to change */ |
1597 | 1597 | ||
1598 | de_link_down(de); | 1598 | de_link_down(de); |
1599 | mod_timer(&de->media_timer, jiffies + DE_TIMER_NO_LINK); | ||
1599 | de_stop_rxtx(de); | 1600 | de_stop_rxtx(de); |
1600 | 1601 | ||
1601 | de->media_type = new_media; | 1602 | de->media_type = new_media; |
1602 | de->media_lock = media_lock; | 1603 | de->media_lock = media_lock; |
1603 | de->media_advertise = ecmd->advertising; | 1604 | de->media_advertise = ecmd->advertising; |
1604 | de_set_media(de); | 1605 | de_set_media(de); |
1606 | if (netif_running(de->dev)) | ||
1607 | de_start_rxtx(de); | ||
1605 | 1608 | ||
1606 | return 0; | 1609 | return 0; |
1607 | } | 1610 | } |