diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 4 | ||||
-rw-r--r-- | drivers/net/sfc/falcon.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 4 |
3 files changed, 8 insertions, 25 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index a37fcf11ab36..ea5cfe2c3a04 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -3403,9 +3403,7 @@ static int myri10ge_resume(struct pci_dev *pdev) | |||
3403 | return -EIO; | 3403 | return -EIO; |
3404 | } | 3404 | } |
3405 | 3405 | ||
3406 | status = pci_restore_state(pdev); | 3406 | pci_restore_state(pdev); |
3407 | if (status) | ||
3408 | return status; | ||
3409 | 3407 | ||
3410 | status = pci_enable_device(pdev); | 3408 | status = pci_enable_device(pdev); |
3411 | if (status) { | 3409 | if (status) { |
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 70e4f7dcce81..61ddd2c6e750 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -1107,22 +1107,9 @@ static int __falcon_reset_hw(struct efx_nic *efx, enum reset_type method) | |||
1107 | 1107 | ||
1108 | /* Restore PCI configuration if needed */ | 1108 | /* Restore PCI configuration if needed */ |
1109 | if (method == RESET_TYPE_WORLD) { | 1109 | if (method == RESET_TYPE_WORLD) { |
1110 | if (efx_nic_is_dual_func(efx)) { | 1110 | if (efx_nic_is_dual_func(efx)) |
1111 | rc = pci_restore_state(nic_data->pci_dev2); | 1111 | pci_restore_state(nic_data->pci_dev2); |
1112 | if (rc) { | 1112 | pci_restore_state(efx->pci_dev); |
1113 | netif_err(efx, drv, efx->net_dev, | ||
1114 | "failed to restore PCI config for " | ||
1115 | "the secondary function\n"); | ||
1116 | goto fail3; | ||
1117 | } | ||
1118 | } | ||
1119 | rc = pci_restore_state(efx->pci_dev); | ||
1120 | if (rc) { | ||
1121 | netif_err(efx, drv, efx->net_dev, | ||
1122 | "failed to restore PCI config for the " | ||
1123 | "primary function\n"); | ||
1124 | goto fail4; | ||
1125 | } | ||
1126 | netif_dbg(efx, drv, efx->net_dev, | 1113 | netif_dbg(efx, drv, efx->net_dev, |
1127 | "successfully restored PCI config\n"); | 1114 | "successfully restored PCI config\n"); |
1128 | } | 1115 | } |
@@ -1133,7 +1120,7 @@ static int __falcon_reset_hw(struct efx_nic *efx, enum reset_type method) | |||
1133 | rc = -ETIMEDOUT; | 1120 | rc = -ETIMEDOUT; |
1134 | netif_err(efx, hw, efx->net_dev, | 1121 | netif_err(efx, hw, efx->net_dev, |
1135 | "timed out waiting for hardware reset\n"); | 1122 | "timed out waiting for hardware reset\n"); |
1136 | goto fail5; | 1123 | goto fail3; |
1137 | } | 1124 | } |
1138 | netif_dbg(efx, hw, efx->net_dev, "hardware reset complete\n"); | 1125 | netif_dbg(efx, hw, efx->net_dev, "hardware reset complete\n"); |
1139 | 1126 | ||
@@ -1141,11 +1128,9 @@ static int __falcon_reset_hw(struct efx_nic *efx, enum reset_type method) | |||
1141 | 1128 | ||
1142 | /* pci_save_state() and pci_restore_state() MUST be called in pairs */ | 1129 | /* pci_save_state() and pci_restore_state() MUST be called in pairs */ |
1143 | fail2: | 1130 | fail2: |
1144 | fail3: | ||
1145 | pci_restore_state(efx->pci_dev); | 1131 | pci_restore_state(efx->pci_dev); |
1146 | fail1: | 1132 | fail1: |
1147 | fail4: | 1133 | fail3: |
1148 | fail5: | ||
1149 | return rc; | 1134 | return rc; |
1150 | } | 1135 | } |
1151 | 1136 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 73631c6fbb30..ace0b668c04e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -363,12 +363,12 @@ int rt2x00pci_resume(struct pci_dev *pci_dev) | |||
363 | struct rt2x00_dev *rt2x00dev = hw->priv; | 363 | struct rt2x00_dev *rt2x00dev = hw->priv; |
364 | 364 | ||
365 | if (pci_set_power_state(pci_dev, PCI_D0) || | 365 | if (pci_set_power_state(pci_dev, PCI_D0) || |
366 | pci_enable_device(pci_dev) || | 366 | pci_enable_device(pci_dev)) { |
367 | pci_restore_state(pci_dev)) { | ||
368 | ERROR(rt2x00dev, "Failed to resume device.\n"); | 367 | ERROR(rt2x00dev, "Failed to resume device.\n"); |
369 | return -EIO; | 368 | return -EIO; |
370 | } | 369 | } |
371 | 370 | ||
371 | pci_restore_state(pci_dev); | ||
372 | return rt2x00lib_resume(rt2x00dev); | 372 | return rt2x00lib_resume(rt2x00dev); |
373 | } | 373 | } |
374 | EXPORT_SYMBOL_GPL(rt2x00pci_resume); | 374 | EXPORT_SYMBOL_GPL(rt2x00pci_resume); |