Lines Matching refs:hwdescr

264 spider_net_get_descr_status(struct spider_net_hw_descr *hwdescr)  in spider_net_get_descr_status()  argument
266 return hwdescr->dmac_cmd_status & SPIDER_NET_DESCR_IND_PROC_MASK; in spider_net_get_descr_status()
284 descr->hwdescr->next_descr_addr = 0; in spider_net_free_chain()
308 struct spider_net_hw_descr *hwdescr; in spider_net_init_chain() local
321 hwdescr = chain->hwring; in spider_net_init_chain()
323 for (i=0; i < chain->num_desc; i++, descr++, hwdescr++) { in spider_net_init_chain()
324 hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_init_chain()
325 hwdescr->next_descr_addr = 0; in spider_net_init_chain()
327 descr->hwdescr = hwdescr; in spider_net_init_chain()
359 descr->hwdescr->buf_addr, in spider_net_free_rx_chain_contents()
383 struct spider_net_hw_descr *hwdescr = descr->hwdescr; in spider_net_prepare_rx_descr() local
405 hwdescr->buf_size = bufsize; in spider_net_prepare_rx_descr()
406 hwdescr->result_size = 0; in spider_net_prepare_rx_descr()
407 hwdescr->valid_size = 0; in spider_net_prepare_rx_descr()
408 hwdescr->data_status = 0; in spider_net_prepare_rx_descr()
409 hwdescr->data_error = 0; in spider_net_prepare_rx_descr()
424 hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_prepare_rx_descr()
426 hwdescr->buf_addr = buf; in spider_net_prepare_rx_descr()
428 hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | in spider_net_prepare_rx_descr()
500 while (spider_net_get_descr_status(chain->head->hwdescr) == in spider_net_refill_rx_chain()
525 descr->prev->hwdescr->next_descr_addr = descr->bus_addr; in spider_net_alloc_rx_skbs()
654 struct spider_net_hw_descr *hwdescr; in spider_net_prepare_tx_descr() local
676 hwdescr = descr->hwdescr; in spider_net_prepare_tx_descr()
680 hwdescr->buf_addr = buf; in spider_net_prepare_tx_descr()
681 hwdescr->buf_size = skb->len; in spider_net_prepare_tx_descr()
682 hwdescr->next_descr_addr = 0; in spider_net_prepare_tx_descr()
683 hwdescr->data_status = 0; in spider_net_prepare_tx_descr()
685 hwdescr->dmac_cmd_status = in spider_net_prepare_tx_descr()
692 hwdescr->dmac_cmd_status |= SPIDER_NET_DMAC_TCP; in spider_net_prepare_tx_descr()
695 hwdescr->dmac_cmd_status |= SPIDER_NET_DMAC_UDP; in spider_net_prepare_tx_descr()
701 descr->prev->hwdescr->next_descr_addr = descr->bus_addr; in spider_net_prepare_tx_descr()
711 struct spider_net_hw_descr *hwdescr; in spider_net_set_low_watermark() local
721 status = descr->hwdescr->dmac_cmd_status & SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_set_low_watermark()
740 descr->hwdescr->dmac_cmd_status |= SPIDER_NET_DESCR_TXDESFLG; in spider_net_set_low_watermark()
742 hwdescr = card->low_watermark->hwdescr; in spider_net_set_low_watermark()
743 hwdescr->dmac_cmd_status = in spider_net_set_low_watermark()
744 hwdescr->dmac_cmd_status & ~SPIDER_NET_DESCR_TXDESFLG; in spider_net_set_low_watermark()
769 struct spider_net_hw_descr *hwdescr; in spider_net_release_tx_chain() local
782 hwdescr = descr->hwdescr; in spider_net_release_tx_chain()
784 status = spider_net_get_descr_status(hwdescr); in spider_net_release_tx_chain()
821 hwdescr->dmac_cmd_status |= SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_release_tx_chain()
824 buf_addr = hwdescr->buf_addr; in spider_net_release_tx_chain()
859 if (spider_net_get_descr_status(descr->hwdescr) == in spider_net_kick_tx_dma()
953 struct spider_net_hw_descr *hwdescr = descr->hwdescr; in spider_net_pass_skb_up() local
956 u32 data_status = hwdescr->data_status; in spider_net_pass_skb_up()
957 u32 data_error = hwdescr->data_error; in spider_net_pass_skb_up()
959 skb_put(skb, hwdescr->valid_size); in spider_net_pass_skb_up()
994 struct spider_net_hw_descr *hwd = start->hwdescr; in show_rx_chain()
1015 hwd = descr->hwdescr; in show_rx_chain()
1056 struct spider_net_hw_descr *hwd = descr->hwdescr; in show_rx_chain()
1096 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_head_ptr()
1104 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_head_ptr()
1108 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_head_ptr()
1123 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_tail_ptr()
1129 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_tail_ptr()
1155 struct spider_net_hw_descr *hwdescr = descr->hwdescr; in spider_net_decode_one_descr() local
1159 status = spider_net_get_descr_status(hwdescr); in spider_net_decode_one_descr()
1170 hw_buf_addr = hwdescr->buf_addr; in spider_net_decode_one_descr()
1171 hwdescr->buf_addr = 0xffffffff; in spider_net_decode_one_descr()
1195 if (hwdescr->data_error & SPIDER_NET_DESTROY_RX_FLAGS) { in spider_net_decode_one_descr()
1200 hwdescr->data_status, hwdescr->data_error); in spider_net_decode_one_descr()
1204 if (hwdescr->dmac_cmd_status & SPIDER_NET_DESCR_BAD_STATUS) { in spider_net_decode_one_descr()
1206 hwdescr->dmac_cmd_status); in spider_net_decode_one_descr()
1208 pr_err("buf_size=x%08x\n", hwdescr->buf_size); in spider_net_decode_one_descr()
1209 pr_err("next_descr_addr=x%08x\n", hwdescr->next_descr_addr); in spider_net_decode_one_descr()
1210 pr_err("result_size=x%08x\n", hwdescr->result_size); in spider_net_decode_one_descr()
1211 pr_err("valid_size=x%08x\n", hwdescr->valid_size); in spider_net_decode_one_descr()
1212 pr_err("data_status=x%08x\n", hwdescr->data_status); in spider_net_decode_one_descr()
1213 pr_err("data_error=x%08x\n", hwdescr->data_error); in spider_net_decode_one_descr()
1223 hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_decode_one_descr()
1231 hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_decode_one_descr()