Bug 6711 - via velocity reports incorrect cable in/out status
Summary: via velocity reports incorrect cable in/out status
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Francois Romieu
Depends on:
Reported: 2006-06-18 15:51 UTC by Roy Marples
Modified: 2006-06-23 09:56 UTC (History)
0 users

See Also:
Kernel Version: 2.6.17
Tree: Mainline
Regression: ---

syslog as requested (27.45 KB, text/plain)
2006-06-21 00:27 UTC, Roy Marples
minimal link detection (1.86 KB, patch)
2006-06-21 14:14 UTC, Francois Romieu
Details | Diff
almost working syslog (11.64 KB, text/plain)
2006-06-22 01:14 UTC, Roy Marples
fix link detection at start-up. Try #2 (2.85 KB, patch)
2006-06-22 13:33 UTC, Francois Romieu
Details | Diff
Working link detection (1.08 KB, patch)
2006-06-22 14:12 UTC, Roy Marples
Details | Diff
Working link dection (1.08 KB, patch)
2006-06-22 14:59 UTC, Roy Marples
Details | Diff

Description Roy Marples 2006-06-18 15:51:02 UTC
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
Comment 1 Francois Romieu 2006-06-20 14:56:41 UTC
Can you send a complete dmesg wherein a mark would be added after each of the
relevant command ?

Thanks in advance.

Comment 2 Roy Marples 2006-06-21 00:27:17 UTC
Created attachment 8359 [details]
syslog as requested

I've marked *** PROBLEM HERE *** when the device thinks there's a cable in.
Comment 3 Francois Romieu 2006-06-21 14:14:57 UTC
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.

Comment 4 Roy Marples 2006-06-22 01:14:48 UTC
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?
Comment 5 Francois Romieu 2006-06-22 13:33:04 UTC
Created attachment 8380 [details]
fix link detection at start-up. Try #2

Quick feedback. Cool.

Is this patch better ?

Comment 6 Roy Marples 2006-06-22 14:12:49 UTC
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 :)
Comment 7 Francois Romieu 2006-06-22 14:51:04 UTC
@@ -799,9 +798,6 @@
 	if (ret < 0)
 		goto err_iounmap;
-	if (velocity_get_link(dev))
-		netif_carrier_off(dev);
 	pci_set_drvdata(pdev, dev);

This part does not seem to match 2.6.17:
Comment 8 Roy Marples 2006-06-22 14:59:44 UTC
Created attachment 8382 [details]
Working link dection

OK, my bad. Patch was reversed by mistake.
This should apply clean.
Comment 9 Francois Romieu 2006-06-23 09:56:17 UTC
Patch has been merged into mainline.


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