tnapi             208 drivers/net/ethernet/broadcom/tg3.c #define TG3_TX_WAKEUP_THRESH(tnapi)		((tnapi)->tx_pending / 4)
tnapi            1023 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            1025 drivers/net/ethernet/broadcom/tg3.c 		tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
tnapi            1027 drivers/net/ethernet/broadcom/tg3.c 			tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
tnapi            1029 drivers/net/ethernet/broadcom/tg3.c 		tp->coal_now |= tnapi->coal_now;
tnapi            1042 drivers/net/ethernet/broadcom/tg3.c static inline unsigned int tg3_has_work(struct tg3_napi *tnapi)
tnapi            1044 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            1045 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_hw_status *sblk = tnapi->hw_status;
tnapi            1055 drivers/net/ethernet/broadcom/tg3.c 	if (sblk->idx[0].tx_consumer != tnapi->tx_cons)
tnapi            1059 drivers/net/ethernet/broadcom/tg3.c 	if (tnapi->rx_rcb_prod_idx &&
tnapi            1060 drivers/net/ethernet/broadcom/tg3.c 	    *(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr)
tnapi            1071 drivers/net/ethernet/broadcom/tg3.c static void tg3_int_reenable(struct tg3_napi *tnapi)
tnapi            1073 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            1075 drivers/net/ethernet/broadcom/tg3.c 	tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
tnapi            1081 drivers/net/ethernet/broadcom/tg3.c 	if (!tg3_flag(tp, TAGGED_STATUS) && tg3_has_work(tnapi))
tnapi            1083 drivers/net/ethernet/broadcom/tg3.c 		     HOSTCC_MODE_ENABLE | tnapi->coal_now);
tnapi            6486 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            6492 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->status,
tnapi            6493 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->status_tag,
tnapi            6494 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->rx_jumbo_consumer,
tnapi            6495 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->rx_consumer,
tnapi            6496 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->rx_mini_consumer,
tnapi            6497 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->idx[0].rx_producer,
tnapi            6498 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->hw_status->idx[0].tx_consumer);
tnapi            6503 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->last_tag, tnapi->last_irq_tag,
tnapi            6504 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->tx_prod, tnapi->tx_cons, tnapi->tx_pending,
tnapi            6505 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->rx_rcb_ptr,
tnapi            6506 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->prodring.rx_std_prod_idx,
tnapi            6507 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->prodring.rx_std_cons_idx,
tnapi            6508 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->prodring.rx_jmb_prod_idx,
tnapi            6509 drivers/net/ethernet/broadcom/tg3.c 			   tnapi->prodring.rx_jmb_cons_idx);
tnapi            6533 drivers/net/ethernet/broadcom/tg3.c static inline u32 tg3_tx_avail(struct tg3_napi *tnapi)
tnapi            6537 drivers/net/ethernet/broadcom/tg3.c 	return tnapi->tx_pending -
tnapi            6538 drivers/net/ethernet/broadcom/tg3.c 	       ((tnapi->tx_prod - tnapi->tx_cons) & (TG3_TX_RING_SIZE - 1));
tnapi            6545 drivers/net/ethernet/broadcom/tg3.c static void tg3_tx(struct tg3_napi *tnapi)
tnapi            6547 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            6548 drivers/net/ethernet/broadcom/tg3.c 	u32 hw_idx = tnapi->hw_status->idx[0].tx_consumer;
tnapi            6549 drivers/net/ethernet/broadcom/tg3.c 	u32 sw_idx = tnapi->tx_cons;
tnapi            6551 drivers/net/ethernet/broadcom/tg3.c 	int index = tnapi - tp->napi;
tnapi            6560 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_tx_ring_info *ri = &tnapi->tx_buffers[sw_idx];
tnapi            6569 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->tx_ring[sw_idx].len_flags & TXD_FLAG_HWTSTAMP) {
tnapi            6589 drivers/net/ethernet/broadcom/tg3.c 			ri = &tnapi->tx_buffers[sw_idx];
tnapi            6595 drivers/net/ethernet/broadcom/tg3.c 			ri = &tnapi->tx_buffers[sw_idx];
tnapi            6607 drivers/net/ethernet/broadcom/tg3.c 				ri = &tnapi->tx_buffers[sw_idx];
tnapi            6626 drivers/net/ethernet/broadcom/tg3.c 	tnapi->tx_cons = sw_idx;
tnapi            6636 drivers/net/ethernet/broadcom/tg3.c 		     (tg3_tx_avail(tnapi) > TG3_TX_WAKEUP_THRESH(tnapi)))) {
tnapi            6639 drivers/net/ethernet/broadcom/tg3.c 		    (tg3_tx_avail(tnapi) > TG3_TX_WAKEUP_THRESH(tnapi)))
tnapi            6748 drivers/net/ethernet/broadcom/tg3.c static void tg3_recycle_rx(struct tg3_napi *tnapi,
tnapi            6753 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            6818 drivers/net/ethernet/broadcom/tg3.c static int tg3_rx(struct tg3_napi *tnapi, int budget)
tnapi            6820 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            6823 drivers/net/ethernet/broadcom/tg3.c 	u32 sw_idx = tnapi->rx_rcb_ptr;
tnapi            6826 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_rx_prodring_set *tpr = &tnapi->prodring;
tnapi            6828 drivers/net/ethernet/broadcom/tg3.c 	hw_idx = *(tnapi->rx_rcb_prod_idx);
tnapi            6840 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_rx_buffer_desc *desc = &tnapi->rx_rcb[sw_idx];
tnapi            6868 drivers/net/ethernet/broadcom/tg3.c 			tg3_recycle_rx(tnapi, tpr, opaque_key,
tnapi            6914 drivers/net/ethernet/broadcom/tg3.c 			tg3_recycle_rx(tnapi, tpr, opaque_key,
tnapi            6957 drivers/net/ethernet/broadcom/tg3.c 		napi_gro_receive(&tnapi->napi, skb);
tnapi            6979 drivers/net/ethernet/broadcom/tg3.c 			hw_idx = *(tnapi->rx_rcb_prod_idx);
tnapi            6985 drivers/net/ethernet/broadcom/tg3.c 	tnapi->rx_rcb_ptr = sw_idx;
tnapi            6986 drivers/net/ethernet/broadcom/tg3.c 	tw32_rx_mbox(tnapi->consmbox, sw_idx);
tnapi            7014 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi != &tp->napi[1]) {
tnapi            7173 drivers/net/ethernet/broadcom/tg3.c static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget)
tnapi            7175 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7178 drivers/net/ethernet/broadcom/tg3.c 	if (tnapi->hw_status->idx[0].tx_consumer != tnapi->tx_cons) {
tnapi            7179 drivers/net/ethernet/broadcom/tg3.c 		tg3_tx(tnapi);
tnapi            7184 drivers/net/ethernet/broadcom/tg3.c 	if (!tnapi->rx_rcb_prod_idx)
tnapi            7191 drivers/net/ethernet/broadcom/tg3.c 	if (*(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr)
tnapi            7192 drivers/net/ethernet/broadcom/tg3.c 		work_done += tg3_rx(tnapi, budget - work_done);
tnapi            7194 drivers/net/ethernet/broadcom/tg3.c 	if (tg3_flag(tp, ENABLE_RSS) && tnapi == &tp->napi[1]) {
tnapi            7237 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = container_of(napi, struct tg3_napi, napi);
tnapi            7238 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7240 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_hw_status *sblk = tnapi->hw_status;
tnapi            7243 drivers/net/ethernet/broadcom/tg3.c 		work_done = tg3_poll_work(tnapi, work_done, budget);
tnapi            7255 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_tag = sblk->status_tag;
tnapi            7256 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_irq_tag = tnapi->last_tag;
tnapi            7260 drivers/net/ethernet/broadcom/tg3.c 		if (likely(sblk->idx[0].tx_consumer == tnapi->tx_cons &&
tnapi            7261 drivers/net/ethernet/broadcom/tg3.c 			   *(tnapi->rx_rcb_prod_idx) == tnapi->rx_rcb_ptr)) {
tnapi            7266 drivers/net/ethernet/broadcom/tg3.c 			if (tnapi == &tp->napi[1] && tp->rx_refill)
tnapi            7271 drivers/net/ethernet/broadcom/tg3.c 			tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
tnapi            7276 drivers/net/ethernet/broadcom/tg3.c 			if (unlikely(tnapi == &tp->napi[1] && tp->rx_refill)) {
tnapi            7279 drivers/net/ethernet/broadcom/tg3.c 						  tnapi->coal_now);
tnapi            7331 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = container_of(napi, struct tg3_napi, napi);
tnapi            7332 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7334 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_hw_status *sblk = tnapi->hw_status;
tnapi            7342 drivers/net/ethernet/broadcom/tg3.c 		work_done = tg3_poll_work(tnapi, work_done, budget);
tnapi            7355 drivers/net/ethernet/broadcom/tg3.c 			tnapi->last_tag = sblk->status_tag;
tnapi            7356 drivers/net/ethernet/broadcom/tg3.c 			tnapi->last_irq_tag = tnapi->last_tag;
tnapi            7361 drivers/net/ethernet/broadcom/tg3.c 		if (likely(!tg3_has_work(tnapi))) {
tnapi            7363 drivers/net/ethernet/broadcom/tg3.c 			tg3_int_reenable(tnapi);
tnapi            7479 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = dev_id;
tnapi            7480 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7482 drivers/net/ethernet/broadcom/tg3.c 	prefetch(tnapi->hw_status);
tnapi            7483 drivers/net/ethernet/broadcom/tg3.c 	if (tnapi->rx_rcb)
tnapi            7484 drivers/net/ethernet/broadcom/tg3.c 		prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
tnapi            7487 drivers/net/ethernet/broadcom/tg3.c 		napi_schedule(&tnapi->napi);
tnapi            7498 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = dev_id;
tnapi            7499 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7501 drivers/net/ethernet/broadcom/tg3.c 	prefetch(tnapi->hw_status);
tnapi            7502 drivers/net/ethernet/broadcom/tg3.c 	if (tnapi->rx_rcb)
tnapi            7503 drivers/net/ethernet/broadcom/tg3.c 		prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
tnapi            7511 drivers/net/ethernet/broadcom/tg3.c 	tw32_mailbox(tnapi->int_mbox, 0x00000001);
tnapi            7513 drivers/net/ethernet/broadcom/tg3.c 		napi_schedule(&tnapi->napi);
tnapi            7520 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = dev_id;
tnapi            7521 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7522 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_hw_status *sblk = tnapi->hw_status;
tnapi            7553 drivers/net/ethernet/broadcom/tg3.c 	if (likely(tg3_has_work(tnapi))) {
tnapi            7554 drivers/net/ethernet/broadcom/tg3.c 		prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
tnapi            7555 drivers/net/ethernet/broadcom/tg3.c 		napi_schedule(&tnapi->napi);
tnapi            7569 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = dev_id;
tnapi            7570 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7571 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_hw_status *sblk = tnapi->hw_status;
tnapi            7579 drivers/net/ethernet/broadcom/tg3.c 	if (unlikely(sblk->status_tag == tnapi->last_irq_tag)) {
tnapi            7606 drivers/net/ethernet/broadcom/tg3.c 	tnapi->last_irq_tag = sblk->status_tag;
tnapi            7611 drivers/net/ethernet/broadcom/tg3.c 	prefetch(&tnapi->rx_rcb[tnapi->rx_rcb_ptr]);
tnapi            7613 drivers/net/ethernet/broadcom/tg3.c 	napi_schedule(&tnapi->napi);
tnapi            7622 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = dev_id;
tnapi            7623 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7624 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_hw_status *sblk = tnapi->hw_status;
tnapi            7705 drivers/net/ethernet/broadcom/tg3.c static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget,
tnapi            7709 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7737 drivers/net/ethernet/broadcom/tg3.c 			tnapi->tx_buffers[*entry].fragmented = true;
tnapi            7739 drivers/net/ethernet/broadcom/tg3.c 			tg3_tx_set_bd(&tnapi->tx_ring[*entry], map,
tnapi            7750 drivers/net/ethernet/broadcom/tg3.c 				tg3_tx_set_bd(&tnapi->tx_ring[*entry], map,
tnapi            7756 drivers/net/ethernet/broadcom/tg3.c 				tnapi->tx_buffers[prvidx].fragmented = false;
tnapi            7760 drivers/net/ethernet/broadcom/tg3.c 		tg3_tx_set_bd(&tnapi->tx_ring[*entry], map,
tnapi            7768 drivers/net/ethernet/broadcom/tg3.c static void tg3_tx_skb_unmap(struct tg3_napi *tnapi, u32 entry, int last)
tnapi            7772 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_tx_ring_info *txb = &tnapi->tx_buffers[entry];
tnapi            7777 drivers/net/ethernet/broadcom/tg3.c 	pci_unmap_single(tnapi->tp->pdev,
tnapi            7785 drivers/net/ethernet/broadcom/tg3.c 		txb = &tnapi->tx_buffers[entry];
tnapi            7792 drivers/net/ethernet/broadcom/tg3.c 		txb = &tnapi->tx_buffers[entry];
tnapi            7794 drivers/net/ethernet/broadcom/tg3.c 		pci_unmap_page(tnapi->tp->pdev,
tnapi            7801 drivers/net/ethernet/broadcom/tg3.c 			txb = &tnapi->tx_buffers[entry];
tnapi            7807 drivers/net/ethernet/broadcom/tg3.c static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi,
tnapi            7812 drivers/net/ethernet/broadcom/tg3.c 	struct tg3 *tp = tnapi->tp;
tnapi            7842 drivers/net/ethernet/broadcom/tg3.c 			tnapi->tx_buffers[*entry].skb = new_skb;
tnapi            7843 drivers/net/ethernet/broadcom/tg3.c 			dma_unmap_addr_set(&tnapi->tx_buffers[*entry],
tnapi            7846 drivers/net/ethernet/broadcom/tg3.c 			if (tg3_tx_frag_set(tnapi, entry, budget, new_addr,
tnapi            7849 drivers/net/ethernet/broadcom/tg3.c 				tg3_tx_skb_unmap(tnapi, save_entry, -1);
tnapi            7861 drivers/net/ethernet/broadcom/tg3.c static bool tg3_tso_bug_gso_check(struct tg3_napi *tnapi, struct sk_buff *skb)
tnapi            7866 drivers/net/ethernet/broadcom/tg3.c 	return skb_shinfo(skb)->gso_segs < tnapi->tx_pending / 3;
tnapi            7874 drivers/net/ethernet/broadcom/tg3.c static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
tnapi            7881 drivers/net/ethernet/broadcom/tg3.c 	if (unlikely(tg3_tx_avail(tnapi) <= frag_cnt_est)) {
tnapi            7890 drivers/net/ethernet/broadcom/tg3.c 		if (tg3_tx_avail(tnapi) <= frag_cnt_est)
tnapi            7922 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi;
tnapi            7931 drivers/net/ethernet/broadcom/tg3.c 	tnapi = &tp->napi[skb_get_queue_mapping(skb)];
tnapi            7933 drivers/net/ethernet/broadcom/tg3.c 		tnapi++;
tnapi            7935 drivers/net/ethernet/broadcom/tg3.c 	budget = tg3_tx_avail(tnapi);
tnapi            7953 drivers/net/ethernet/broadcom/tg3.c 	entry = tnapi->tx_prod;
tnapi            7973 drivers/net/ethernet/broadcom/tg3.c 			if (tg3_tso_bug_gso_check(tnapi, skb))
tnapi            7974 drivers/net/ethernet/broadcom/tg3.c 				return tg3_tso_bug(tp, tnapi, txq, skb);
tnapi            7981 drivers/net/ethernet/broadcom/tg3.c 				if (tg3_tso_bug_gso_check(tnapi, skb))
tnapi            7982 drivers/net/ethernet/broadcom/tg3.c 					return tg3_tso_bug(tp, tnapi, txq, skb);
tnapi            8065 drivers/net/ethernet/broadcom/tg3.c 	tnapi->tx_buffers[entry].skb = skb;
tnapi            8066 drivers/net/ethernet/broadcom/tg3.c 	dma_unmap_addr_set(&tnapi->tx_buffers[entry], mapping, mapping);
tnapi            8073 drivers/net/ethernet/broadcom/tg3.c 	if (tg3_tx_frag_set(tnapi, &entry, &budget, mapping, len, base_flags |
tnapi            8096 drivers/net/ethernet/broadcom/tg3.c 			tnapi->tx_buffers[entry].skb = NULL;
tnapi            8097 drivers/net/ethernet/broadcom/tg3.c 			dma_unmap_addr_set(&tnapi->tx_buffers[entry], mapping,
tnapi            8103 drivers/net/ethernet/broadcom/tg3.c 			    tg3_tx_frag_set(tnapi, &entry, &budget, mapping,
tnapi            8114 drivers/net/ethernet/broadcom/tg3.c 		tg3_tx_skb_unmap(tnapi, tnapi->tx_prod, i);
tnapi            8116 drivers/net/ethernet/broadcom/tg3.c 		if (mss && tg3_tso_bug_gso_check(tnapi, skb)) {
tnapi            8125 drivers/net/ethernet/broadcom/tg3.c 			return tg3_tso_bug(tp, tnapi, txq, skb);
tnapi            8131 drivers/net/ethernet/broadcom/tg3.c 		entry = tnapi->tx_prod;
tnapi            8132 drivers/net/ethernet/broadcom/tg3.c 		budget = tg3_tx_avail(tnapi);
tnapi            8133 drivers/net/ethernet/broadcom/tg3.c 		if (tigon3_dma_hwbug_workaround(tnapi, &skb, &entry, &budget,
tnapi            8144 drivers/net/ethernet/broadcom/tg3.c 	tnapi->tx_prod = entry;
tnapi            8145 drivers/net/ethernet/broadcom/tg3.c 	if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
tnapi            8154 drivers/net/ethernet/broadcom/tg3.c 		if (tg3_tx_avail(tnapi) > TG3_TX_WAKEUP_THRESH(tnapi))
tnapi            8160 drivers/net/ethernet/broadcom/tg3.c 		tw32_tx_mbox(tnapi->prodmbox, entry);
tnapi            8166 drivers/net/ethernet/broadcom/tg3.c 	tg3_tx_skb_unmap(tnapi, tnapi->tx_prod, --i);
tnapi            8167 drivers/net/ethernet/broadcom/tg3.c 	tnapi->tx_buffers[tnapi->tx_prod].skb = NULL;
tnapi            8553 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[j];
tnapi            8555 drivers/net/ethernet/broadcom/tg3.c 		tg3_rx_prodring_free(tp, &tnapi->prodring);
tnapi            8557 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->tx_buffers)
tnapi            8561 drivers/net/ethernet/broadcom/tg3.c 			struct sk_buff *skb = tnapi->tx_buffers[i].skb;
tnapi            8566 drivers/net/ethernet/broadcom/tg3.c 			tg3_tx_skb_unmap(tnapi, i,
tnapi            8590 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8592 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_tag = 0;
tnapi            8593 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_irq_tag = 0;
tnapi            8594 drivers/net/ethernet/broadcom/tg3.c 		tnapi->hw_status->status = 0;
tnapi            8595 drivers/net/ethernet/broadcom/tg3.c 		tnapi->hw_status->status_tag = 0;
tnapi            8596 drivers/net/ethernet/broadcom/tg3.c 		memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
tnapi            8598 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_prod = 0;
tnapi            8599 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_cons = 0;
tnapi            8600 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->tx_ring)
tnapi            8601 drivers/net/ethernet/broadcom/tg3.c 			memset(tnapi->tx_ring, 0, TG3_TX_RING_BYTES);
tnapi            8603 drivers/net/ethernet/broadcom/tg3.c 		tnapi->rx_rcb_ptr = 0;
tnapi            8604 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->rx_rcb)
tnapi            8605 drivers/net/ethernet/broadcom/tg3.c 			memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
tnapi            8607 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->prodring.rx_std &&
tnapi            8608 drivers/net/ethernet/broadcom/tg3.c 		    tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
tnapi            8622 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8624 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->tx_ring) {
tnapi            8626 drivers/net/ethernet/broadcom/tg3.c 				tnapi->tx_ring, tnapi->tx_desc_mapping);
tnapi            8627 drivers/net/ethernet/broadcom/tg3.c 			tnapi->tx_ring = NULL;
tnapi            8630 drivers/net/ethernet/broadcom/tg3.c 		kfree(tnapi->tx_buffers);
tnapi            8631 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_buffers = NULL;
tnapi            8638 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = &tp->napi[0];
tnapi            8644 drivers/net/ethernet/broadcom/tg3.c 		tnapi++;
tnapi            8646 drivers/net/ethernet/broadcom/tg3.c 	for (i = 0; i < tp->txq_cnt; i++, tnapi++) {
tnapi            8647 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_buffers = kcalloc(TG3_TX_RING_SIZE,
tnapi            8650 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->tx_buffers)
tnapi            8653 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_ring = dma_alloc_coherent(&tp->pdev->dev,
tnapi            8655 drivers/net/ethernet/broadcom/tg3.c 						    &tnapi->tx_desc_mapping,
tnapi            8657 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->tx_ring)
tnapi            8673 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8675 drivers/net/ethernet/broadcom/tg3.c 		tg3_rx_prodring_fini(tp, &tnapi->prodring);
tnapi            8677 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->rx_rcb)
tnapi            8682 drivers/net/ethernet/broadcom/tg3.c 				  tnapi->rx_rcb,
tnapi            8683 drivers/net/ethernet/broadcom/tg3.c 				  tnapi->rx_rcb_mapping);
tnapi            8684 drivers/net/ethernet/broadcom/tg3.c 		tnapi->rx_rcb = NULL;
tnapi            8701 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8703 drivers/net/ethernet/broadcom/tg3.c 		if (tg3_rx_prodring_init(tp, &tnapi->prodring))
tnapi            8713 drivers/net/ethernet/broadcom/tg3.c 		tnapi->rx_rcb = dma_alloc_coherent(&tp->pdev->dev,
tnapi            8715 drivers/net/ethernet/broadcom/tg3.c 						   &tnapi->rx_rcb_mapping,
tnapi            8717 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->rx_rcb)
tnapi            8737 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8739 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->hw_status) {
tnapi            8741 drivers/net/ethernet/broadcom/tg3.c 					  tnapi->hw_status,
tnapi            8742 drivers/net/ethernet/broadcom/tg3.c 					  tnapi->status_mapping);
tnapi            8743 drivers/net/ethernet/broadcom/tg3.c 			tnapi->hw_status = NULL;
tnapi            8776 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8779 drivers/net/ethernet/broadcom/tg3.c 		tnapi->hw_status = dma_alloc_coherent(&tp->pdev->dev,
tnapi            8781 drivers/net/ethernet/broadcom/tg3.c 						      &tnapi->status_mapping,
tnapi            8783 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->hw_status)
tnapi            8786 drivers/net/ethernet/broadcom/tg3.c 		sblk = tnapi->hw_status;
tnapi            8811 drivers/net/ethernet/broadcom/tg3.c 			tnapi->rx_rcb_prod_idx = prodptr;
tnapi            8813 drivers/net/ethernet/broadcom/tg3.c 			tnapi->rx_rcb_prod_idx = &sblk->idx[0].rx_producer;
tnapi            8947 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            8948 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->hw_status)
tnapi            8949 drivers/net/ethernet/broadcom/tg3.c 			memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
tnapi            9114 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            9115 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->hw_status) {
tnapi            9116 drivers/net/ethernet/broadcom/tg3.c 			tnapi->hw_status->status = 0;
tnapi            9117 drivers/net/ethernet/broadcom/tg3.c 			tnapi->hw_status->status_tag = 0;
tnapi            9119 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_tag = 0;
tnapi            9120 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_irq_tag = 0;
tnapi            9550 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            9552 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->tx_ring)
tnapi            9555 drivers/net/ethernet/broadcom/tg3.c 		tg3_set_bdinfo(tp, txrcb, tnapi->tx_desc_mapping,
tnapi            9594 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            9596 drivers/net/ethernet/broadcom/tg3.c 		if (!tnapi->rx_rcb)
tnapi            9599 drivers/net/ethernet/broadcom/tg3.c 		tg3_set_bdinfo(tp, rxrcb, tnapi->rx_rcb_mapping,
tnapi            9610 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = &tp->napi[0];
tnapi            9652 drivers/net/ethernet/broadcom/tg3.c 	memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
tnapi            9656 drivers/net/ethernet/broadcom/tg3.c 	     ((u64) tnapi->status_mapping >> 32));
tnapi            9658 drivers/net/ethernet/broadcom/tg3.c 	     ((u64) tnapi->status_mapping & 0xffffffff));
tnapi            9662 drivers/net/ethernet/broadcom/tg3.c 	for (i = 1, tnapi++; i < tp->irq_cnt; i++, tnapi++) {
tnapi            9663 drivers/net/ethernet/broadcom/tg3.c 		u64 mapping = (u64)tnapi->status_mapping;
tnapi            9669 drivers/net/ethernet/broadcom/tg3.c 		memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE);
tnapi            10972 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            10974 drivers/net/ethernet/broadcom/tg3.c 		if (tg3_has_work(tnapi)) {
tnapi            10975 drivers/net/ethernet/broadcom/tg3.c 			if (tnapi->last_rx_cons == tnapi->rx_rcb_ptr &&
tnapi            10976 drivers/net/ethernet/broadcom/tg3.c 			    tnapi->last_tx_cons == tnapi->tx_cons) {
tnapi            10977 drivers/net/ethernet/broadcom/tg3.c 				if (tnapi->chk_msi_cnt < 1) {
tnapi            10978 drivers/net/ethernet/broadcom/tg3.c 					tnapi->chk_msi_cnt++;
tnapi            10981 drivers/net/ethernet/broadcom/tg3.c 				tg3_msi(0, tnapi);
tnapi            10984 drivers/net/ethernet/broadcom/tg3.c 		tnapi->chk_msi_cnt = 0;
tnapi            10985 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_rx_cons = tnapi->rx_rcb_ptr;
tnapi            10986 drivers/net/ethernet/broadcom/tg3.c 		tnapi->last_tx_cons = tnapi->tx_cons;
tnapi            11242 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = &tp->napi[irq_num];
tnapi            11247 drivers/net/ethernet/broadcom/tg3.c 		name = &tnapi->irq_lbl[0];
tnapi            11248 drivers/net/ethernet/broadcom/tg3.c 		if (tnapi->tx_buffers && tnapi->rx_rcb)
tnapi            11251 drivers/net/ethernet/broadcom/tg3.c 		else if (tnapi->tx_buffers)
tnapi            11254 drivers/net/ethernet/broadcom/tg3.c 		else if (tnapi->rx_rcb)
tnapi            11275 drivers/net/ethernet/broadcom/tg3.c 	return request_irq(tnapi->irq_vec, fn, flags, name, tnapi);
tnapi            11280 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi = &tp->napi[0];
tnapi            11290 drivers/net/ethernet/broadcom/tg3.c 	free_irq(tnapi->irq_vec, tnapi);
tnapi            11301 drivers/net/ethernet/broadcom/tg3.c 	err = request_irq(tnapi->irq_vec, tg3_test_isr,
tnapi            11302 drivers/net/ethernet/broadcom/tg3.c 			  IRQF_SHARED, dev->name, tnapi);
tnapi            11306 drivers/net/ethernet/broadcom/tg3.c 	tnapi->hw_status->status &= ~SD_STATUS_UPDATED;
tnapi            11310 drivers/net/ethernet/broadcom/tg3.c 	       tnapi->coal_now);
tnapi            11315 drivers/net/ethernet/broadcom/tg3.c 		int_mbox = tr32_mailbox(tnapi->int_mbox);
tnapi            11325 drivers/net/ethernet/broadcom/tg3.c 		    tnapi->hw_status->status_tag != tnapi->last_tag)
tnapi            11326 drivers/net/ethernet/broadcom/tg3.c 			tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
tnapi            11333 drivers/net/ethernet/broadcom/tg3.c 	free_irq(tnapi->irq_vec, tnapi);
tnapi            11599 drivers/net/ethernet/broadcom/tg3.c 				struct tg3_napi *tnapi = &tp->napi[i];
tnapi            11601 drivers/net/ethernet/broadcom/tg3.c 				free_irq(tnapi->irq_vec, tnapi);
tnapi            11670 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            11671 drivers/net/ethernet/broadcom/tg3.c 		free_irq(tnapi->irq_vec, tnapi);
tnapi            11709 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            11710 drivers/net/ethernet/broadcom/tg3.c 		free_irq(tnapi->irq_vec, tnapi);
tnapi            13436 drivers/net/ethernet/broadcom/tg3.c 	struct tg3_napi *tnapi, *rnapi;
tnapi            13439 drivers/net/ethernet/broadcom/tg3.c 	tnapi = &tp->napi[0];
tnapi            13445 drivers/net/ethernet/broadcom/tg3.c 			tnapi = &tp->napi[1];
tnapi            13447 drivers/net/ethernet/broadcom/tg3.c 	coal_now = tnapi->coal_now | rnapi->coal_now;
tnapi            13524 drivers/net/ethernet/broadcom/tg3.c 	val = tnapi->tx_prod;
tnapi            13525 drivers/net/ethernet/broadcom/tg3.c 	tnapi->tx_buffers[val].skb = skb;
tnapi            13526 drivers/net/ethernet/broadcom/tg3.c 	dma_unmap_addr_set(&tnapi->tx_buffers[val], mapping, map);
tnapi            13535 drivers/net/ethernet/broadcom/tg3.c 	budget = tg3_tx_avail(tnapi);
tnapi            13536 drivers/net/ethernet/broadcom/tg3.c 	if (tg3_tx_frag_set(tnapi, &val, &budget, map, tx_len,
tnapi            13538 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_buffers[val].skb = NULL;
tnapi            13543 drivers/net/ethernet/broadcom/tg3.c 	tnapi->tx_prod++;
tnapi            13548 drivers/net/ethernet/broadcom/tg3.c 	tw32_tx_mbox(tnapi->prodmbox, tnapi->tx_prod);
tnapi            13549 drivers/net/ethernet/broadcom/tg3.c 	tr32_mailbox(tnapi->prodmbox);
tnapi            13560 drivers/net/ethernet/broadcom/tg3.c 		tx_idx = tnapi->hw_status->idx[0].tx_consumer;
tnapi            13562 drivers/net/ethernet/broadcom/tg3.c 		if ((tx_idx == tnapi->tx_prod) &&
tnapi            13567 drivers/net/ethernet/broadcom/tg3.c 	tg3_tx_skb_unmap(tnapi, tnapi->tx_prod - 1, -1);
tnapi            13570 drivers/net/ethernet/broadcom/tg3.c 	if (tx_idx != tnapi->tx_prod)
tnapi            17864 drivers/net/ethernet/broadcom/tg3.c 		struct tg3_napi *tnapi = &tp->napi[i];
tnapi            17866 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tp = tp;
tnapi            17867 drivers/net/ethernet/broadcom/tg3.c 		tnapi->tx_pending = TG3_DEF_TX_RING_PENDING;
tnapi            17869 drivers/net/ethernet/broadcom/tg3.c 		tnapi->int_mbox = intmbx;
tnapi            17875 drivers/net/ethernet/broadcom/tg3.c 		tnapi->consmbox = rcvmbx;
tnapi            17876 drivers/net/ethernet/broadcom/tg3.c 		tnapi->prodmbox = sndmbx;
tnapi            17879 drivers/net/ethernet/broadcom/tg3.c 			tnapi->coal_now = HOSTCC_MODE_COAL_VEC1_NOW << (i - 1);
tnapi            17881 drivers/net/ethernet/broadcom/tg3.c 			tnapi->coal_now = HOSTCC_MODE_NOW;