Lines Matching refs:desc

170 static void ec_bhf_send_packet(struct ec_bhf_priv *priv, struct tx_desc *desc)  in ec_bhf_send_packet()  argument
172 u32 len = le16_to_cpu(desc->header.len) + sizeof(desc->header); in ec_bhf_send_packet()
173 u32 addr = (u8 *)desc - priv->tx_buf.buf; in ec_bhf_send_packet()
178 static int ec_bhf_desc_sent(struct tx_desc *desc) in ec_bhf_desc_sent() argument
180 return le32_to_cpu(desc->header.sent) & TX_HDR_SENT; in ec_bhf_desc_sent()
194 static int ec_bhf_pkt_received(struct rx_desc *desc) in ec_bhf_pkt_received() argument
196 return le32_to_cpu(desc->header.recv) & RXHDR_NEXT_RECV_FLAG; in ec_bhf_pkt_received()
199 static void ec_bhf_add_rx_desc(struct ec_bhf_priv *priv, struct rx_desc *desc) in ec_bhf_add_rx_desc() argument
201 iowrite32(FIFO_RX_ADDR_VALID | ((u8 *)(desc) - priv->rx_buf.buf), in ec_bhf_add_rx_desc()
207 struct rx_desc *desc = &priv->rx_descs[priv->rx_dnext]; in ec_bhf_process_rx() local
209 while (ec_bhf_pkt_received(desc)) { in ec_bhf_process_rx()
210 int pkt_size = (le16_to_cpu(desc->header.len) & in ec_bhf_process_rx()
212 u8 *data = desc->data; in ec_bhf_process_rx()
228 desc->header.recv = 0; in ec_bhf_process_rx()
230 ec_bhf_add_rx_desc(priv, desc); in ec_bhf_process_rx()
233 desc = &priv->rx_descs[priv->rx_dnext]; in ec_bhf_process_rx()
286 struct tx_desc *desc; in ec_bhf_start_xmit() local
289 desc = &priv->tx_descs[priv->tx_dnext]; in ec_bhf_start_xmit()
291 skb_copy_and_csum_dev(skb, desc->data); in ec_bhf_start_xmit()
294 memset(&desc->header, 0, sizeof(desc->header)); in ec_bhf_start_xmit()
295 desc->header.len = cpu_to_le16(len); in ec_bhf_start_xmit()
296 desc->header.port = TX_HDR_PORT_0; in ec_bhf_start_xmit()
298 ec_bhf_send_packet(priv, desc); in ec_bhf_start_xmit()
378 struct rx_desc *desc = &priv->rx_descs[i]; in ec_bhf_setup_rx_descs() local
382 next = (u8 *)(desc + 1) - priv->rx_buf.buf; in ec_bhf_setup_rx_descs()
386 desc->header.next = cpu_to_le32(next); in ec_bhf_setup_rx_descs()
387 desc->header.recv = 0; in ec_bhf_setup_rx_descs()
388 ec_bhf_add_rx_desc(priv, desc); in ec_bhf_setup_rx_descs()