Most recent kernel where this bug did not occur: n/a - occured since 2.6.13, first kernel on machine Distribution: Gentoo Hardware Environment: amd64 Software Environment: Gentoo/Linux Problem Description: via velocity always thinks cable is plugged in according to netplug and/or ifplugd Steps to reproduce: Install Gentoo emerge baselayout-1.12.1 emerge netplug remove network cable /etc/init.d/net.eth0 restart examine log to see netplug claiming eth0 has a cable inserted
Can you send a complete dmesg wherein a mark would be added after each of the relevant command ? Thanks in advance. -- Ueimor
Created attachment 8359 [details] syslog as requested I've marked *** PROBLEM HERE *** when the device thinks there's a cable in.
Created attachment 8369 [details] minimal link detection Can you give the patch above a try and report if the behavior is changed (with/withou cable) ? Don't hold your breath, it's just a try. Please send updated dmesg. -- Ueimor
Created attachment 8376 [details] almost working syslog Well, the patch nearly fixes it :) Pull cable out, ifplugd and netplug respond. Put cable in, ifplugd and netplug respond. However, the last error remaining is that both ifplugd and netplug think that the interface has a link when the module is first loaded. Maybe a call to check link status when the module loads is needed?
Created attachment 8380 [details] fix link detection at start-up. Try #2 Quick feedback. Cool. Is this patch better ? -- Ueimor
Created attachment 8381 [details] Working link detection OK, I was wrong with my initial report. The link detection *was* working - it just wasn't informing the system about it! This patch is much simpler and more importantly it works 100% on my box now. Thanks :)
@@ -799,9 +798,6 @@ if (ret < 0) goto err_iounmap; - if (velocity_get_link(dev)) - netif_carrier_off(dev); - velocity_print_info(vptr); pci_set_drvdata(pdev, dev); This part does not seem to match 2.6.17: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;h=2eb6b5f9ba0df647bd760b43abcec48216241df6;hb=0dad31d2da706ef114bc5c21123123be2f405d5b;f=drivers/net/via-velocity.c
Created attachment 8382 [details] Working link dection OK, my bad. Patch was reversed by mistake. This should apply clean.
Patch has been merged into mainline. -- Ueimor