Subject: Re: [PATCH] bnx2: Fix the behavior of ethtool when ONBOOT=no

From: Naohiro Ooiwa <[email-masked]>
Date: Fri, 26 Jun 2009 13:30:51 +0900

Hi David

Thank you for taking a look at the NM sources.

FYI, I confirmed the behavior of e1000e driver.
The condition is ONBOOT=no, and with or without LAN cable.
bnx2 is included this patch.

       | LAN cable |    ethtool
       |           | Link detected
-------+-----------+----------------
e1000e |  plugged  |    yes
e1000e | unplugged |     no
bnx2   |  plugged  |    yes
bnx2   | unplugged |     no (previously "yes")

The behavior of bnx2 became congruent with e1000e.
The looks is natural for me.

Best Regards,
Naohiro Ooiwa

David Miller wrote:
> From: David Miller <[email-masked]>
> Date: Wed, 24 Jun 2009 17:12:46 -0700 (PDT)
> 
>> From: "Michael Chan" <[email-masked]>
>> Date: Wed, 24 Jun 2009 16:48:32 -0700
>>
>>> I don't know about NetworkManager, but the old ifup script will bring up
>>> the device, wait up to 5 seconds for link up, and then do DHCP.
>> I'll swallow a handful of antacid tablets and take a look at
>> the NM sources :-/
> 
> Ok, NM first checks if the device supports either ethtool or
> MII based link status.
> 
> It checks for these capabilities by openning the device, trying
> the ethtool/ioctl op, then closing the device.
> 
> If link status reporting is found to be supported, it records the
> initial link state and listens for netlink events.  (these are
> generated by netif_carrier_{on,off}() calls in the kernel)
> 
> When a link-up status netlink event is received, it brings wired
> devices reporting such events up.
> 
> And most importantly, it seems to bring the device UP during all
> of this stuff.
> 
> So I guess we're OK.
>