aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a938dba7bdfe..81971ed607eb 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -305,10 +305,12 @@ static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter,
305 int reg_idx = tx_ring->reg_idx; 305 int reg_idx = tx_ring->reg_idx;
306 int dcb_i = adapter->ring_feature[RING_F_DCB].indices; 306 int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
307 307
308 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { 308 switch (adapter->hw.mac.type) {
309 case ixgbe_mac_82598EB:
309 tc = reg_idx >> 2; 310 tc = reg_idx >> 2;
310 txoff = IXGBE_TFCS_TXOFF0; 311 txoff = IXGBE_TFCS_TXOFF0;
311 } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { 312 break;
313 case ixgbe_mac_82599EB:
312 tc = 0; 314 tc = 0;
313 txoff = IXGBE_TFCS_TXOFF; 315 txoff = IXGBE_TFCS_TXOFF;
314 if (dcb_i == 8) { 316 if (dcb_i == 8) {
@@ -327,6 +329,9 @@ static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter,
327 tc += (reg_idx - 96) >> 4; 329 tc += (reg_idx - 96) >> 4;
328 } 330 }
329 } 331 }
332 break;
333 default:
334 tc = 0;
330 } 335 }
331 txoff <<= tc; 336 txoff <<= tc;
332 } 337 }
@@ -4558,6 +4563,11 @@ static int ixgbe_resume(struct pci_dev *pdev)
4558 4563
4559 pci_set_power_state(pdev, PCI_D0); 4564 pci_set_power_state(pdev, PCI_D0);
4560 pci_restore_state(pdev); 4565 pci_restore_state(pdev);
4566 /*
4567 * pci_restore_state clears dev->state_saved so call
4568 * pci_save_state to restore it.
4569 */
4570 pci_save_state(pdev);
4561 4571
4562 err = pci_enable_device_mem(pdev); 4572 err = pci_enable_device_mem(pdev);
4563 if (err) { 4573 if (err) {