Bug 8575 - 3c59x duplex configuration broken
Summary: 3c59x duplex configuration broken
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Steffen Klassert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-03 12:40 UTC by Martin Buck
Modified: 2007-09-18 00:25 UTC (History)
0 users

See Also:
Kernel Version: 2.6.21.3
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Martin Buck 2007-06-03 12:40:00 UTC
Most recent kernel where this bug did *NOT* occur: 2.4.32 (haven't tested other
2.6 kernels yet)
Distribution: Debian sarge
Hardware Environment: Dell Inspiron 8200 built-in 100-BaseT Ethernet card (3c905C)
Software Environment:
Problem Description:

When unplugging/plugging the Ethernet cable and ifconfig'ing up/down the network
interface in a certain order, full duplex is not configured correctly (it's
autonegotiated properly, but the driver doesn't configure the Ethernet
controller accordingly).

Steps to reproduce:

modprobe 3c59x
Plug in Ethernet cable
ifconfig up (-> chip set to full duplex, OK)
ifconfig down
Unplug cable
ifconfig up (-> chip set to half duplex, OK since we have no link)
Plug in cable (-> chip remains at half duplex, BUG)


I *think* this happens because of this: After the 1st ifconfig up,
mii_check_media() detects full-duplex and remembers this. After unplugging the
cable, mii_check_media() no longer checks the duplex status since there's no
link. After the 2nd ifconfig up, the driver sets half duplex due to the missing
link (based on the default duplex setting in the driver and not on the last
mii_check_media() results). When you then plug in the cable, mii_check_media()
doesn't report a change, since the last duplex status it has seen was full
duplex, so the driver doesn't set the chip to full duplex because it doesn't
know something changed.

You might think that this bug doesn't occur frequently due to special sequence
of events that needs to occur, but if you use ifplugd, this is exactly what
happens if you simply unplug and the plug in the cable.

BTW, isn't a 60 second interval a bit long to check for a lost link? Other
drivers (e.g. e100/eepro100) do this in 2 second intervals, which is much better
if you want to use ifplugd.
Comment 1 Steffen Klassert 2007-09-18 00:24:48 UTC
Fixed in 2.6.23-rc4.

git commit 373492d0bdc66680ee598fd5a63e1914631b2522

Note You need to log in before you can comment on or make changes to this bug.