aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/r8169.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index a0da4a17b025..a68ec8fc9f05 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4000,7 +4000,7 @@ static inline void rtl8169_map_to_asic(struct RxDesc *desc, dma_addr_t mapping,
4000static struct sk_buff *rtl8169_alloc_rx_skb(struct pci_dev *pdev, 4000static struct sk_buff *rtl8169_alloc_rx_skb(struct pci_dev *pdev,
4001 struct net_device *dev, 4001 struct net_device *dev,
4002 struct RxDesc *desc, int rx_buf_sz, 4002 struct RxDesc *desc, int rx_buf_sz,
4003 unsigned int align) 4003 unsigned int align, gfp_t gfp)
4004{ 4004{
4005 struct sk_buff *skb; 4005 struct sk_buff *skb;
4006 dma_addr_t mapping; 4006 dma_addr_t mapping;
@@ -4008,7 +4008,7 @@ static struct sk_buff *rtl8169_alloc_rx_skb(struct pci_dev *pdev,
4008 4008
4009 pad = align ? align : NET_IP_ALIGN; 4009 pad = align ? align : NET_IP_ALIGN;
4010 4010
4011 skb = netdev_alloc_skb(dev, rx_buf_sz + pad); 4011 skb = __netdev_alloc_skb(dev, rx_buf_sz + pad, gfp);
4012 if (!skb) 4012 if (!skb)
4013 goto err_out; 4013 goto err_out;
4014 4014
@@ -4039,7 +4039,7 @@ static void rtl8169_rx_clear(struct rtl8169_private *tp)
4039} 4039}
4040 4040
4041static u32 rtl8169_rx_fill(struct rtl8169_private *tp, struct net_device *dev, 4041static u32 rtl8169_rx_fill(struct rtl8169_private *tp, struct net_device *dev,
4042 u32 start, u32 end) 4042 u32 start, u32 end, gfp_t gfp)
4043{ 4043{
4044 u32 cur; 4044 u32 cur;
4045 4045
@@ -4054,7 +4054,7 @@ static u32 rtl8169_rx_fill(struct rtl8169_private *tp, struct net_device *dev,
4054 4054
4055 skb = rtl8169_alloc_rx_skb(tp->pci_dev, dev, 4055 skb = rtl8169_alloc_rx_skb(tp->pci_dev, dev,
4056 tp->RxDescArray + i, 4056 tp->RxDescArray + i,
4057 tp->rx_buf_sz, tp->align); 4057 tp->rx_buf_sz, tp->align, gfp);
4058 if (!skb) 4058 if (!skb)
4059 break; 4059 break;
4060 4060
@@ -4082,7 +4082,7 @@ static int rtl8169_init_ring(struct net_device *dev)
4082 memset(tp->tx_skb, 0x0, NUM_TX_DESC * sizeof(struct ring_info)); 4082 memset(tp->tx_skb, 0x0, NUM_TX_DESC * sizeof(struct ring_info));
4083 memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); 4083 memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *));
4084 4084
4085 if (rtl8169_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC) 4085 if (rtl8169_rx_fill(tp, dev, 0, NUM_RX_DESC, GFP_KERNEL) != NUM_RX_DESC)
4086 goto err_out; 4086 goto err_out;
4087 4087
4088 rtl8169_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1); 4088 rtl8169_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1);
@@ -4583,7 +4583,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
4583 count = cur_rx - tp->cur_rx; 4583 count = cur_rx - tp->cur_rx;
4584 tp->cur_rx = cur_rx; 4584 tp->cur_rx = cur_rx;
4585 4585
4586 delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx); 4586 delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx, GFP_ATOMIC);
4587 if (!delta && count) 4587 if (!delta && count)
4588 netif_info(tp, intr, dev, "no Rx buffer allocated\n"); 4588 netif_info(tp, intr, dev, "no Rx buffer allocated\n");
4589 tp->dirty_rx += delta; 4589 tp->dirty_rx += delta;