Bug 9269 - (net sunhme) cannot enslave ethernet devices
Summary: (net sunhme) cannot enslave ethernet devices
Status: REJECTED DOCUMENTED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 14:35 UTC by Chris Poon
Modified: 2008-09-24 03:54 UTC (History)
0 users

See Also:
Kernel Version: 2.6.18-3
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Patch to call netif_carrier_on/netif_carrier_off (906 bytes, patch)
2007-10-31 14:42 UTC, Chris Poon
Details | Diff

Description Chris Poon 2007-10-31 14:35:56 UTC
Most recent kernel where this bug did not occur: N/A
Distribution: Debian 4.0r1/stable (Etch)
Hardware Environment: Sun Netra T1 105 (sparc64)
Software Environment:
Problem Description:
bonding module cannot enslave ethernet devices provided by sunhme - link
status is never reported via netif_carrier_on/netif_carrier_off which makes
sunhme not usable as a slave to the bonding module

Steps to reproduce:
modprobe sunhme
modprobe bonding
ifconfig bond0 up
ifconfig eth0 up
# wait for link to be up
ifenslave bond0 eth0
# bond0 never comes up and keeps waiting for link
Comment 1 Chris Poon 2007-10-31 14:39:47 UTC
Had a custom patch to call netif_carrier_on in happy_meal_timer (if hp->sw_bmsr & BMSR_LSTATUS is true) and call netif_carrier_off first thing in happy_meal_begin_auto_negotiation - that seems to make sunhme usable as a slave to a bond
Comment 2 Chris Poon 2007-10-31 14:42:38 UTC
Created attachment 13362 [details]
Patch to call netif_carrier_on/netif_carrier_off
Comment 3 Anonymous Emailer 2007-10-31 15:38:05 UTC
Reply-To: akpm@linux-foundation.org

On Wed, 31 Oct 2007 14:35:56 -0700 (PDT)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9269
> 
>            Summary: bonding module cannot enslave ethernet devices provided
>                     by sunhme
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.18-3
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Network
>         AssignedTo: jgarzik@pobox.com
>         ReportedBy: dev-null@telus.net
> 
> 
> Most recent kernel where this bug did not occur: N/A
> Distribution: Debian 4.0r1/stable (Etch)
> Hardware Environment: Sun Netra T1 105 (sparc64)
> Software Environment:
> Problem Description:
> bonding module cannot enslave ethernet devices provided by sunhme - link
> status is never reported via netif_carrier_on/netif_carrier_off which makes
> sunhme not usable as a slave to the bonding module
> 
> Steps to reproduce:
> modprobe sunhme
> modprobe bonding
> ifconfig bond0 up
> ifconfig eth0 up
> # wait for link to be up
> ifenslave bond0 eth0
> # bond0 never comes up and keeps waiting for link
> 
Comment 4 Jay Vosburgh 2007-10-31 15:49:37 UTC
It looks like sunhme supports link status queries via ethtool, so specifying use_carrier=0 to bonding may also resolve the problem.
Comment 5 Chris Poon 2007-11-01 10:19:04 UTC
bonding driver must doing something special to check the link as use_carrier=0 doesn't seem to work for me as that was the first thing I tried IIRC.
Comment 6 Jay Vosburgh 2007-11-01 13:03:10 UTC
The bonding driver with use_carrier=0 will try (a) a driver ioctl SIOCGMIIPHY/REG, then (b) a slave_dev->ethtool_ops->get_link and lastly (c) a driver ioctl SIOCETHTOOL ETHTOOL_GLINK.  It looks like sunhme.c has an ethtool_ops->get_link (and no ioctl at all, so those would be skipped), so it seems odd that it wouldn't work.
Comment 7 Chris Poon 2007-11-08 10:41:53 UTC
I managed to test it last night, and use_carrier=0 will work (The option for the module must not be effective when I last tested it). Although setting use_carrier=0 will work, I feel that adding the netif_carrier calls will make it work under the bonding driver with default settings

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