aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index d56724add175..b56fdf0dc875 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -593,6 +593,7 @@ static int rxq_refill(struct rx_queue *rxq, int budget)
593 struct sk_buff *skb; 593 struct sk_buff *skb;
594 int unaligned; 594 int unaligned;
595 int rx; 595 int rx;
596 struct rx_desc *rx_desc;
596 597
597 skb = __skb_dequeue(&mp->rx_recycle); 598 skb = __skb_dequeue(&mp->rx_recycle);
598 if (skb == NULL) 599 if (skb == NULL)
@@ -615,13 +616,14 @@ static int rxq_refill(struct rx_queue *rxq, int budget)
615 if (rxq->rx_used_desc == rxq->rx_ring_size) 616 if (rxq->rx_used_desc == rxq->rx_ring_size)
616 rxq->rx_used_desc = 0; 617 rxq->rx_used_desc = 0;
617 618
618 rxq->rx_desc_area[rx].buf_ptr = dma_map_single(NULL, skb->data, 619 rx_desc = rxq->rx_desc_area + rx;
619 mp->skb_size, DMA_FROM_DEVICE); 620
620 rxq->rx_desc_area[rx].buf_size = mp->skb_size; 621 rx_desc->buf_ptr = dma_map_single(NULL, skb->data,
622 mp->skb_size, DMA_FROM_DEVICE);
623 rx_desc->buf_size = mp->skb_size;
621 rxq->rx_skb[rx] = skb; 624 rxq->rx_skb[rx] = skb;
622 wmb(); 625 wmb();
623 rxq->rx_desc_area[rx].cmd_sts = BUFFER_OWNED_BY_DMA | 626 rx_desc->cmd_sts = BUFFER_OWNED_BY_DMA | RX_ENABLE_INTERRUPT;
624 RX_ENABLE_INTERRUPT;
625 wmb(); 627 wmb();
626 628
627 /* 629 /*