]> err.no Git - linux-2.6/commitdiff
cxgb3 - T3B2 pcie config space
authorDivy Le Ray <divy@chelsio.com>
Sun, 18 Mar 2007 20:10:17 +0000 (13:10 -0700)
committerJeff Garzik <jeff@garzik.org>
Fri, 23 Mar 2007 05:48:34 +0000 (01:48 -0400)
T3B2 does not lose its pcie config space on reset.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/cxgb3/t3_hw.c

index 983ee813c7e443f496c0f59e56466e3d98962975..791ed6dc1943bdd5e7994ee78c4688c0de5f289e 100644 (file)
@@ -3244,15 +3244,17 @@ void early_hw_init(struct adapter *adapter, const struct adapter_info *ai)
 }
 
 /*
- * Reset the adapter.  PCIe cards lose their config space during reset, PCI-X
+ * Reset the adapter. 
+ * Older PCIe cards lose their config space during reset, PCI-X
  * ones don't.
  */
 int t3_reset_adapter(struct adapter *adapter)
 {
-       int i;
+       int i, save_and_restore_pcie = 
+           adapter->params.rev < T3_REV_B2 && is_pcie(adapter);
        uint16_t devid = 0;
 
-       if (is_pcie(adapter))
+       if (save_and_restore_pcie)
                pci_save_state(adapter->pdev);
        t3_write_reg(adapter, A_PL_RST, F_CRSTWRM | F_CRSTWRMMODE);
 
@@ -3270,7 +3272,7 @@ int t3_reset_adapter(struct adapter *adapter)
        if (devid != 0x1425)
                return -1;
 
-       if (is_pcie(adapter))
+       if (save_and_restore_pcie)
                pci_restore_state(adapter->pdev);
        return 0;
 }