be2net: Ignore physical link async event for Lancer
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Wed, 18 Jul 2012 02:52:15 +0000 (02:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2012 16:28:38 +0000 (09:28 -0700)
The ability of driver to transmit packets depends on logical state
of the link. Ignore physical link status.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h

index 793249053066e62e3b912f8147778df88cb19692..7fac97b4bb59c19ecaca1073d84c6a183ecd17b1 100644 (file)
@@ -141,6 +141,11 @@ static void be_async_link_state_process(struct be_adapter *adapter,
        /* When link status changes, link speed must be re-queried from FW */
        adapter->phy.link_speed = -1;
 
+       /* Ignore physical link event */
+       if (lancer_chip(adapter) &&
+           !(evt->port_link_status & LOGICAL_LINK_STATUS_MASK))
+               return;
+
        /* For the initial link status do not rely on the ASYNC event as
         * it may not be received in some cases.
         */
index d5a4dedf113266bf19f52d71a9a6c31ac802c832..250f19b5f7b6c3887282f28af82dce11bfc8fd53 100644 (file)
@@ -93,6 +93,7 @@ enum {
        LINK_UP         = 0x1
 };
 #define LINK_STATUS_MASK                       0x1
+#define LOGICAL_LINK_STATUS_MASK               0x2
 
 /* When the event code of an async trailer is link-state, the mcc_compl
  * must be interpreted as follows