Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109243
b: refs/heads/master
c: abe7871
h: refs/heads/master
i:
  109241: 9f92474
  109239: e4283f8
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Aug 24, 2008
1 parent 7e003a0 commit 86ee6cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e1f37724265725ad4c14fc2ef60a162dc13ac64
refs/heads/master: abe787170bb3888c5e587e8e986711fe32ddf2f9
18 changes: 13 additions & 5 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,19 @@ static void rxq_refill(struct rx_queue *rxq)
/*
* Reserve 2+14 bytes for an ethernet header (the
* hardware automatically prepends 2 bytes of dummy
* data to each received packet), 4 bytes for a VLAN
* header, and 4 bytes for the trailing FCS -- 24
* bytes total.
* data to each received packet), 16 bytes for up to
* four VLAN tags, and 4 bytes for the trailing FCS
* -- 36 bytes total.
*/
skb_size = mp->dev->mtu + 24;
skb_size = mp->dev->mtu + 36;

/*
* Make sure that the skb size is a multiple of 8
* bytes, as the lower three bits of the receive
* descriptor's buffer size field are ignored by
* the hardware.
*/
skb_size = (skb_size + 7) & ~7;

skb = dev_alloc_skb(skb_size + dma_get_cache_alignment() - 1);
if (skb == NULL)
Expand Down Expand Up @@ -552,7 +560,7 @@ static int rxq_process(struct rx_queue *rxq, int budget)
spin_unlock_irqrestore(&mp->lock, flags);

dma_unmap_single(NULL, rx_desc->buf_ptr + 2,
mp->dev->mtu + 24, DMA_FROM_DEVICE);
rx_desc->buf_size, DMA_FROM_DEVICE);
rxq->rx_desc_count--;
rx++;

Expand Down

0 comments on commit 86ee6cb

Please sign in to comment.