diff options
Diffstat (limited to 'drivers/net/sfc/falcon.c')
| -rw-r--r-- | drivers/net/sfc/falcon.c | 25 |
1 files changed, 5 insertions, 20 deletions
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 | ||
