Bug 559329 - [sky2] initial carrier state is always on
Summary: [sky2] initial carrier state is always on
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.5
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: 5.5
Assignee: Andy Gospodarek
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-27 18:37 UTC by Dan Williams
Modified: 2014-06-29 23:01 UTC (History)
3 users (show)

Fixed In Version: kernel-2.6.18-189.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:09:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sky2-55-fix.patch (2.11 KB, patch)
2010-01-27 18:57 UTC, Andy Gospodarek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Dan Williams 2010-01-27 18:37:40 UTC
sky2 driver version 1.22
sky2 0000:02:00.0: v1.22 addr 0xf0000000 irq 185 Yukon-2 EC Ultra rev 2
sky2 eth0: addr 00:17:42:6c:99:06
sky2 eth0: enabling interface
sky2 eth0: ram buffer 0K

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8055 PCI-E Gigabit Ethernet Controller (rev 14)

02:00.0 0200: 11ab:4363 (rev 14)

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8055 PCI-E Gigabit Ethernet Controller (rev 14)
        Subsystem: Fujitsu Limited. Unknown device 139a
        Flags: bus master, fast devsel, latency 0, IRQ 130
        Memory at f0000000 (64-bit, non-prefetchable) [size=16K]
        I/O ports at 2000 [size=256]
        [virtual] Expansion ROM at 52000000 [disabled] [size=128K]
        Capabilities: [48] Power Management version 3
        Capabilities: [50] Vital Product Data
        Capabilities: [5c] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable+
        Capabilities: [e0] Express Legacy Endpoint IRQ 0
        Capabilities: [100] Advanced Error Reporting

Linux localhost.localdomain 2.6.18-185.el5 #1 SMP Thu Jan 14 16:43:14 EST 2010 i686 i686 i386 GNU/Linux


Issue happens on either bootup or with rmmod/modprobe.

Comment 1 Dan Williams 2010-01-27 18:42:53 UTC
Procedure:

(01:32:32 PM) dcbw: rmmod sky2
(01:32:37 PM) dcbw: <cable unplugged>
(01:32:40 PM) dcbw: modprobe sky2
(01:33:00 PM) dcbw: ifconfig eth0
(01:33:02 PM) dcbw: <device is down>
(01:33:05 PM) dcbw: ethtool eth0
(01:33:09 PM) dcbw: <link detected: yes>
(01:33:13 PM) dcbw: ifconfig eth0 up
(01:33:21 PM) dcbw: ethtool eth0
(01:33:25 PM) dcbw: <link detected: yes>
(01:33:33 PM) dcbw: <plug in cable>

If there is no cable plugged in, the interface should not report ethtool carrier state as "on".  Decision matrix goes like this:

1) if the driver knows it cannot support link detection with this hardware, carrier should always be "on"

2) otherwise, if the driver can do link detection when the device is !IFF_UP (becuase it keeps the PHY powered or something while the device is down) then the driver should report correct link state

3) if the driver cannot do link detection while the device is !IFF_UP (becuase the PHY is unpowered in this state or whatever) then it should report *no* carrier until the device is set IFF_UP, at which point carrier detection should be performed and the link state updated

Comment 2 Dan Williams 2010-01-27 18:52:31 UTC
Note that mii-tool *always* reports correct carrier state.  It's only ethtool that's wrong.  So the driver likely isn't hitting up netif_carrier_on/netif_carrier_off at the right times during module initialization?

Comment 3 Andy Gospodarek 2010-01-27 18:57:44 UTC
Created attachment 387155 [details]
sky2-55-fix.patch

You are correct.  Carrier state wasn't initialized to off in the probe routine.

It had already been noticed upstream, so I pulled the two patches that fixed link-state issues rather then reinventing the wheel.  Hopefully this will solve it.

If not, I'll dig up my sky2 (I think I've got one around) and see if I can fix it.

Comment 4 Dan Williams 2010-01-27 19:05:17 UTC
The patch appears to fix the initial carrier state issue for this machine.  Rebooting to ensure that's the case.

Comment 5 Dan Williams 2010-01-27 19:39:27 UTC
Definitely a regression, using 5.4's 2.6.18-164.el5 kernel the carrier state is 'off' at boot and modprobe.  But the attached patch fixes the issue.

Comment 7 RHEL Program Management 2010-01-27 20:52:27 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 17 errata-xmlrpc 2010-03-30 07:09:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html


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