aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 9d8815302363..b46dff8ef9ab 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -341,15 +341,16 @@ static void ixgbevf_alloc_rx_buffers(struct ixgbevf_adapter *adapter,
341 struct pci_dev *pdev = adapter->pdev; 341 struct pci_dev *pdev = adapter->pdev;
342 union ixgbe_adv_rx_desc *rx_desc; 342 union ixgbe_adv_rx_desc *rx_desc;
343 struct ixgbevf_rx_buffer *bi; 343 struct ixgbevf_rx_buffer *bi;
344 struct sk_buff *skb;
345 unsigned int i = rx_ring->next_to_use; 344 unsigned int i = rx_ring->next_to_use;
346 345
347 bi = &rx_ring->rx_buffer_info[i]; 346 bi = &rx_ring->rx_buffer_info[i];
348 347
349 while (cleaned_count--) { 348 while (cleaned_count--) {
350 rx_desc = IXGBEVF_RX_DESC(rx_ring, i); 349 rx_desc = IXGBEVF_RX_DESC(rx_ring, i);
351 skb = bi->skb; 350
352 if (!skb) { 351 if (!bi->skb) {
352 struct sk_buff *skb;
353
353 skb = netdev_alloc_skb_ip_align(rx_ring->netdev, 354 skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
354 rx_ring->rx_buf_len); 355 rx_ring->rx_buf_len);
355 if (!skb) { 356 if (!skb) {
@@ -357,8 +358,7 @@ static void ixgbevf_alloc_rx_buffers(struct ixgbevf_adapter *adapter,
357 goto no_buffers; 358 goto no_buffers;
358 } 359 }
359 bi->skb = skb; 360 bi->skb = skb;
360 } 361
361 if (!bi->dma) {
362 bi->dma = dma_map_single(&pdev->dev, skb->data, 362 bi->dma = dma_map_single(&pdev->dev, skb->data,
363 rx_ring->rx_buf_len, 363 rx_ring->rx_buf_len,
364 DMA_FROM_DEVICE); 364 DMA_FROM_DEVICE);