diff options
author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2014-12-09 22:41:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-10 13:31:57 -0500 |
commit | e2338f86b334558b9f38a20a06fc645d90d6da2d (patch) | |
tree | b2430ec80462aa9ecc8c0ecd82fdea6aed5aeaaf | |
parent | e0e31216ef1d3e7ec95b7b630ef2f038871a70ed (diff) |
ethernet/realtek: use napi_alloc_skb instead of netdev_alloc_skb_ip_align
This replaces most of the calls to netdev_alloc_skb_ip_align in the Realtek
drivers. The one instance I didn't replace in 8139cp.c is because it was
called as a part of init and as such is not always accessed from the
softirq context.
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/realtek/8139cp.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/8139too.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index 75b1693ec8bf..9c31e46d1eee 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c | |||
@@ -507,7 +507,7 @@ rx_status_loop: | |||
507 | netif_dbg(cp, rx_status, dev, "rx slot %d status 0x%x len %d\n", | 507 | netif_dbg(cp, rx_status, dev, "rx slot %d status 0x%x len %d\n", |
508 | rx_tail, status, len); | 508 | rx_tail, status, len); |
509 | 509 | ||
510 | new_skb = netdev_alloc_skb_ip_align(dev, buflen); | 510 | new_skb = napi_alloc_skb(napi, buflen); |
511 | if (!new_skb) { | 511 | if (!new_skb) { |
512 | dev->stats.rx_dropped++; | 512 | dev->stats.rx_dropped++; |
513 | goto rx_next; | 513 | goto rx_next; |
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c index 63dc0f95d050..6d0b9dfac313 100644 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/drivers/net/ethernet/realtek/8139too.c | |||
@@ -2037,7 +2037,7 @@ keep_pkt: | |||
2037 | /* Malloc up new buffer, compatible with net-2e. */ | 2037 | /* Malloc up new buffer, compatible with net-2e. */ |
2038 | /* Omit the four octet CRC from the length. */ | 2038 | /* Omit the four octet CRC from the length. */ |
2039 | 2039 | ||
2040 | skb = netdev_alloc_skb_ip_align(dev, pkt_size); | 2040 | skb = napi_alloc_skb(&tp->napi, pkt_size); |
2041 | if (likely(skb)) { | 2041 | if (likely(skb)) { |
2042 | #if RX_BUF_IDX == 3 | 2042 | #if RX_BUF_IDX == 3 |
2043 | wrap_copy(skb, rx_ring, ring_offset+4, pkt_size); | 2043 | wrap_copy(skb, rx_ring, ring_offset+4, pkt_size); |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index b9c2f33b463d..3dad7e884952 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -7260,7 +7260,7 @@ static struct sk_buff *rtl8169_try_rx_copy(void *data, | |||
7260 | data = rtl8169_align(data); | 7260 | data = rtl8169_align(data); |
7261 | dma_sync_single_for_cpu(d, addr, pkt_size, DMA_FROM_DEVICE); | 7261 | dma_sync_single_for_cpu(d, addr, pkt_size, DMA_FROM_DEVICE); |
7262 | prefetch(data); | 7262 | prefetch(data); |
7263 | skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size); | 7263 | skb = napi_alloc_skb(&tp->napi, pkt_size); |
7264 | if (skb) | 7264 | if (skb) |
7265 | memcpy(skb->data, data, pkt_size); | 7265 | memcpy(skb->data, data, pkt_size); |
7266 | dma_sync_single_for_device(d, addr, pkt_size, DMA_FROM_DEVICE); | 7266 | dma_sync_single_for_device(d, addr, pkt_size, DMA_FROM_DEVICE); |