Lines Matching refs:desc
111 ch->skb[ch->dma.desc] = netdev_alloc_skb(ch->netdev, MAX_DMA_DATA_LEN); in ltq_etop_alloc_skb()
112 if (!ch->skb[ch->dma.desc]) in ltq_etop_alloc_skb()
114 ch->dma.desc_base[ch->dma.desc].addr = in ltq_etop_alloc_skb()
115 dma_map_single(&priv->pdev->dev, ch->skb[ch->dma.desc]->data, in ltq_etop_alloc_skb()
117 ch->dma.desc_base[ch->dma.desc].addr = in ltq_etop_alloc_skb()
118 CPHYSADDR(ch->skb[ch->dma.desc]->data); in ltq_etop_alloc_skb()
119 ch->dma.desc_base[ch->dma.desc].ctl = in ltq_etop_alloc_skb()
122 skb_reserve(ch->skb[ch->dma.desc], NET_IP_ALIGN); in ltq_etop_alloc_skb()
130 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in ltq_etop_hw_receive() local
131 struct sk_buff *skb = ch->skb[ch->dma.desc]; in ltq_etop_hw_receive()
132 int len = (desc->ctl & LTQ_DMA_SIZE_MASK) - MAX_DMA_CRC_LEN; in ltq_etop_hw_receive()
141 ch->dma.desc++; in ltq_etop_hw_receive()
142 ch->dma.desc %= LTQ_DESC_NUM; in ltq_etop_hw_receive()
158 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in ltq_etop_poll_rx() local
160 if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) != LTQ_DMA_C) in ltq_etop_poll_rx()
222 for (dma->desc = 0; dma->desc < LTQ_DESC_NUM; dma->desc++) in ltq_etop_free_channel()
223 dev_kfree_skb_any(ch->skb[ch->dma.desc]); in ltq_etop_free_channel()
289 for (ch->dma.desc = 0; ch->dma.desc < LTQ_DESC_NUM; in ltq_etop_hw_init()
290 ch->dma.desc++) in ltq_etop_hw_init()
293 ch->dma.desc = 0; in ltq_etop_hw_init()
480 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in ltq_etop_tx() local
489 if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) { in ltq_etop_tx()
497 ch->skb[ch->dma.desc] = skb; in ltq_etop_tx()
502 desc->addr = ((unsigned int)dma_map_single(&priv->pdev->dev, skb->data, len, in ltq_etop_tx()
506 desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP | in ltq_etop_tx()
508 ch->dma.desc++; in ltq_etop_tx()
509 ch->dma.desc %= LTQ_DESC_NUM; in ltq_etop_tx()
512 if (ch->dma.desc_base[ch->dma.desc].ctl & LTQ_DMA_OWN) in ltq_etop_tx()