netxen: fix interrupt for NX2031
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Mon, 29 Mar 2010 02:43:45 +0000 (02:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2010 20:18:38 +0000 (13:18 -0700)
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
For NX2031, msix is supported from fw version > 3.4.336.
This fw version check should take flash fw in consider instead of
running fw or fw from file.
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_main.c

index 68903bf06cf60990d0c7b3b99ce460a38891c570..f1daa9a8be07f9a5b6a12b82203f59fb654ebde3 100644 (file)
@@ -772,15 +772,22 @@ netxen_check_options(struct netxen_adapter *adapter)
        if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
                adapter->msix_supported = !!use_msi_x;
                adapter->rss_supported = !!use_msi_x;
-       } else if (adapter->fw_version >= NETXEN_VERSION_CODE(3, 4, 336)) {
-               switch (adapter->ahw.board_type) {
-               case NETXEN_BRDTYPE_P2_SB31_10G:
-               case NETXEN_BRDTYPE_P2_SB31_10G_CX4:
-                       adapter->msix_supported = !!use_msi_x;
-                       adapter->rss_supported = !!use_msi_x;
-                       break;
-               default:
-                       break;
+       } else {
+               u32 flashed_ver = 0;
+               netxen_rom_fast_read(adapter,
+                               NX_FW_VERSION_OFFSET, (int *)&flashed_ver);
+               flashed_ver = NETXEN_DECODE_VERSION(flashed_ver);
+
+               if (flashed_ver >= NETXEN_VERSION_CODE(3, 4, 336)) {
+                       switch (adapter->ahw.board_type) {
+                       case NETXEN_BRDTYPE_P2_SB31_10G:
+                       case NETXEN_BRDTYPE_P2_SB31_10G_CX4:
+                               adapter->msix_supported = !!use_msi_x;
+                               adapter->rss_supported = !!use_msi_x;
+                               break;
+                       default:
+                               break;
+                       }
                }
        }