diff options
author | Steve Glendinning <steve.glendinning@smsc.com> | 2009-03-18 23:37:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-18 23:37:18 -0700 |
commit | 44c1d6f99d4c86638bffabf0b7a232d0fe7ae574 (patch) | |
tree | 6904225f0189f7d5229dd529f64de71c97c55e7b /lib/Kconfig.kgdb | |
parent | 2e2a6a9f710255c87cef670fb71fc9e74bef1da2 (diff) |
smsc911x: reset last known duplex and carrier on open
smsc911x_phy_adjust_link is called periodically by the phy layer (as
it's run in polling mode), and it only updates the hardware when it sees
a change in duplex or carrier. This patch clears the last known values
every time the interface is brought up, instead of only when the module
is loaded.
Without this patch the adjust_link function never updates the hardware
after an ifconfig down; ifconfig up. On a full duplex link this causes
the tx error counter to increment, even though packets are correctly
transmitted, as the default MAC_CR register setting is for half duplex.
The tx errors are "no carrier" errors, which should be ignored in
full-duplex mode. When MAC_CR is set to "full duplex" mode they are
correctly ignored by the hardware.
Note that even with this patch the tx error counter can increment if
packets are transmitted between "ifconfig up" and the first phy poll
interval. An improved solution would use the phy interrupt with phylib,
but I haven't managed to make this work 100% robustly yet.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/Kconfig.kgdb')
0 files changed, 0 insertions, 0 deletions