Lines Matching refs:desc
113 mv88w8618_rx_desc *desc) in eth_rx_desc_put() argument
115 cpu_to_le32s(&desc->cmdstat); in eth_rx_desc_put()
116 cpu_to_le16s(&desc->bytes); in eth_rx_desc_put()
117 cpu_to_le16s(&desc->buffer_size); in eth_rx_desc_put()
118 cpu_to_le32s(&desc->buffer); in eth_rx_desc_put()
119 cpu_to_le32s(&desc->next); in eth_rx_desc_put()
120 dma_memory_write(dma_as, addr, desc, sizeof(*desc), MEMTXATTRS_UNSPECIFIED); in eth_rx_desc_put()
124 mv88w8618_rx_desc *desc) in eth_rx_desc_get() argument
126 dma_memory_read(dma_as, addr, desc, sizeof(*desc), MEMTXATTRS_UNSPECIFIED); in eth_rx_desc_get()
127 le32_to_cpus(&desc->cmdstat); in eth_rx_desc_get()
128 le16_to_cpus(&desc->bytes); in eth_rx_desc_get()
129 le16_to_cpus(&desc->buffer_size); in eth_rx_desc_get()
130 le32_to_cpus(&desc->buffer); in eth_rx_desc_get()
131 le32_to_cpus(&desc->next); in eth_rx_desc_get()
138 mv88w8618_rx_desc desc; in eth_receive() local
147 eth_rx_desc_get(&s->dma_as, desc_addr, &desc); in eth_receive()
148 if ((desc.cmdstat & MP_ETH_RX_OWN) && desc.buffer_size >= size) { in eth_receive()
149 dma_memory_write(&s->dma_as, desc.buffer + s->vlan_header, in eth_receive()
151 desc.bytes = size + s->vlan_header; in eth_receive()
152 desc.cmdstat &= ~MP_ETH_RX_OWN; in eth_receive()
153 s->cur_rx[i] = desc.next; in eth_receive()
159 eth_rx_desc_put(&s->dma_as, desc_addr, &desc); in eth_receive()
162 desc_addr = desc.next; in eth_receive()
169 mv88w8618_tx_desc *desc) in eth_tx_desc_put() argument
171 cpu_to_le32s(&desc->cmdstat); in eth_tx_desc_put()
172 cpu_to_le16s(&desc->res); in eth_tx_desc_put()
173 cpu_to_le16s(&desc->bytes); in eth_tx_desc_put()
174 cpu_to_le32s(&desc->buffer); in eth_tx_desc_put()
175 cpu_to_le32s(&desc->next); in eth_tx_desc_put()
176 dma_memory_write(dma_as, addr, desc, sizeof(*desc), MEMTXATTRS_UNSPECIFIED); in eth_tx_desc_put()
180 mv88w8618_tx_desc *desc) in eth_tx_desc_get() argument
182 dma_memory_read(dma_as, addr, desc, sizeof(*desc), MEMTXATTRS_UNSPECIFIED); in eth_tx_desc_get()
183 le32_to_cpus(&desc->cmdstat); in eth_tx_desc_get()
184 le16_to_cpus(&desc->res); in eth_tx_desc_get()
185 le16_to_cpus(&desc->bytes); in eth_tx_desc_get()
186 le32_to_cpus(&desc->buffer); in eth_tx_desc_get()
187 le32_to_cpus(&desc->next); in eth_tx_desc_get()
193 mv88w8618_tx_desc desc; in eth_send() local
199 eth_tx_desc_get(&s->dma_as, desc_addr, &desc); in eth_send()
200 next_desc = desc.next; in eth_send()
201 if (desc.cmdstat & MP_ETH_TX_OWN) { in eth_send()
202 len = desc.bytes; in eth_send()
204 dma_memory_read(&s->dma_as, desc.buffer, buf, len, in eth_send()
208 desc.cmdstat &= ~MP_ETH_TX_OWN; in eth_send()
210 eth_tx_desc_put(&s->dma_as, desc_addr, &desc); in eth_send()