Lines Matching refs:descr

316 	struct spider_net_descr *descr;  in spider_net_free_chain()  local
318 descr = chain->ring; in spider_net_free_chain()
320 descr->bus_addr = 0; in spider_net_free_chain()
321 descr->hwdescr->next_descr_addr = 0; in spider_net_free_chain()
322 descr = descr->next; in spider_net_free_chain()
323 } while (descr != chain->ring); in spider_net_free_chain()
344 struct spider_net_descr *descr; in spider_net_init_chain() local
360 descr = chain->ring; in spider_net_init_chain()
363 for (i=0; i < chain->num_desc; i++, descr++, hwdescr++) { in spider_net_init_chain()
367 descr->hwdescr = hwdescr; in spider_net_init_chain()
368 descr->bus_addr = buf; in spider_net_init_chain()
369 descr->next = descr + 1; in spider_net_init_chain()
370 descr->prev = descr - 1; in spider_net_init_chain()
375 (descr-1)->next = chain->ring; in spider_net_init_chain()
376 chain->ring->prev = descr-1; in spider_net_init_chain()
393 struct spider_net_descr *descr; in spider_net_free_rx_chain_contents() local
395 descr = card->rx_chain.head; in spider_net_free_rx_chain_contents()
397 if (descr->skb) { in spider_net_free_rx_chain_contents()
398 pci_unmap_single(card->pdev, descr->hwdescr->buf_addr, in spider_net_free_rx_chain_contents()
401 dev_kfree_skb(descr->skb); in spider_net_free_rx_chain_contents()
402 descr->skb = NULL; in spider_net_free_rx_chain_contents()
404 descr = descr->next; in spider_net_free_rx_chain_contents()
405 } while (descr != card->rx_chain.head); in spider_net_free_rx_chain_contents()
420 struct spider_net_descr *descr) in spider_net_prepare_rx_descr() argument
422 struct spider_net_hw_descr *hwdescr = descr->hwdescr; in spider_net_prepare_rx_descr()
434 descr->skb = netdev_alloc_skb(card->netdev, in spider_net_prepare_rx_descr()
436 if (!descr->skb) { in spider_net_prepare_rx_descr()
449 offset = ((unsigned long)descr->skb->data) & in spider_net_prepare_rx_descr()
452 skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset); in spider_net_prepare_rx_descr()
454 buf = pci_map_single(card->pdev, descr->skb->data, in spider_net_prepare_rx_descr()
457 dev_kfree_skb_any(descr->skb); in spider_net_prepare_rx_descr()
458 descr->skb = NULL; in spider_net_prepare_rx_descr()
558 struct spider_net_descr *descr = start; in spider_net_alloc_rx_skbs() local
562 descr->prev->hwdescr->next_descr_addr = descr->bus_addr; in spider_net_alloc_rx_skbs()
563 descr = descr->next; in spider_net_alloc_rx_skbs()
564 } while (descr != start); in spider_net_alloc_rx_skbs()
688 struct spider_net_descr *descr; in spider_net_prepare_tx_descr() local
703 descr = card->tx_chain.head; in spider_net_prepare_tx_descr()
704 if (descr->next == chain->tail->prev) { in spider_net_prepare_tx_descr()
709 hwdescr = descr->hwdescr; in spider_net_prepare_tx_descr()
710 chain->head = descr->next; in spider_net_prepare_tx_descr()
712 descr->skb = skb; in spider_net_prepare_tx_descr()
734 descr->prev->hwdescr->next_descr_addr = descr->bus_addr; in spider_net_prepare_tx_descr()
743 struct spider_net_descr *descr = card->tx_chain.tail; in spider_net_set_low_watermark() local
752 while (descr != card->tx_chain.head) { in spider_net_set_low_watermark()
753 status = descr->hwdescr->dmac_cmd_status & SPIDER_NET_DESCR_NOT_IN_USE; in spider_net_set_low_watermark()
756 descr = descr->next; in spider_net_set_low_watermark()
765 descr = card->tx_chain.tail; in spider_net_set_low_watermark()
768 descr = descr->next; in spider_net_set_low_watermark()
772 descr->hwdescr->dmac_cmd_status |= SPIDER_NET_DESCR_TXDESFLG; in spider_net_set_low_watermark()
773 if (card->low_watermark && card->low_watermark != descr) { in spider_net_set_low_watermark()
778 card->low_watermark = descr; in spider_net_set_low_watermark()
800 struct spider_net_descr *descr; in spider_net_release_tx_chain() local
813 descr = chain->tail; in spider_net_release_tx_chain()
814 hwdescr = descr->hwdescr; in spider_net_release_tx_chain()
820 dev->stats.tx_bytes += descr->skb->len; in spider_net_release_tx_chain()
850 chain->tail = descr->next; in spider_net_release_tx_chain()
852 skb = descr->skb; in spider_net_release_tx_chain()
853 descr->skb = NULL; in spider_net_release_tx_chain()
881 struct spider_net_descr *descr; in spider_net_kick_tx_dma() local
887 descr = card->tx_chain.tail; in spider_net_kick_tx_dma()
889 if (spider_net_get_descr_status(descr->hwdescr) == in spider_net_kick_tx_dma()
892 descr->bus_addr); in spider_net_kick_tx_dma()
897 if (descr == card->tx_chain.head) in spider_net_kick_tx_dma()
899 descr = descr->next; in spider_net_kick_tx_dma()
979 spider_net_pass_skb_up(struct spider_net_descr *descr, in spider_net_pass_skb_up() argument
982 struct spider_net_hw_descr *hwdescr = descr->hwdescr; in spider_net_pass_skb_up()
983 struct sk_buff *skb = descr->skb; in spider_net_pass_skb_up()
1025 struct spider_net_descr *descr= start; in show_rx_chain() local
1047 hwd = descr->hwdescr; in show_rx_chain()
1048 off = descr - chain->ring; in show_rx_chain()
1051 if (descr == chain->head) in show_rx_chain()
1055 if (curr_desc == descr->bus_addr) in show_rx_chain()
1059 if (next_desc == descr->bus_addr) in show_rx_chain()
1077 descr = descr->next; in show_rx_chain()
1078 } while (descr != start); in show_rx_chain()
1085 descr = start; in show_rx_chain()
1088 struct spider_net_hw_descr *hwd = descr->hwdescr; in show_rx_chain()
1090 cnt = descr - chain->ring; in show_rx_chain()
1092 cnt, status, descr->skb); in show_rx_chain()
1094 descr->bus_addr, hwd->buf_addr, hwd->buf_size); in show_rx_chain()
1103 descr = descr->next; in show_rx_chain()
1104 } while (descr != start); in show_rx_chain()
1122 struct spider_net_descr *descr; in spider_net_resync_head_ptr() local
1126 descr = chain->head; in spider_net_resync_head_ptr()
1127 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_head_ptr()
1134 descr = chain->head; in spider_net_resync_head_ptr()
1135 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_head_ptr()
1138 descr = descr->next; in spider_net_resync_head_ptr()
1139 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_head_ptr()
1141 chain->head = descr; in spider_net_resync_head_ptr()
1149 struct spider_net_descr *descr; in spider_net_resync_tail_ptr() local
1153 descr = chain->tail; in spider_net_resync_tail_ptr()
1154 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_tail_ptr()
1159 descr = descr->next; in spider_net_resync_tail_ptr()
1160 status = spider_net_get_descr_status(descr->hwdescr); in spider_net_resync_tail_ptr()
1162 chain->tail = descr; in spider_net_resync_tail_ptr()
1185 struct spider_net_descr *descr = chain->tail; in spider_net_decode_one_descr() local
1186 struct spider_net_hw_descr *hwdescr = descr->hwdescr; in spider_net_decode_one_descr()
1198 chain->tail = descr->next; in spider_net_decode_one_descr()
1245 pr_err("which=%ld\n", descr - card->rx_chain.ring); in spider_net_decode_one_descr()
1252 spider_net_pass_skb_up(descr, card); in spider_net_decode_one_descr()
1253 descr->skb = NULL; in spider_net_decode_one_descr()
1260 dev_kfree_skb_irq(descr->skb); in spider_net_decode_one_descr()
1261 descr->skb = NULL; in spider_net_decode_one_descr()