diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 18b5b217f310..d75c46ff31f6 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -935,10 +935,12 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
935 | if (skb->prev) | 935 | if (skb->prev) |
936 | skb = ixgbe_transform_rsc_queue(skb, &(rx_ring->rsc_count)); | 936 | skb = ixgbe_transform_rsc_queue(skb, &(rx_ring->rsc_count)); |
937 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { | 937 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { |
938 | if (IXGBE_RSC_CB(skb)->dma) | 938 | if (IXGBE_RSC_CB(skb)->dma) { |
939 | pci_unmap_single(pdev, IXGBE_RSC_CB(skb)->dma, | 939 | pci_unmap_single(pdev, IXGBE_RSC_CB(skb)->dma, |
940 | rx_ring->rx_buf_len, | 940 | rx_ring->rx_buf_len, |
941 | PCI_DMA_FROMDEVICE); | 941 | PCI_DMA_FROMDEVICE); |
942 | IXGBE_RSC_CB(skb)->dma = 0; | ||
943 | } | ||
942 | if (rx_ring->flags & IXGBE_RING_RX_PS_ENABLED) | 944 | if (rx_ring->flags & IXGBE_RING_RX_PS_ENABLED) |
943 | rx_ring->rsc_count += skb_shinfo(skb)->nr_frags; | 945 | rx_ring->rsc_count += skb_shinfo(skb)->nr_frags; |
944 | else | 946 | else |
@@ -3126,10 +3128,12 @@ static void ixgbe_clean_rx_ring(struct ixgbe_adapter *adapter, | |||
3126 | rx_buffer_info->skb = NULL; | 3128 | rx_buffer_info->skb = NULL; |
3127 | do { | 3129 | do { |
3128 | struct sk_buff *this = skb; | 3130 | struct sk_buff *this = skb; |
3129 | if (IXGBE_RSC_CB(this)->dma) | 3131 | if (IXGBE_RSC_CB(this)->dma) { |
3130 | pci_unmap_single(pdev, IXGBE_RSC_CB(this)->dma, | 3132 | pci_unmap_single(pdev, IXGBE_RSC_CB(this)->dma, |
3131 | rx_ring->rx_buf_len, | 3133 | rx_ring->rx_buf_len, |
3132 | PCI_DMA_FROMDEVICE); | 3134 | PCI_DMA_FROMDEVICE); |
3135 | IXGBE_RSC_CB(this)->dma = 0; | ||
3136 | } | ||
3133 | skb = skb->prev; | 3137 | skb = skb->prev; |
3134 | dev_kfree_skb(this); | 3138 | dev_kfree_skb(this); |
3135 | } while (skb); | 3139 | } while (skb); |