Thread (16 messages) flat view 16 messages, 2 authors, 2012-09-27

RE: bnx2x: link detected up at startup even when it should be down

From: Dmitry Kravkov <hidden>
Date: 2012-09-20 20:08:27

-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
On Behalf Of Jean-Michel Hautbois
Sent: Thursday, September 20, 2012 6:39 PM
To: netdev
Cc: Barak Witkowski; Eilon Greenstein; davem@davemloft.net
Subject: bnx2x: link detected up at startup even when it should be down

Hi all,

I am working with a HP blade which has a bnx2x based card (Broadcom
NetXtreme II BCM57810 10 Gigabit Ethernet).
I am using a 3.2 linux kernel, which works very well except on
detecting the link state at startup.
I have my ethernet interfaces linked with a bond, and I want to
configure it for HA (in miimon mode).
I am using a managed switch which helps me in disabling/enabling ports.

When the port is disabled, at startup, the link is detected "UP".
When I enable the port, it is still "UP", and when I disable it again,
then it is detected "DOWN".

I have tried the latest 3.6-rc6 kernel, and it works well (link is
"DOWN" at startup when port is disabled).
Then I bisected it, and I found out that the commit which makes it
working (yes, it is an inverse bisect, thanks to this powerful git
tool :)) is :

a334872224a67b614dc888460377862621f3dac7 is the first bad commit
commit a334872224a67b614dc888460377862621f3dac7
Author: Barak Witkowski [off-list ref]
Date:   Mon Apr 23 03:04:46 2012 +0000

    bnx2x: add afex support

    Following patch adds afex multifunction support to the driver (afex
    multifunction is based on vntag header) and updates FW version
used to 7.2.51.

    Support includes the following:

    1. Configure vif parameters in firmware (default vlan, vif id, default
       priority, allowed priorities) according to values received from NIC.
    2. Configure FW to strip/add default vlan according to afex vlan mode.
    3. Notify link up to OS only after vif is fully initialized.
    4. Support vif list set/get requests and configure FW accordingly.
    5. Supply afex statistics upon request from NIC.
    6. Special handling to L2 interface in case of FCoE vif.

    Signed-off-by: Barak Witkowski [off-list ref]
    Signed-off-by: Eilon Greenstein [off-list ref]
    Signed-off-by: David S. Miller [off-list ref]

This commit is present in the 3.5.y stable branch, but not the 3.2.y one.
Is there a workaround which would make this feature work correctly
even on older kernels ?
It does not seem to be trivial, but I may miss something as this
driver is pretty big...
 Jean,
I have passed over the patch, but was unable to catch link related change out of the 
AFEX flow. We will get closer look asap in out lab (guys are out for the weekend already)

Can you double check bisect result for me, pls?

Thanks
Cheers,
JM
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help