aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/t3_hw.c
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-03-18 16:10:17 -0400
committerJeff Garzik <jeff@garzik.org>2007-03-23 01:48:34 -0400
commite4d08359ffb6580ee7a014d162162b2d18aa4ec0 (patch)
tree1bfeb459b2df7bc84cbcd082e829956d8b5b36f5 /drivers/net/cxgb3/t3_hw.c
parentfc90664e3438c990d280f179ccb0642711d5c553 (diff)
cxgb3 - T3B2 pcie config space
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>
Diffstat (limited to 'drivers/net/cxgb3/t3_hw.c')
-rw-r--r--drivers/net/cxgb3/t3_hw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 983ee813c7e4..791ed6dc1943 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -3244,15 +3244,17 @@ void early_hw_init(struct adapter *adapter, const struct adapter_info *ai)
3244} 3244}
3245 3245
3246/* 3246/*
3247 * Reset the adapter. PCIe cards lose their config space during reset, PCI-X 3247 * Reset the adapter.
3248 * Older PCIe cards lose their config space during reset, PCI-X
3248 * ones don't. 3249 * ones don't.
3249 */ 3250 */
3250int t3_reset_adapter(struct adapter *adapter) 3251int t3_reset_adapter(struct adapter *adapter)
3251{ 3252{
3252 int i; 3253 int i, save_and_restore_pcie =
3254 adapter->params.rev < T3_REV_B2 && is_pcie(adapter);
3253 uint16_t devid = 0; 3255 uint16_t devid = 0;
3254 3256
3255 if (is_pcie(adapter)) 3257 if (save_and_restore_pcie)
3256 pci_save_state(adapter->pdev); 3258 pci_save_state(adapter->pdev);
3257 t3_write_reg(adapter, A_PL_RST, F_CRSTWRM | F_CRSTWRMMODE); 3259 t3_write_reg(adapter, A_PL_RST, F_CRSTWRM | F_CRSTWRMMODE);
3258 3260
@@ -3270,7 +3272,7 @@ int t3_reset_adapter(struct adapter *adapter)
3270 if (devid != 0x1425) 3272 if (devid != 0x1425)
3271 return -1; 3273 return -1;
3272 3274
3273 if (is_pcie(adapter)) 3275 if (save_and_restore_pcie)
3274 pci_restore_state(adapter->pdev); 3276 pci_restore_state(adapter->pdev);
3275 return 0; 3277 return 0;
3276} 3278}