diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2009-08-13 01:18:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-13 01:18:14 -0400 |
commit | 839d1624b9dcf31fdc02e47359043bb7bd71d6ca (patch) | |
tree | dfad513ded1d7f88c3d946c5f56a8a7176f1b408 /drivers/net | |
parent | 9799218ae36910af50f002a5db1802d576fffb43 (diff) |
8139cp: balance dma_map_single vs dma_unmap_single pair
The driver always:
1. allocate cp->rx_buf_sz + NET_IP_ALIGN
2. map cp->rx_buf_sz
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/8139cp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 50efde11ea6c..d0dbbf39349a 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -515,7 +515,7 @@ rx_status_loop: | |||
515 | dma_addr_t mapping; | 515 | dma_addr_t mapping; |
516 | struct sk_buff *skb, *new_skb; | 516 | struct sk_buff *skb, *new_skb; |
517 | struct cp_desc *desc; | 517 | struct cp_desc *desc; |
518 | unsigned buflen; | 518 | const unsigned buflen = cp->rx_buf_sz; |
519 | 519 | ||
520 | skb = cp->rx_skb[rx_tail]; | 520 | skb = cp->rx_skb[rx_tail]; |
521 | BUG_ON(!skb); | 521 | BUG_ON(!skb); |
@@ -549,8 +549,7 @@ rx_status_loop: | |||
549 | pr_debug("%s: rx slot %d status 0x%x len %d\n", | 549 | pr_debug("%s: rx slot %d status 0x%x len %d\n", |
550 | dev->name, rx_tail, status, len); | 550 | dev->name, rx_tail, status, len); |
551 | 551 | ||
552 | buflen = cp->rx_buf_sz + NET_IP_ALIGN; | 552 | new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN); |
553 | new_skb = netdev_alloc_skb(dev, buflen); | ||
554 | if (!new_skb) { | 553 | if (!new_skb) { |
555 | dev->stats.rx_dropped++; | 554 | dev->stats.rx_dropped++; |
556 | goto rx_next; | 555 | goto rx_next; |