Lines Matching refs:rx_buff
183 struct buffer_state *rx_buff = &priv->rx_buff[*last_rx_bd]; in arc_emac_rx() local
241 dma_unmap_single(&ndev->dev, dma_unmap_addr(rx_buff, addr), in arc_emac_rx()
242 dma_unmap_len(rx_buff, len), DMA_FROM_DEVICE); in arc_emac_rx()
247 skb_put(rx_buff->skb, pktlen); in arc_emac_rx()
248 rx_buff->skb->dev = ndev; in arc_emac_rx()
249 rx_buff->skb->protocol = eth_type_trans(rx_buff->skb, ndev); in arc_emac_rx()
251 netif_receive_skb(rx_buff->skb); in arc_emac_rx()
253 rx_buff->skb = skb; in arc_emac_rx()
254 dma_unmap_addr_set(rx_buff, addr, addr); in arc_emac_rx()
255 dma_unmap_len_set(rx_buff, len, EMAC_BUFFER_SIZE); in arc_emac_rx()
442 struct buffer_state *rx_buff = &priv->rx_buff[*last_rx_bd]; in arc_emac_open() local
444 rx_buff->skb = netdev_alloc_skb_ip_align(ndev, in arc_emac_open()
446 if (unlikely(!rx_buff->skb)) in arc_emac_open()
449 addr = dma_map_single(&ndev->dev, (void *)rx_buff->skb->data, in arc_emac_open()
453 dev_kfree_skb(rx_buff->skb); in arc_emac_open()
456 dma_unmap_addr_set(rx_buff, addr, addr); in arc_emac_open()
457 dma_unmap_len_set(rx_buff, len, EMAC_BUFFER_SIZE); in arc_emac_open()
587 struct buffer_state *rx_buff = &priv->rx_buff[i]; in arc_free_rx_queue() local
589 if (rx_buff->skb) { in arc_free_rx_queue()
591 dma_unmap_addr(rx_buff, addr), in arc_free_rx_queue()
592 dma_unmap_len(rx_buff, len), in arc_free_rx_queue()
596 dev_kfree_skb_irq(rx_buff->skb); in arc_free_rx_queue()
601 rx_buff->skb = NULL; in arc_free_rx_queue()