netxen: fix link event handling
authorDhananjay Phadke <dhananjay@netxen.com>
Tue, 28 Apr 2009 15:29:09 +0000 (15:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2009 05:44:30 +0000 (22:44 -0700)
Firmware starting 4.0.402 started supporting link events, disable
it for older firmwares.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_ethtool.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/netxen/netxen_nic_phan_reg.h

index a452b2facb77632aaf43ef10057ca1357839fb19..e16ea46c24b89bf89a685b260b45e01261823755 100644 (file)
@@ -247,6 +247,7 @@ skip:
                case LINKEVENT_MODULE_TWINAX_UNSUPPORTED_CABLELEN:
                case LINKEVENT_MODULE_TWINAX:
                        ecmd->port = PORT_TP;
+                       break;
                default:
                        ecmd->port = -1;
                }
index e877eefdfeb001e71c2ca38788f0f7a210dfd0ac..8331580fe1617cf954167f1e86ccdc4b0f42d98f 100644 (file)
@@ -797,7 +797,7 @@ netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev)
        if (adapter->max_sds_rings > 1)
                netxen_config_rss(adapter, 1);
 
-       if (NX_IS_REVISION_P3(adapter->ahw.revision_id))
+       if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION)
                netxen_linkevent_request(adapter, 1);
 
        return 0;
index 845dcf436cf6a1e47c89bba621d5f6991737ad09..b73a62ca74f8b835a9dfe184195f0356ac5afb4d 100644 (file)
 #define CRB_SW_INT_MASK_2         NETXEN_NIC_REG(0x1e4)
 #define CRB_SW_INT_MASK_3         NETXEN_NIC_REG(0x1e8)
 
+#define CRB_FW_CAPABILITIES_1      NETXEN_CAM_RAM(0x128)
 #define CRB_MAC_BLOCK_START        NETXEN_CAM_RAM(0x1c0)
 
 /*
 #define CRB_NIC_CAPABILITIES_FW                NETXEN_NIC_REG(0x1dc)
 #define CRB_NIC_MSI_MODE_HOST          NETXEN_NIC_REG(0x270)
 #define CRB_NIC_MSI_MODE_FW            NETXEN_NIC_REG(0x274)
-#define CRB_FW_CAPABILITIES_1          NETXEN_NIC_REG(0x128)
 
 #define INTR_SCHEME_PERPORT            0x1
 #define MSI_MODE_MULTIFUNC             0x1