Most recent kernel where this bug did not occur: Don't know. Only began checking on 2.6.17, and it didn't work there. Distribution: Linux from Scratch Hardware Environment: PIII 500. $ lspci 00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03) 00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03) 00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02) 00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) 00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01) 00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02) 00:0c.0 Multimedia audio controller: Yamaha Corporation YMF-724F [DS-1 Audio Controller] (rev 03) 00:0e.0 USB Controller: NEC Corporation USB (rev 43) 00:0e.1 USB Controller: NEC Corporation USB (rev 43) 00:0e.2 USB Controller: NEC Corporation USB 2.0 (rev 04) 00:0f.0 Ethernet controller: D-Link System Inc DL10050 Sundance Ethernet (rev 12) 00:10.0 Serial controller: 3Com Corp, Modem Division 56K FaxModem Model 5610 (rev 01) 01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 PRO] (rev 01) 01:00.1 Display controller: ATI Technologies Inc RV280 [Radeon 9200 PRO] (Secondary) (rev 01) Software Environment: Linux silky 2.6.18.1-1 #1 PREEMPT Wed Oct 18 18:04:39 PDT 2006 i686 pentium3 i386 GNU/Linux Gnu C 4.0.3 Gnu make 3.80 binutils 2.16.1 util-linux 2.12r mount 2.12r module-init-tools 3.2.2 e2fsprogs 1.38 Linux C Library 2.3.6 Dynamic linker (ldd) 2.3.6 Linux C++ Library 6.0.7 Procps 3.2.6 Net-tools 1.60 Kbd 1.12 Sh-utils 5.94 udev 096 Modules Loaded radeon drm ipv6 ipt_REJECT xt_tcpudp iptable_nat ip_nat ipt_LOG xt_state ip_conntrack_ftp ip_conntrack nfnetlink iptable_filter ip_tables x_tables binfmt_misc nls_iso8859_1 nls_cp437 vfat fat joydev usbhid usblp snd_ymfpci gameport snd_ac97_codec snd_ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_opl3_lib snd_timer snd_hwdep snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device evdev snd sundance intel_agp soundcore agpgart ehci_hcd mii uhci_hcd ohci_hcd dm_crypt dm_mod fuse Problem Description: Using the D-Link 550-TX with the sundance driver fails to change the carrier status when plugging/unplugging network cable. Some userspace stats: # cat /sys/class/net/eth0/carrier 1 # ip link show eth0 2: eth0: <BROADCAST,MULTICAST,NOTRAILERS,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:05:5d:e5:ae:08 brd ff:ff:ff:ff:ff:ff # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:05:5D:E5:AE:08 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:44 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:608 (608.0 b) TX bytes:7777 (7.5 Kb) Interrupt:10 Base address:0x1000 # grep . /sys/class/net/eth0/* /sys/class/net/eth0/address:00:05:5d:e5:ae:08 /sys/class/net/eth0/addr_len:6 /sys/class/net/eth0/broadcast:ff:ff:ff:ff:ff:ff /sys/class/net/eth0/carrier:1 /sys/class/net/eth0/dormant:0 /sys/class/net/eth0/features:0x0 /sys/class/net/eth0/flags:0x1023 /sys/class/net/eth0/ifindex:2 /sys/class/net/eth0/iflink:2 /sys/class/net/eth0/link_mode:0 /sys/class/net/eth0/mtu:1500 /sys/class/net/eth0/operstate:unknown /sys/class/net/eth0/tx_queue_len:1000 /sys/class/net/eth0/type:1 grep: /sys/class/net/eth0/uevent: Permission denied /sys/class/net/eth0/weight:0 These are all exactly the same when the cable is unplugged. Steps to reproduce: Bring up network interface, unplug cable. Carrier status doesn't change.
Created attachment 9452 [details] dmesg with loglevel=7 and sundance.debug=7 on 2.6.19-rc5
Has it been any progress on this, have you tested with 2.6.22+? Thanks.
I have asked Jesse Huang <jesse@icplus.com.tw> if he can take a look at this report.
Status is the same on 2.6.22.1.
There were relevant fixes to sundance since. Dan can you please update/retest with recent kernel. Thanks.
Great. How recent? 2.6.24.x or 2.6.25-rcx?
I'd say the latest (.25-rc), or the newest git. I would try the latest stable too, if 2.6.25.XX worked.
Created attachment 15609 [details] Set carrier status on link changed events Turns out this was pretty easy to enable. Copied some code from dl2k to check the MII link status on link change events and then call netif_carrier_on/off. Patch is against Linus' git. It could be more useful, but this is enough to get the change reported to userspace.
Should I send this patch to linux-net?
Please email it to netdev@vger.kernel.org and cc myself and Jeff Garzik <jeff@garzik.org>, thanks.