Lines Matching refs:rxq
121 struct hisi_femac_queue rxq; member
212 struct hisi_femac_queue *rxq = &priv->rxq; in hisi_femac_rx_refill() local
218 pos = rxq->head; in hisi_femac_rx_refill()
220 if (!CIRC_SPACE(pos, rxq->tail, rxq->num)) in hisi_femac_rx_refill()
222 if (unlikely(rxq->skb[pos])) { in hisi_femac_rx_refill()
224 pos, rxq->skb[pos]); in hisi_femac_rx_refill()
237 rxq->dma_phys[pos] = addr; in hisi_femac_rx_refill()
238 rxq->skb[pos] = skb; in hisi_femac_rx_refill()
240 pos = (pos + 1) % rxq->num; in hisi_femac_rx_refill()
242 rxq->head = pos; in hisi_femac_rx_refill()
248 struct hisi_femac_queue *rxq = &priv->rxq; in hisi_femac_rx() local
253 pos = rxq->tail; in hisi_femac_rx()
264 skb = rxq->skb[pos]; in hisi_femac_rx()
269 rxq->skb[pos] = NULL; in hisi_femac_rx()
271 addr = rxq->dma_phys[pos]; in hisi_femac_rx()
288 pos = (pos + 1) % rxq->num; in hisi_femac_rx()
292 rxq->tail = pos; in hisi_femac_rx()
376 ret = hisi_femac_init_queue(priv->dev, &priv->rxq, RXQ_NUM); in hisi_femac_init_tx_and_rx_queues()
388 struct hisi_femac_queue *rxq = &priv->rxq; in hisi_femac_free_skb_rings() local
393 pos = rxq->tail; in hisi_femac_free_skb_rings()
394 while (pos != rxq->head) { in hisi_femac_free_skb_rings()
395 skb = rxq->skb[pos]; in hisi_femac_free_skb_rings()
398 pos, rxq->head); in hisi_femac_free_skb_rings()
402 dma_addr = rxq->dma_phys[pos]; in hisi_femac_free_skb_rings()
407 rxq->skb[pos] = NULL; in hisi_femac_free_skb_rings()
408 pos = (pos + 1) % rxq->num; in hisi_femac_free_skb_rings()
410 rxq->tail = pos; in hisi_femac_free_skb_rings()