Loading drivers/net/via-rhine.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -914,7 +914,7 @@ static void alloc_rbufs(struct net_device *dev) /* Fill in the Rx buffers. Handle allocation failure gracefully. */ /* Fill in the Rx buffers. Handle allocation failure gracefully. */ for (i = 0; i < RX_RING_SIZE; i++) { for (i = 0; i < RX_RING_SIZE; i++) { struct sk_buff *skb = dev_alloc_skb(rp->rx_buf_sz); struct sk_buff *skb = netdev_alloc_skb(dev, rp->rx_buf_sz); rp->rx_skbuff[i] = skb; rp->rx_skbuff[i] = skb; if (skb == NULL) if (skb == NULL) break; break; Loading Loading @@ -1473,8 +1473,8 @@ static int rhine_rx(struct net_device *dev, int limit) /* Check if the packet is long enough to accept without /* Check if the packet is long enough to accept without copying to a minimally-sized skbuff. */ copying to a minimally-sized skbuff. */ if (pkt_len < rx_copybreak && if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { (skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN)) != NULL) { skb_reserve(skb, 2); /* 16 byte align the IP header */ skb_reserve(skb, NET_IP_ALIGN); /* 16 byte align the IP header */ pci_dma_sync_single_for_cpu(rp->pdev, pci_dma_sync_single_for_cpu(rp->pdev, rp->rx_skbuff_dma[entry], rp->rx_skbuff_dma[entry], rp->rx_buf_sz, rp->rx_buf_sz, Loading Loading @@ -1518,7 +1518,7 @@ static int rhine_rx(struct net_device *dev, int limit) struct sk_buff *skb; struct sk_buff *skb; entry = rp->dirty_rx % RX_RING_SIZE; entry = rp->dirty_rx % RX_RING_SIZE; if (rp->rx_skbuff[entry] == NULL) { if (rp->rx_skbuff[entry] == NULL) { skb = dev_alloc_skb(rp->rx_buf_sz); skb = netdev_alloc_skb(dev, rp->rx_buf_sz); rp->rx_skbuff[entry] = skb; rp->rx_skbuff[entry] = skb; if (skb == NULL) if (skb == NULL) break; /* Better luck next round. */ break; /* Better luck next round. */ Loading Loading
drivers/net/via-rhine.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -914,7 +914,7 @@ static void alloc_rbufs(struct net_device *dev) /* Fill in the Rx buffers. Handle allocation failure gracefully. */ /* Fill in the Rx buffers. Handle allocation failure gracefully. */ for (i = 0; i < RX_RING_SIZE; i++) { for (i = 0; i < RX_RING_SIZE; i++) { struct sk_buff *skb = dev_alloc_skb(rp->rx_buf_sz); struct sk_buff *skb = netdev_alloc_skb(dev, rp->rx_buf_sz); rp->rx_skbuff[i] = skb; rp->rx_skbuff[i] = skb; if (skb == NULL) if (skb == NULL) break; break; Loading Loading @@ -1473,8 +1473,8 @@ static int rhine_rx(struct net_device *dev, int limit) /* Check if the packet is long enough to accept without /* Check if the packet is long enough to accept without copying to a minimally-sized skbuff. */ copying to a minimally-sized skbuff. */ if (pkt_len < rx_copybreak && if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { (skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN)) != NULL) { skb_reserve(skb, 2); /* 16 byte align the IP header */ skb_reserve(skb, NET_IP_ALIGN); /* 16 byte align the IP header */ pci_dma_sync_single_for_cpu(rp->pdev, pci_dma_sync_single_for_cpu(rp->pdev, rp->rx_skbuff_dma[entry], rp->rx_skbuff_dma[entry], rp->rx_buf_sz, rp->rx_buf_sz, Loading Loading @@ -1518,7 +1518,7 @@ static int rhine_rx(struct net_device *dev, int limit) struct sk_buff *skb; struct sk_buff *skb; entry = rp->dirty_rx % RX_RING_SIZE; entry = rp->dirty_rx % RX_RING_SIZE; if (rp->rx_skbuff[entry] == NULL) { if (rp->rx_skbuff[entry] == NULL) { skb = dev_alloc_skb(rp->rx_buf_sz); skb = netdev_alloc_skb(dev, rp->rx_buf_sz); rp->rx_skbuff[entry] = skb; rp->rx_skbuff[entry] = skb; if (skb == NULL) if (skb == NULL) break; /* Better luck next round. */ break; /* Better luck next round. */ Loading