diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 39781c84dafc..892195f2ad9b 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2458,8 +2458,10 @@ static void ixgbe_clean_rx_ring(struct ixgbe_adapter *adapter, | |||
2458 | rx_ring->next_to_clean = 0; | 2458 | rx_ring->next_to_clean = 0; |
2459 | rx_ring->next_to_use = 0; | 2459 | rx_ring->next_to_use = 0; |
2460 | 2460 | ||
2461 | writel(0, adapter->hw.hw_addr + rx_ring->head); | 2461 | if (rx_ring->head) |
2462 | writel(0, adapter->hw.hw_addr + rx_ring->tail); | 2462 | writel(0, adapter->hw.hw_addr + rx_ring->head); |
2463 | if (rx_ring->tail) | ||
2464 | writel(0, adapter->hw.hw_addr + rx_ring->tail); | ||
2463 | } | 2465 | } |
2464 | 2466 | ||
2465 | /** | 2467 | /** |
@@ -2490,8 +2492,10 @@ static void ixgbe_clean_tx_ring(struct ixgbe_adapter *adapter, | |||
2490 | tx_ring->next_to_use = 0; | 2492 | tx_ring->next_to_use = 0; |
2491 | tx_ring->next_to_clean = 0; | 2493 | tx_ring->next_to_clean = 0; |
2492 | 2494 | ||
2493 | writel(0, adapter->hw.hw_addr + tx_ring->head); | 2495 | if (tx_ring->head) |
2494 | writel(0, adapter->hw.hw_addr + tx_ring->tail); | 2496 | writel(0, adapter->hw.hw_addr + tx_ring->head); |
2497 | if (tx_ring->tail) | ||
2498 | writel(0, adapter->hw.hw_addr + tx_ring->tail); | ||
2495 | } | 2499 | } |
2496 | 2500 | ||
2497 | /** | 2501 | /** |
@@ -3327,7 +3331,8 @@ static void ixgbe_free_all_tx_resources(struct ixgbe_adapter *adapter) | |||
3327 | int i; | 3331 | int i; |
3328 | 3332 | ||
3329 | for (i = 0; i < adapter->num_tx_queues; i++) | 3333 | for (i = 0; i < adapter->num_tx_queues; i++) |
3330 | ixgbe_free_tx_resources(adapter, &adapter->tx_ring[i]); | 3334 | if (adapter->tx_ring[i].desc) |
3335 | ixgbe_free_tx_resources(adapter, &adapter->tx_ring[i]); | ||
3331 | } | 3336 | } |
3332 | 3337 | ||
3333 | /** | 3338 | /** |
@@ -3363,7 +3368,8 @@ static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter) | |||
3363 | int i; | 3368 | int i; |
3364 | 3369 | ||
3365 | for (i = 0; i < adapter->num_rx_queues; i++) | 3370 | for (i = 0; i < adapter->num_rx_queues; i++) |
3366 | ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]); | 3371 | if (adapter->rx_ring[i].desc) |
3372 | ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]); | ||
3367 | } | 3373 | } |
3368 | 3374 | ||
3369 | /** | 3375 | /** |