bnad              104 drivers/net/ethernet/brocade/bna/bna.h 		void (*cbfn)(struct bnad *, struct bna_rx *);	\
bnad              105 drivers/net/ethernet/brocade/bna/bna.h 		struct bnad *cbarg;					\
bnad              260 drivers/net/ethernet/brocade/bna/bna.h void bna_init(struct bna *bna, struct bnad *bnad,
bnad              308 drivers/net/ethernet/brocade/bna/bna.h struct bna_tx *bna_tx_create(struct bna *bna, struct bnad *bnad,
bnad              345 drivers/net/ethernet/brocade/bna/bna.h struct bna_rx *bna_rx_create(struct bna *bna, struct bnad *bnad,
bnad              361 drivers/net/ethernet/brocade/bna/bna.h 				    void (*cbfn)(struct bnad *,
bnad              391 drivers/net/ethernet/brocade/bna/bna.h 		      void (*cbfn)(struct bnad *));
bnad              404 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_ethport_link_status(struct bnad *bnad,
bnad              408 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_ioceth_ready(struct bnad *bnad);
bnad              409 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_ioceth_failed(struct bnad *bnad);
bnad              410 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_ioceth_disabled(struct bnad *bnad);
bnad              411 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_mbox_intr_enable(struct bnad *bnad);
bnad              412 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_mbox_intr_disable(struct bnad *bnad);
bnad              415 drivers/net/ethernet/brocade/bna/bna.h void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status,
bnad              119 drivers/net/ethernet/brocade/bna/bna_enet.c 		ethport->link_cbfn(ethport->bna->bnad, BNA_LINK_DOWN);
bnad              229 drivers/net/ethernet/brocade/bna/bna_enet.c 	bnad_cb_stats_get(bna->bnad, BNA_CB_SUCCESS, &bna->stats);
bnad              239 drivers/net/ethernet/brocade/bna/bna_enet.c 	ethport->link_cbfn(ethport->bna->bnad, ethport->link_status);
bnad              249 drivers/net/ethernet/brocade/bna/bna_enet.c 	ethport->link_cbfn(ethport->bna->bnad, BNA_LINK_DOWN);
bnad              397 drivers/net/ethernet/brocade/bna/bna_enet.c 		void (*cbfn)(struct bnad *, enum bna_cb_status);	\
bnad              400 drivers/net/ethernet/brocade/bna/bna_enet.c 		cbfn((ethport)->bna->bnad, status);			\
bnad              773 drivers/net/ethernet/brocade/bna/bna_enet.c 		ethport->link_cbfn(ethport->bna->bnad, BNA_LINK_DOWN);
bnad              882 drivers/net/ethernet/brocade/bna/bna_enet.c 		void (*cbfn)(struct bnad *);				\
bnad              885 drivers/net/ethernet/brocade/bna/bna_enet.c 		cbfn((enet)->bna->bnad);				\
bnad             1274 drivers/net/ethernet/brocade/bna/bna_enet.c 		(*cbfn)(enet->bna->bnad);
bnad             1279 drivers/net/ethernet/brocade/bna/bna_enet.c 	enet->stop_cbarg = enet->bna->bnad;
bnad             1297 drivers/net/ethernet/brocade/bna/bna_enet.c 		 void (*cbfn)(struct bnad *))
bnad             1318 drivers/net/ethernet/brocade/bna/bna_enet.c 	bnad_cb_mbox_intr_enable((_ioceth)->bna->bnad);			\
bnad             1325 drivers/net/ethernet/brocade/bna/bna_enet.c 	bnad_cb_mbox_intr_disable((_ioceth)->bna->bnad);		\
bnad             1331 drivers/net/ethernet/brocade/bna/bna_enet.c 		void (*cbfn)(struct bnad *);				\
bnad             1332 drivers/net/ethernet/brocade/bna/bna_enet.c 		struct bnad *cbarg;					\
bnad             1486 drivers/net/ethernet/brocade/bna/bna_enet.c 	bnad_cb_ioceth_ready(ioceth->bna->bnad);
bnad             1593 drivers/net/ethernet/brocade/bna/bna_enet.c 	bnad_cb_ioceth_failed(ioceth->bna->bnad);
bnad             1755 drivers/net/ethernet/brocade/bna/bna_enet.c 		bnad_cb_ioceth_ready(ioceth->bna->bnad);
bnad             1767 drivers/net/ethernet/brocade/bna/bna_enet.c 		bnad_cb_ioceth_disabled(ioceth->bna->bnad);
bnad             1772 drivers/net/ethernet/brocade/bna/bna_enet.c 	ioceth->stop_cbarg = ioceth->bna->bnad;
bnad             1966 drivers/net/ethernet/brocade/bna/bna_enet.c bna_init(struct bna *bna, struct bnad *bnad,
bnad             1969 drivers/net/ethernet/brocade/bna/bna_enet.c 	bna->bnad = bnad;
bnad             2022 drivers/net/ethernet/brocade/bna/bna_enet.c 	bna->bnad = NULL;
bnad             2085 drivers/net/ethernet/brocade/bna/bna_enet.c 		bnad_cb_stats_get(bna->bnad, BNA_CB_FAIL, &bna->stats);
bnad             2089 drivers/net/ethernet/brocade/bna/bna_enet.c 		bnad_cb_stats_get(bna->bnad, BNA_CB_BUSY, &bna->stats);
bnad              738 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	rxf->cam_fltr_cbarg = rx->bna->bnad;
bnad              747 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		 void (*cbfn)(struct bnad *, struct bna_rx *))
bnad              756 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			cbfn(rx->bna->bnad, rx);
bnad              767 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	rxf->cam_fltr_cbarg = rx->bna->bnad;
bnad             1286 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		(rx)->rx_stall_cbfn((rx)->bna->bnad, (rx));		\
bnad             1370 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rx->rx_cleanup_cbfn(rx->bna->bnad, rx);
bnad             1407 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	rx->rx_post_cbfn(rx->bna->bnad, rx);
bnad             1424 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rx->rx_cleanup_cbfn(rx->bna->bnad, rx);
bnad             1495 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rx->rx_cleanup_cbfn(rx->bna->bnad, rx);
bnad             1516 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rx->rx_cleanup_cbfn(rx->bna->bnad, rx);
bnad             2250 drivers/net/ethernet/brocade/bna/bna_tx_rx.c bna_rx_create(struct bna *bna, struct bnad *bnad,
bnad             2391 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		q0->rcb->bnad = bna->bnad;
bnad             2401 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			rx->rcb_setup_cbfn(bnad, q0->rcb);
bnad             2417 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			q1->rcb->bnad = bna->bnad;
bnad             2431 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 				rx->rcb_setup_cbfn(bnad, q1->rcb);
bnad             2461 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rxp->cq.ccb->bnad = bna->bnad;
bnad             2468 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			rx->ccb_setup_cbfn(bnad, rxp->cq.ccb);
bnad             2498 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			rx->rcb_destroy_cbfn(rx->bna->bnad, q0->rcb);
bnad             2506 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 				rx->rcb_destroy_cbfn(rx->bna->bnad, q1->rcb);
bnad             2516 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			rx->ccb_destroy_cbfn(rx->bna->bnad, rxp->cq.ccb);
bnad             2552 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		(*cbfn)(rx->bna->bnad, rx);
bnad             2555 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rx->stop_cbarg = rx->bna->bnad;
bnad             2651 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		rxf->cam_fltr_cbarg = rx->bna->bnad;
bnad             2878 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	tx->tx_resume_cbfn(tx->bna->bnad, tx);
bnad             2887 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		tx->tx_stall_cbfn(tx->bna->bnad, tx);
bnad             2893 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		tx->tx_stall_cbfn(tx->bna->bnad, tx);
bnad             2894 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		tx->tx_cleanup_cbfn(tx->bna->bnad, tx);
bnad             2918 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		tx->tx_cleanup_cbfn(tx->bna->bnad, tx);
bnad             2964 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	tx->tx_stall_cbfn(tx->bna->bnad, tx);
bnad             2978 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		tx->tx_cleanup_cbfn(tx->bna->bnad, tx);
bnad             2997 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	tx->tx_cleanup_cbfn(tx->bna->bnad, tx);
bnad             3363 drivers/net/ethernet/brocade/bna/bna_tx_rx.c bna_tx_create(struct bna *bna, struct bnad *bnad,
bnad             3475 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		txq->tcb->bnad = bnad;
bnad             3487 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			(tx->tcb_setup_cbfn)(bna->bnad, txq->tcb);
bnad             3517 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 			(tx->tcb_destroy_cbfn)(tx->bna->bnad, txq->tcb);
bnad             3540 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 		(*cbfn)(tx->bna->bnad, tx);
bnad             3545 drivers/net/ethernet/brocade/bna/bna_tx_rx.c 	tx->stop_cbarg = tx->bna->bnad;
bnad               30 drivers/net/ethernet/brocade/bna/bna_types.h struct bnad;
bnad              323 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*stop_cbfn)(struct bnad *bnad);
bnad              324 drivers/net/ethernet/brocade/bna/bna_types.h 	struct bnad *stop_cbarg;
bnad              351 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*mtu_cbfn)(struct bnad *);
bnad              373 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*adminup_cbfn)(struct bnad *, enum bna_cb_status);
bnad              375 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*link_cbfn)(struct bnad *, enum bna_link_status);
bnad              427 drivers/net/ethernet/brocade/bna/bna_types.h 	struct bnad *bnad;
bnad              473 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tcb_setup_cbfn)(struct bnad *, struct bna_tcb *);
bnad              474 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tcb_destroy_cbfn)(struct bnad *, struct bna_tcb *);
bnad              475 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tx_stall_cbfn)(struct bnad *, struct bna_tx *);
bnad              476 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tx_resume_cbfn)(struct bnad *, struct bna_tx *);
bnad              477 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tx_cleanup_cbfn)(struct bnad *, struct bna_tx *);
bnad              504 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tcb_setup_cbfn)(struct bnad *, struct bna_tcb *);
bnad              505 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tcb_destroy_cbfn)(struct bnad *, struct bna_tcb *);
bnad              507 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tx_stall_cbfn)(struct bnad *, struct bna_tx *);
bnad              508 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tx_resume_cbfn)(struct bnad *, struct bna_tx *);
bnad              509 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*tx_cleanup_cbfn)(struct bnad *, struct bna_tx *);
bnad              555 drivers/net/ethernet/brocade/bna/bna_types.h 	struct bnad *bnad;
bnad              624 drivers/net/ethernet/brocade/bna/bna_types.h 	struct bnad *bnad;
bnad              730 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*cam_fltr_cbfn)(struct bnad *bnad, struct bna_rx *rx);
bnad              731 drivers/net/ethernet/brocade/bna/bna_types.h 	struct bnad *cam_fltr_cbarg;
bnad              799 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rcb_setup_cbfn)(struct bnad *, struct bna_rcb *);
bnad              800 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rcb_destroy_cbfn)(struct bnad *, struct bna_rcb *);
bnad              801 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*ccb_setup_cbfn)(struct bnad *, struct bna_ccb *);
bnad              802 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*ccb_destroy_cbfn)(struct bnad *, struct bna_ccb *);
bnad              803 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rx_stall_cbfn)(struct bnad *, struct bna_rx *);
bnad              804 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rx_cleanup_cbfn)(struct bnad *, struct bna_rx *);
bnad              805 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rx_post_cbfn)(struct bnad *, struct bna_rx *);
bnad              817 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rcb_setup_cbfn)(struct bnad *, struct bna_rcb *);
bnad              818 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rcb_destroy_cbfn)(struct bnad *, struct bna_rcb *);
bnad              819 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*ccb_setup_cbfn)(struct bnad *, struct bna_ccb *);
bnad              820 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*ccb_destroy_cbfn)(struct bnad *, struct bna_ccb *);
bnad              821 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rx_stall_cbfn)(struct bnad *, struct bna_rx *);
bnad              823 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rx_cleanup_cbfn)(struct bnad *, struct bna_rx *);
bnad              824 drivers/net/ethernet/brocade/bna/bna_types.h 	void (*rx_post_cbfn)(struct bnad *, struct bna_rx *);
bnad              929 drivers/net/ethernet/brocade/bna/bna_types.h 	struct bnad *bnad;
bnad               73 drivers/net/ethernet/brocade/bna/bnad.c bnad_cq_cleanup(struct bnad *bnad, struct bna_ccb *ccb)
bnad               89 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_buff_unmap(struct bnad *bnad,
bnad              103 drivers/net/ethernet/brocade/bna/bnad.c 	dma_unmap_single(&bnad->pcidev->dev,
bnad              118 drivers/net/ethernet/brocade/bna/bnad.c 		dma_unmap_page(&bnad->pcidev->dev,
bnad              137 drivers/net/ethernet/brocade/bna/bnad.c bnad_txq_cleanup(struct bnad *bnad, struct bna_tcb *tcb)
bnad              147 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_tx_buff_unmap(bnad, unmap_q, tcb->q_depth, i);
bnad              159 drivers/net/ethernet/brocade/bna/bnad.c bnad_txcmpl_process(struct bnad *bnad, struct bna_tcb *tcb)
bnad              190 drivers/net/ethernet/brocade/bna/bnad.c 		cons = bnad_tx_buff_unmap(bnad, unmap_q, q_depth, cons);
bnad              204 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_complete(struct bnad *bnad, struct bna_tcb *tcb)
bnad              206 drivers/net/ethernet/brocade/bna/bnad.c 	struct net_device *netdev = bnad->netdev;
bnad              212 drivers/net/ethernet/brocade/bna/bnad.c 	sent = bnad_txcmpl_process(bnad, tcb);
bnad              220 drivers/net/ethernet/brocade/bna/bnad.c 				BNAD_UPDATE_CTR(bnad, netif_queue_wakeup);
bnad              239 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = tcb->bnad;
bnad              241 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_tx_complete(bnad, tcb);
bnad              247 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_alloc_uninit(struct bnad *bnad, struct bna_rcb *rcb)
bnad              259 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_alloc_init(struct bnad *bnad, struct bna_rcb *rcb)
bnad              264 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_rxq_alloc_uninit(bnad, rcb);
bnad              292 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_cleanup_page(struct bnad *bnad, struct bnad_rx_unmap *unmap)
bnad              297 drivers/net/ethernet/brocade/bna/bnad.c 	dma_unmap_page(&bnad->pcidev->dev,
bnad              307 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_cleanup_skb(struct bnad *bnad, struct bnad_rx_unmap *unmap)
bnad              312 drivers/net/ethernet/brocade/bna/bnad.c 	dma_unmap_single(&bnad->pcidev->dev,
bnad              322 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_cleanup(struct bnad *bnad, struct bna_rcb *rcb)
bnad              331 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_cleanup_skb(bnad, unmap);
bnad              333 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_cleanup_page(bnad, unmap);
bnad              335 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_rxq_alloc_uninit(bnad, rcb);
bnad              339 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_refill_page(struct bnad *bnad, struct bna_rcb *rcb, u32 nalloc)
bnad              370 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, rxbuf_alloc_failed);
bnad              375 drivers/net/ethernet/brocade/bna/bnad.c 		dma_addr = dma_map_page(&bnad->pcidev->dev, page, page_offset,
bnad              377 drivers/net/ethernet/brocade/bna/bnad.c 		if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
bnad              379 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, rxbuf_map_failed);
bnad              413 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_refill_skb(struct bnad *bnad, struct bna_rcb *rcb, u32 nalloc)
bnad              430 drivers/net/ethernet/brocade/bna/bnad.c 		skb = netdev_alloc_skb_ip_align(bnad->netdev, buff_sz);
bnad              433 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, rxbuf_alloc_failed);
bnad              438 drivers/net/ethernet/brocade/bna/bnad.c 		dma_addr = dma_map_single(&bnad->pcidev->dev, skb->data,
bnad              440 drivers/net/ethernet/brocade/bna/bnad.c 		if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
bnad              442 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, rxbuf_map_failed);
bnad              469 drivers/net/ethernet/brocade/bna/bnad.c bnad_rxq_post(struct bnad *bnad, struct bna_rcb *rcb)
bnad              479 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_rxq_refill_skb(bnad, rcb, to_alloc);
bnad              481 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_rxq_refill_page(bnad, rcb, to_alloc);
bnad              499 drivers/net/ethernet/brocade/bna/bnad.c bnad_cq_drop_packet(struct bnad *bnad, struct bna_rcb *rcb,
bnad              512 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_cleanup_skb(bnad, unmap);
bnad              514 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_cleanup_page(bnad, unmap);
bnad              522 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad;
bnad              533 drivers/net/ethernet/brocade/bna/bnad.c 	bnad = rcb->bnad;
bnad              547 drivers/net/ethernet/brocade/bna/bnad.c 		dma_unmap_page(&bnad->pcidev->dev,
bnad              570 drivers/net/ethernet/brocade/bna/bnad.c bnad_cq_setup_skb(struct bnad *bnad, struct sk_buff *skb,
bnad              575 drivers/net/ethernet/brocade/bna/bnad.c 	dma_unmap_single(&bnad->pcidev->dev,
bnad              580 drivers/net/ethernet/brocade/bna/bnad.c 	skb->protocol = eth_type_trans(skb, bnad->netdev);
bnad              587 drivers/net/ethernet/brocade/bna/bnad.c bnad_cq_process(struct bnad *bnad, struct bna_ccb *ccb, int budget)
bnad              600 drivers/net/ethernet/brocade/bna/bnad.c 	prefetch(bnad->netdev);
bnad              683 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_cq_drop_packet(bnad, rcb, sop_ci, nvecs);
bnad              690 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_cq_setup_skb(bnad, skb, unmap, len);
bnad              701 drivers/net/ethernet/brocade/bna/bnad.c 		    ((bnad->netdev->features & NETIF_F_RXCSUM) &&
bnad              711 drivers/net/ethernet/brocade/bna/bnad.c 		    (bnad->netdev->features & NETIF_F_HW_VLAN_CTAG_RX))
bnad              732 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_rxq_post(bnad, ccb->rcb[0]);
bnad              734 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_rxq_post(bnad, ccb->rcb[1]);
bnad              740 drivers/net/ethernet/brocade/bna/bnad.c bnad_netif_rx_schedule_poll(struct bnad *bnad, struct bna_ccb *ccb)
bnad              759 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_netif_rx_schedule_poll(ccb->bnad, ccb);
bnad              773 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = (struct bnad *)data;
bnad              775 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              776 drivers/net/ethernet/brocade/bna/bnad.c 	if (unlikely(test_bit(BNAD_RF_MBOX_IRQ_DISABLED, &bnad->run_flags))) {
bnad              777 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              781 drivers/net/ethernet/brocade/bna/bnad.c 	bna_intr_status_get(&bnad->bna, intr_status);
bnad              783 drivers/net/ethernet/brocade/bna/bnad.c 	if (BNA_IS_MBOX_ERR_INTR(&bnad->bna, intr_status))
bnad              784 drivers/net/ethernet/brocade/bna/bnad.c 		bna_mbox_handler(&bnad->bna, intr_status);
bnad              786 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              797 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = (struct bnad *)data;
bnad              802 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              803 drivers/net/ethernet/brocade/bna/bnad.c 	if (unlikely(test_bit(BNAD_RF_MBOX_IRQ_DISABLED, &bnad->run_flags))) {
bnad              804 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              808 drivers/net/ethernet/brocade/bna/bnad.c 	bna_intr_status_get(&bnad->bna, intr_status);
bnad              811 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              815 drivers/net/ethernet/brocade/bna/bnad.c 	if (BNA_IS_MBOX_ERR_INTR(&bnad->bna, intr_status))
bnad              816 drivers/net/ethernet/brocade/bna/bnad.c 		bna_mbox_handler(&bnad->bna, intr_status);
bnad              818 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              825 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_tx; i++) {
bnad              826 drivers/net/ethernet/brocade/bna/bnad.c 		for (j = 0; j < bnad->num_txq_per_tx; j++) {
bnad              827 drivers/net/ethernet/brocade/bna/bnad.c 			tcb = bnad->tx_info[i].tcb[j];
bnad              829 drivers/net/ethernet/brocade/bna/bnad.c 				bnad_tx_complete(bnad, bnad->tx_info[i].tcb[j]);
bnad              833 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad              834 drivers/net/ethernet/brocade/bna/bnad.c 		rx_info = &bnad->rx_info[i];
bnad              837 drivers/net/ethernet/brocade/bna/bnad.c 		for (j = 0; j < bnad->num_rxp_per_rx; j++) {
bnad              840 drivers/net/ethernet/brocade/bna/bnad.c 				bnad_netif_rx_schedule_poll(bnad,
bnad              852 drivers/net/ethernet/brocade/bna/bnad.c bnad_enable_mbox_irq(struct bnad *bnad)
bnad              854 drivers/net/ethernet/brocade/bna/bnad.c 	clear_bit(BNAD_RF_MBOX_IRQ_DISABLED, &bnad->run_flags);
bnad              856 drivers/net/ethernet/brocade/bna/bnad.c 	BNAD_UPDATE_CTR(bnad, mbox_intr_enabled);
bnad              864 drivers/net/ethernet/brocade/bna/bnad.c bnad_disable_mbox_irq(struct bnad *bnad)
bnad              866 drivers/net/ethernet/brocade/bna/bnad.c 	set_bit(BNAD_RF_MBOX_IRQ_DISABLED, &bnad->run_flags);
bnad              868 drivers/net/ethernet/brocade/bna/bnad.c 	BNAD_UPDATE_CTR(bnad, mbox_intr_disabled);
bnad              872 drivers/net/ethernet/brocade/bna/bnad.c bnad_set_netdev_perm_addr(struct bnad *bnad)
bnad              874 drivers/net/ethernet/brocade/bna/bnad.c 	struct net_device *netdev = bnad->netdev;
bnad              876 drivers/net/ethernet/brocade/bna/bnad.c 	ether_addr_copy(netdev->perm_addr, bnad->perm_addr);
bnad              878 drivers/net/ethernet/brocade/bna/bnad.c 		ether_addr_copy(netdev->dev_addr, bnad->perm_addr);
bnad              885 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_mbox_intr_enable(struct bnad *bnad)
bnad              887 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_enable_mbox_irq(bnad);
bnad              891 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_mbox_intr_disable(struct bnad *bnad)
bnad              893 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_disable_mbox_irq(bnad);
bnad              897 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_ioceth_ready(struct bnad *bnad)
bnad              899 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bnad_completions.ioc_comp_status = BNA_CB_SUCCESS;
bnad              900 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.ioc_comp);
bnad              904 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_ioceth_failed(struct bnad *bnad)
bnad              906 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bnad_completions.ioc_comp_status = BNA_CB_FAIL;
bnad              907 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.ioc_comp);
bnad              911 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_ioceth_disabled(struct bnad *bnad)
bnad              913 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bnad_completions.ioc_comp_status = BNA_CB_SUCCESS;
bnad              914 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.ioc_comp);
bnad              920 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = (struct bnad *)arg;
bnad              922 drivers/net/ethernet/brocade/bna/bnad.c 	netif_carrier_off(bnad->netdev);
bnad              923 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.enet_comp);
bnad              927 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_ethport_link_status(struct bnad *bnad,
bnad              935 drivers/net/ethernet/brocade/bna/bnad.c 		if (!test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags))
bnad              936 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, cee_toggle);
bnad              937 drivers/net/ethernet/brocade/bna/bnad.c 		set_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags);
bnad              939 drivers/net/ethernet/brocade/bna/bnad.c 		if (test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags))
bnad              940 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, cee_toggle);
bnad              941 drivers/net/ethernet/brocade/bna/bnad.c 		clear_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags);
bnad              945 drivers/net/ethernet/brocade/bna/bnad.c 		if (!netif_carrier_ok(bnad->netdev)) {
bnad              947 drivers/net/ethernet/brocade/bna/bnad.c 			netdev_info(bnad->netdev, "link up\n");
bnad              948 drivers/net/ethernet/brocade/bna/bnad.c 			netif_carrier_on(bnad->netdev);
bnad              949 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, link_toggle);
bnad              950 drivers/net/ethernet/brocade/bna/bnad.c 			for (tx_id = 0; tx_id < bnad->num_tx; tx_id++) {
bnad              951 drivers/net/ethernet/brocade/bna/bnad.c 				for (tcb_id = 0; tcb_id < bnad->num_txq_per_tx;
bnad              954 drivers/net/ethernet/brocade/bna/bnad.c 					bnad->tx_info[tx_id].tcb[tcb_id];
bnad              967 drivers/net/ethernet/brocade/bna/bnad.c 								bnad->netdev,
bnad              969 drivers/net/ethernet/brocade/bna/bnad.c 						BNAD_UPDATE_CTR(bnad,
bnad              973 drivers/net/ethernet/brocade/bna/bnad.c 								bnad->netdev,
bnad              975 drivers/net/ethernet/brocade/bna/bnad.c 						BNAD_UPDATE_CTR(bnad,
bnad              982 drivers/net/ethernet/brocade/bna/bnad.c 		if (netif_carrier_ok(bnad->netdev)) {
bnad              983 drivers/net/ethernet/brocade/bna/bnad.c 			netdev_info(bnad->netdev, "link down\n");
bnad              984 drivers/net/ethernet/brocade/bna/bnad.c 			netif_carrier_off(bnad->netdev);
bnad              985 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, link_toggle);
bnad              993 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = (struct bnad *)arg;
bnad              995 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.tx_comp);
bnad              999 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_tcb_setup(struct bnad *bnad, struct bna_tcb *tcb)
bnad             1009 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_tcb_destroy(struct bnad *bnad, struct bna_tcb *tcb)
bnad             1019 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_ccb_setup(struct bnad *bnad, struct bna_ccb *ccb)
bnad             1029 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_ccb_destroy(struct bnad *bnad, struct bna_ccb *ccb)
bnad             1038 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_tx_stall(struct bnad *bnad, struct bna_tx *tx)
bnad             1052 drivers/net/ethernet/brocade/bna/bnad.c 		netif_stop_subqueue(bnad->netdev, txq_id);
bnad             1057 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_tx_resume(struct bnad *bnad, struct bna_tx *tx)
bnad             1074 drivers/net/ethernet/brocade/bna/bnad.c 		if (netif_carrier_ok(bnad->netdev)) {
bnad             1075 drivers/net/ethernet/brocade/bna/bnad.c 			netif_wake_subqueue(bnad->netdev, txq_id);
bnad             1076 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, netif_queue_wakeup);
bnad             1085 drivers/net/ethernet/brocade/bna/bnad.c 	if (is_zero_ether_addr(bnad->perm_addr)) {
bnad             1086 drivers/net/ethernet/brocade/bna/bnad.c 		bna_enet_perm_mac_get(&bnad->bna.enet, bnad->perm_addr);
bnad             1087 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_set_netdev_perm_addr(bnad);
bnad             1099 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = NULL;
bnad             1109 drivers/net/ethernet/brocade/bna/bnad.c 		bnad = tcb->bnad;
bnad             1116 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_txq_cleanup(bnad, tcb);
bnad             1123 drivers/net/ethernet/brocade/bna/bnad.c 		queue_delayed_work(bnad->work_q, &tx_info->tx_cleanup_work,
bnad             1128 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1130 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1134 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tx *tx)
bnad             1146 drivers/net/ethernet/brocade/bna/bnad.c 	queue_delayed_work(bnad->work_q, &tx_info->tx_cleanup_work, 0);
bnad             1150 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_rx_stall(struct bnad *bnad, struct bna_rx *rx)
bnad             1179 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = NULL;
bnad             1189 drivers/net/ethernet/brocade/bna/bnad.c 		bnad = rx_ctrl->ccb->bnad;
bnad             1197 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_cq_cleanup(bnad, rx_ctrl->ccb);
bnad             1198 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_rxq_cleanup(bnad, rx_ctrl->ccb->rcb[0]);
bnad             1200 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_cleanup(bnad, rx_ctrl->ccb->rcb[1]);
bnad             1203 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1205 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1209 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_rx_cleanup(struct bnad *bnad, struct bna_rx *rx)
bnad             1228 drivers/net/ethernet/brocade/bna/bnad.c 	queue_work(bnad->work_q, &rx_info->rx_cleanup_work);
bnad             1232 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_rx_post(struct bnad *bnad, struct bna_rx *rx)
bnad             1253 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_alloc_init(bnad, rcb);
bnad             1256 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_rxq_post(bnad, rcb);
bnad             1264 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = (struct bnad *)arg;
bnad             1266 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.rx_comp);
bnad             1270 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_rx_mcast_add(struct bnad *bnad, struct bna_rx *rx)
bnad             1272 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bnad_completions.mcast_comp_status = BNA_CB_SUCCESS;
bnad             1273 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.mcast_comp);
bnad             1277 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status,
bnad             1281 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, hw_stats_updates);
bnad             1283 drivers/net/ethernet/brocade/bna/bnad.c 	if (!netif_running(bnad->netdev) ||
bnad             1284 drivers/net/ethernet/brocade/bna/bnad.c 		!test_bit(BNAD_RF_STATS_TIMER_RUNNING, &bnad->run_flags))
bnad             1287 drivers/net/ethernet/brocade/bna/bnad.c 	mod_timer(&bnad->stats_timer,
bnad             1292 drivers/net/ethernet/brocade/bna/bnad.c bnad_cb_enet_mtu_set(struct bnad *bnad)
bnad             1294 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bnad_completions.mtu_comp_status = BNA_CB_SUCCESS;
bnad             1295 drivers/net/ethernet/brocade/bna/bnad.c 	complete(&bnad->bnad_completions.mtu_comp);
bnad             1311 drivers/net/ethernet/brocade/bna/bnad.c bnad_mem_free(struct bnad *bnad,
bnad             1325 drivers/net/ethernet/brocade/bna/bnad.c 				dma_free_coherent(&bnad->pcidev->dev,
bnad             1337 drivers/net/ethernet/brocade/bna/bnad.c bnad_mem_alloc(struct bnad *bnad,
bnad             1357 drivers/net/ethernet/brocade/bna/bnad.c 				dma_alloc_coherent(&bnad->pcidev->dev,
bnad             1379 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_mem_free(bnad, mem_info);
bnad             1385 drivers/net/ethernet/brocade/bna/bnad.c bnad_mbox_irq_free(struct bnad *bnad)
bnad             1390 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1391 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_disable_mbox_irq(bnad);
bnad             1392 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1394 drivers/net/ethernet/brocade/bna/bnad.c 	irq = BNAD_GET_MBOX_IRQ(bnad);
bnad             1395 drivers/net/ethernet/brocade/bna/bnad.c 	free_irq(irq, bnad);
bnad             1404 drivers/net/ethernet/brocade/bna/bnad.c bnad_mbox_irq_alloc(struct bnad *bnad)
bnad             1411 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1412 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->cfg_flags & BNAD_CF_MSIX) {
bnad             1414 drivers/net/ethernet/brocade/bna/bnad.c 		irq = bnad->msix_table[BNAD_MAILBOX_MSIX_INDEX].vector;
bnad             1418 drivers/net/ethernet/brocade/bna/bnad.c 		irq = bnad->pcidev->irq;
bnad             1422 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1423 drivers/net/ethernet/brocade/bna/bnad.c 	sprintf(bnad->mbox_irq_name, "%s", BNAD_NAME);
bnad             1429 drivers/net/ethernet/brocade/bna/bnad.c 	set_bit(BNAD_RF_MBOX_IRQ_DISABLED, &bnad->run_flags);
bnad             1431 drivers/net/ethernet/brocade/bna/bnad.c 	BNAD_UPDATE_CTR(bnad, mbox_intr_disabled);
bnad             1434 drivers/net/ethernet/brocade/bna/bnad.c 			  bnad->mbox_irq_name, bnad);
bnad             1440 drivers/net/ethernet/brocade/bna/bnad.c bnad_txrx_irq_free(struct bnad *bnad, struct bna_intr_info *intr_info)
bnad             1448 drivers/net/ethernet/brocade/bna/bnad.c bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src,
bnad             1455 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1456 drivers/net/ethernet/brocade/bna/bnad.c 	cfg_flags = bnad->cfg_flags;
bnad             1457 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1474 drivers/net/ethernet/brocade/bna/bnad.c 					(bnad->num_tx * bnad->num_txq_per_tx) +
bnad             1510 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_msix_unregister(struct bnad *bnad, struct bnad_tx_info *tx_info,
bnad             1521 drivers/net/ethernet/brocade/bna/bnad.c 		free_irq(bnad->msix_table[vector_num].vector, tx_info->tcb[i]);
bnad             1529 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_msix_register(struct bnad *bnad, struct bnad_tx_info *tx_info,
bnad             1538 drivers/net/ethernet/brocade/bna/bnad.c 		sprintf(tx_info->tcb[i]->name, "%s TXQ %d", bnad->netdev->name,
bnad             1540 drivers/net/ethernet/brocade/bna/bnad.c 		err = request_irq(bnad->msix_table[vector_num].vector,
bnad             1552 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_tx_msix_unregister(bnad, tx_info, (i - 1));
bnad             1560 drivers/net/ethernet/brocade/bna/bnad.c bnad_rx_msix_unregister(struct bnad *bnad, struct bnad_rx_info *rx_info,
bnad             1571 drivers/net/ethernet/brocade/bna/bnad.c 		free_irq(bnad->msix_table[vector_num].vector,
bnad             1580 drivers/net/ethernet/brocade/bna/bnad.c bnad_rx_msix_register(struct bnad *bnad, struct bnad_rx_info *rx_info,
bnad             1590 drivers/net/ethernet/brocade/bna/bnad.c 			bnad->netdev->name,
bnad             1592 drivers/net/ethernet/brocade/bna/bnad.c 		err = request_irq(bnad->msix_table[vector_num].vector,
bnad             1604 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_rx_msix_unregister(bnad, rx_info, (i - 1));
bnad             1610 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_res_free(struct bnad *bnad, struct bna_res_info *res_info)
bnad             1616 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_mem_free(bnad, &res_info[i].res_u.mem_info);
bnad             1618 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_txrx_irq_free(bnad, &res_info[i].res_u.intr_info);
bnad             1624 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_res_alloc(struct bnad *bnad, struct bna_res_info *res_info,
bnad             1631 drivers/net/ethernet/brocade/bna/bnad.c 			err = bnad_mem_alloc(bnad,
bnad             1634 drivers/net/ethernet/brocade/bna/bnad.c 			err = bnad_txrx_irq_alloc(bnad, BNAD_INTR_TX, tx_id,
bnad             1642 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_tx_res_free(bnad, res_info);
bnad             1648 drivers/net/ethernet/brocade/bna/bnad.c bnad_rx_res_free(struct bnad *bnad, struct bna_res_info *res_info)
bnad             1654 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_mem_free(bnad, &res_info[i].res_u.mem_info);
bnad             1656 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_txrx_irq_free(bnad, &res_info[i].res_u.intr_info);
bnad             1662 drivers/net/ethernet/brocade/bna/bnad.c bnad_rx_res_alloc(struct bnad *bnad, struct bna_res_info *res_info,
bnad             1670 drivers/net/ethernet/brocade/bna/bnad.c 			err = bnad_mem_alloc(bnad,
bnad             1673 drivers/net/ethernet/brocade/bna/bnad.c 			err = bnad_txrx_irq_alloc(bnad, BNAD_INTR_RX, rx_id,
bnad             1681 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_rx_res_free(bnad, res_info);
bnad             1690 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.ioc_timer);
bnad             1693 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1694 drivers/net/ethernet/brocade/bna/bnad.c 	bfa_nw_ioc_timeout(&bnad->bna.ioceth.ioc);
bnad             1695 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1701 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.hb_timer);
bnad             1704 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1705 drivers/net/ethernet/brocade/bna/bnad.c 	bfa_nw_ioc_hb_check(&bnad->bna.ioceth.ioc);
bnad             1706 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1712 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.iocpf_timer);
bnad             1715 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1716 drivers/net/ethernet/brocade/bna/bnad.c 	bfa_nw_iocpf_timeout(&bnad->bna.ioceth.ioc);
bnad             1717 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1723 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = from_timer(bnad, t, bna.ioceth.ioc.sem_timer);
bnad             1726 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1727 drivers/net/ethernet/brocade/bna/bnad.c 	bfa_nw_iocpf_sem_timeout(&bnad->bna.ioceth.ioc);
bnad             1728 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1745 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = from_timer(bnad, t, dim_timer);
bnad             1751 drivers/net/ethernet/brocade/bna/bnad.c 	if (!netif_carrier_ok(bnad->netdev))
bnad             1754 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1755 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad             1756 drivers/net/ethernet/brocade/bna/bnad.c 		rx_info = &bnad->rx_info[i];
bnad             1759 drivers/net/ethernet/brocade/bna/bnad.c 		for (j = 0; j < bnad->num_rxp_per_rx; j++) {
bnad             1768 drivers/net/ethernet/brocade/bna/bnad.c 	if (test_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags))
bnad             1769 drivers/net/ethernet/brocade/bna/bnad.c 		mod_timer(&bnad->dim_timer,
bnad             1771 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1778 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = from_timer(bnad, t, stats_timer);
bnad             1781 drivers/net/ethernet/brocade/bna/bnad.c 	if (!netif_running(bnad->netdev) ||
bnad             1782 drivers/net/ethernet/brocade/bna/bnad.c 		!test_bit(BNAD_RF_STATS_TIMER_RUNNING, &bnad->run_flags))
bnad             1785 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1786 drivers/net/ethernet/brocade/bna/bnad.c 	bna_hw_stats_get(&bnad->bna);
bnad             1787 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1795 drivers/net/ethernet/brocade/bna/bnad.c bnad_dim_timer_start(struct bnad *bnad)
bnad             1797 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->cfg_flags & BNAD_CF_DIM_ENABLED &&
bnad             1798 drivers/net/ethernet/brocade/bna/bnad.c 	    !test_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags)) {
bnad             1799 drivers/net/ethernet/brocade/bna/bnad.c 		timer_setup(&bnad->dim_timer, bnad_dim_timeout, 0);
bnad             1800 drivers/net/ethernet/brocade/bna/bnad.c 		set_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags);
bnad             1801 drivers/net/ethernet/brocade/bna/bnad.c 		mod_timer(&bnad->dim_timer,
bnad             1811 drivers/net/ethernet/brocade/bna/bnad.c bnad_stats_timer_start(struct bnad *bnad)
bnad             1815 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1816 drivers/net/ethernet/brocade/bna/bnad.c 	if (!test_and_set_bit(BNAD_RF_STATS_TIMER_RUNNING, &bnad->run_flags)) {
bnad             1817 drivers/net/ethernet/brocade/bna/bnad.c 		timer_setup(&bnad->stats_timer, bnad_stats_timeout, 0);
bnad             1818 drivers/net/ethernet/brocade/bna/bnad.c 		mod_timer(&bnad->stats_timer,
bnad             1821 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1829 drivers/net/ethernet/brocade/bna/bnad.c bnad_stats_timer_stop(struct bnad *bnad)
bnad             1834 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1835 drivers/net/ethernet/brocade/bna/bnad.c 	if (test_and_clear_bit(BNAD_RF_STATS_TIMER_RUNNING, &bnad->run_flags))
bnad             1837 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1839 drivers/net/ethernet/brocade/bna/bnad.c 		del_timer_sync(&bnad->stats_timer);
bnad             1861 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = rx_ctrl->bnad;
bnad             1866 drivers/net/ethernet/brocade/bna/bnad.c 	if (!netif_carrier_ok(bnad->netdev))
bnad             1869 drivers/net/ethernet/brocade/bna/bnad.c 	rcvd = bnad_cq_process(bnad, rx_ctrl->ccb, budget);
bnad             1886 drivers/net/ethernet/brocade/bna/bnad.c bnad_napi_add(struct bnad *bnad, u32 rx_id)
bnad             1892 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i <	bnad->num_rxp_per_rx; i++) {
bnad             1893 drivers/net/ethernet/brocade/bna/bnad.c 		rx_ctrl = &bnad->rx_info[rx_id].rx_ctrl[i];
bnad             1894 drivers/net/ethernet/brocade/bna/bnad.c 		netif_napi_add(bnad->netdev, &rx_ctrl->napi,
bnad             1900 drivers/net/ethernet/brocade/bna/bnad.c bnad_napi_delete(struct bnad *bnad, u32 rx_id)
bnad             1905 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_rxp_per_rx; i++)
bnad             1906 drivers/net/ethernet/brocade/bna/bnad.c 		netif_napi_del(&bnad->rx_info[rx_id].rx_ctrl[i].napi);
bnad             1911 drivers/net/ethernet/brocade/bna/bnad.c bnad_destroy_tx(struct bnad *bnad, u32 tx_id)
bnad             1913 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad_tx_info *tx_info = &bnad->tx_info[tx_id];
bnad             1914 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_res_info *res_info = &bnad->tx_res_info[tx_id].res_info[0];
bnad             1920 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.tx_comp);
bnad             1921 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1923 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1924 drivers/net/ethernet/brocade/bna/bnad.c 	wait_for_completion(&bnad->bnad_completions.tx_comp);
bnad             1927 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_tx_msix_unregister(bnad, tx_info,
bnad             1928 drivers/net/ethernet/brocade/bna/bnad.c 			bnad->num_txq_per_tx);
bnad             1930 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1932 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1937 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_tx_res_free(bnad, res_info);
bnad             1942 drivers/net/ethernet/brocade/bna/bnad.c bnad_setup_tx(struct bnad *bnad, u32 tx_id)
bnad             1945 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad_tx_info *tx_info = &bnad->tx_info[tx_id];
bnad             1946 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_res_info *res_info = &bnad->tx_res_info[tx_id].res_info[0];
bnad             1949 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_tx_config *tx_config = &bnad->tx_config[tx_id];
bnad             1964 drivers/net/ethernet/brocade/bna/bnad.c 	tx_config->num_txq = bnad->num_txq_per_tx;
bnad             1965 drivers/net/ethernet/brocade/bna/bnad.c 	tx_config->txq_depth = bnad->txq_depth;
bnad             1967 drivers/net/ethernet/brocade/bna/bnad.c 	tx_config->coalescing_timeo = bnad->tx_coalescing_timeo;
bnad             1970 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1971 drivers/net/ethernet/brocade/bna/bnad.c 	bna_tx_res_req(bnad->num_txq_per_tx,
bnad             1972 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->txq_depth, res_info);
bnad             1973 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1977 drivers/net/ethernet/brocade/bna/bnad.c 			bnad->num_txq_per_tx, (sizeof(struct bnad_tx_unmap) *
bnad             1978 drivers/net/ethernet/brocade/bna/bnad.c 			bnad->txq_depth));
bnad             1981 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_tx_res_alloc(bnad, res_info, tx_id);
bnad             1986 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1987 drivers/net/ethernet/brocade/bna/bnad.c 	tx = bna_tx_create(&bnad->bna, bnad, tx_config, &tx_cbfn, res_info,
bnad             1989 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2001 drivers/net/ethernet/brocade/bna/bnad.c 		err = bnad_tx_msix_register(bnad, tx_info,
bnad             2002 drivers/net/ethernet/brocade/bna/bnad.c 			tx_id, bnad->num_txq_per_tx);
bnad             2007 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2009 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2014 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2016 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2020 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_tx_res_free(bnad, res_info);
bnad             2027 drivers/net/ethernet/brocade/bna/bnad.c bnad_init_rx_config(struct bnad *bnad, struct bna_rx_config *rx_config)
bnad             2031 drivers/net/ethernet/brocade/bna/bnad.c 	rx_config->num_paths = bnad->num_rxp_per_rx;
bnad             2032 drivers/net/ethernet/brocade/bna/bnad.c 	rx_config->coalescing_timeo = bnad->rx_coalescing_timeo;
bnad             2034 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->num_rxp_per_rx > 1) {
bnad             2042 drivers/net/ethernet/brocade/bna/bnad.c 				bnad->num_rxp_per_rx - 1;
bnad             2051 drivers/net/ethernet/brocade/bna/bnad.c 	rx_config->frame_size = BNAD_FRAME_SIZE(bnad->netdev->mtu);
bnad             2061 drivers/net/ethernet/brocade/bna/bnad.c 	if (BNAD_PCI_DEV_IS_CAT2(bnad) &&
bnad             2070 drivers/net/ethernet/brocade/bna/bnad.c 		rx_config->q0_depth = bnad->rxq_depth * rx_config->q0_num_vecs;
bnad             2075 drivers/net/ethernet/brocade/bna/bnad.c 		rx_config->q0_depth = bnad->rxq_depth;
bnad             2080 drivers/net/ethernet/brocade/bna/bnad.c 		rx_config->q1_depth = bnad->rxq_depth;
bnad             2085 drivers/net/ethernet/brocade/bna/bnad.c 		(bnad->netdev->features & NETIF_F_HW_VLAN_CTAG_RX) ?
bnad             2090 drivers/net/ethernet/brocade/bna/bnad.c bnad_rx_ctrl_init(struct bnad *bnad, u32 rx_id)
bnad             2092 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad_rx_info *rx_info = &bnad->rx_info[rx_id];
bnad             2095 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_rxp_per_rx; i++)
bnad             2096 drivers/net/ethernet/brocade/bna/bnad.c 		rx_info->rx_ctrl[i].bnad = bnad;
bnad             2101 drivers/net/ethernet/brocade/bna/bnad.c bnad_reinit_rx(struct bnad *bnad)
bnad             2103 drivers/net/ethernet/brocade/bna/bnad.c 	struct net_device *netdev = bnad->netdev;
bnad             2109 drivers/net/ethernet/brocade/bna/bnad.c 	for (rx_id = 0; rx_id < bnad->num_rx; rx_id++) {
bnad             2110 drivers/net/ethernet/brocade/bna/bnad.c 		if (!bnad->rx_info[rx_id].rx)
bnad             2112 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_destroy_rx(bnad, rx_id);
bnad             2115 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2116 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_mtu_set(&bnad->bna.enet,
bnad             2117 drivers/net/ethernet/brocade/bna/bnad.c 			 BNAD_FRAME_SIZE(bnad->netdev->mtu), NULL);
bnad             2118 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2120 drivers/net/ethernet/brocade/bna/bnad.c 	for (rx_id = 0; rx_id < bnad->num_rx; rx_id++) {
bnad             2122 drivers/net/ethernet/brocade/bna/bnad.c 		current_err = bnad_setup_rx(bnad, rx_id);
bnad             2130 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->rx_info[0].rx && !err) {
bnad             2131 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_restore_vlans(bnad, 0);
bnad             2132 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_enable_default_bcast(bnad);
bnad             2133 drivers/net/ethernet/brocade/bna/bnad.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2134 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_mac_addr_set_locked(bnad, netdev->dev_addr);
bnad             2135 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2144 drivers/net/ethernet/brocade/bna/bnad.c bnad_destroy_rx(struct bnad *bnad, u32 rx_id)
bnad             2146 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad_rx_info *rx_info = &bnad->rx_info[rx_id];
bnad             2147 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_rx_config *rx_config = &bnad->rx_config[rx_id];
bnad             2148 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_res_info *res_info = &bnad->rx_res_info[rx_id].res_info[0];
bnad             2156 drivers/net/ethernet/brocade/bna/bnad.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2157 drivers/net/ethernet/brocade/bna/bnad.c 		if (bnad->cfg_flags & BNAD_CF_DIM_ENABLED &&
bnad             2158 drivers/net/ethernet/brocade/bna/bnad.c 		    test_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags)) {
bnad             2159 drivers/net/ethernet/brocade/bna/bnad.c 			clear_bit(BNAD_RF_DIM_TIMER_RUNNING, &bnad->run_flags);
bnad             2162 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2164 drivers/net/ethernet/brocade/bna/bnad.c 			del_timer_sync(&bnad->dim_timer);
bnad             2167 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.rx_comp);
bnad             2168 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2170 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2171 drivers/net/ethernet/brocade/bna/bnad.c 	wait_for_completion(&bnad->bnad_completions.rx_comp);
bnad             2174 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_rx_msix_unregister(bnad, rx_info, rx_config->num_paths);
bnad             2176 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_napi_delete(bnad, rx_id);
bnad             2178 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2183 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2185 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_rx_res_free(bnad, res_info);
bnad             2190 drivers/net/ethernet/brocade/bna/bnad.c bnad_setup_rx(struct bnad *bnad, u32 rx_id)
bnad             2193 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad_rx_info *rx_info = &bnad->rx_info[rx_id];
bnad             2194 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_res_info *res_info = &bnad->rx_res_info[rx_id].res_info[0];
bnad             2197 drivers/net/ethernet/brocade/bna/bnad.c 	struct bna_rx_config *rx_config = &bnad->rx_config[rx_id];
bnad             2213 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_init_rx_config(bnad, rx_config);
bnad             2216 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2218 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2235 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_rx_res_alloc(bnad, res_info, rx_id);
bnad             2239 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_rx_ctrl_init(bnad, rx_id);
bnad             2242 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2243 drivers/net/ethernet/brocade/bna/bnad.c 	rx = bna_rx_create(&bnad->bna, bnad, rx_config, &rx_cbfn, res_info,
bnad             2247 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2251 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2260 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_napi_add(bnad, rx_id);
bnad             2264 drivers/net/ethernet/brocade/bna/bnad.c 		err = bnad_rx_msix_register(bnad, rx_info, rx_id,
bnad             2270 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2273 drivers/net/ethernet/brocade/bna/bnad.c 		if (bnad->cfg_flags & BNAD_CF_DIM_ENABLED)
bnad             2274 drivers/net/ethernet/brocade/bna/bnad.c 			bna_rx_dim_reconfig(&bnad->bna, bna_napi_dim_vector);
bnad             2280 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_dim_timer_start(bnad);
bnad             2284 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2289 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_destroy_rx(bnad, rx_id);
bnad             2295 drivers/net/ethernet/brocade/bna/bnad.c bnad_tx_coalescing_timeo_set(struct bnad *bnad)
bnad             2299 drivers/net/ethernet/brocade/bna/bnad.c 	tx_info = &bnad->tx_info[0];
bnad             2303 drivers/net/ethernet/brocade/bna/bnad.c 	bna_tx_coalescing_timeo_set(tx_info->tx, bnad->tx_coalescing_timeo);
bnad             2308 drivers/net/ethernet/brocade/bna/bnad.c bnad_rx_coalescing_timeo_set(struct bnad *bnad)
bnad             2313 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad             2314 drivers/net/ethernet/brocade/bna/bnad.c 		rx_info = &bnad->rx_info[i];
bnad             2318 drivers/net/ethernet/brocade/bna/bnad.c 				bnad->rx_coalescing_timeo);
bnad             2326 drivers/net/ethernet/brocade/bna/bnad.c bnad_mac_addr_set_locked(struct bnad *bnad, const u8 *mac_addr)
bnad             2334 drivers/net/ethernet/brocade/bna/bnad.c 	if (!bnad->rx_info[0].rx)
bnad             2337 drivers/net/ethernet/brocade/bna/bnad.c 	ret = bna_rx_ucast_set(bnad->rx_info[0].rx, mac_addr);
bnad             2346 drivers/net/ethernet/brocade/bna/bnad.c bnad_enable_default_bcast(struct bnad *bnad)
bnad             2348 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad_rx_info *rx_info = &bnad->rx_info[0];
bnad             2352 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.mcast_comp);
bnad             2354 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2357 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2360 drivers/net/ethernet/brocade/bna/bnad.c 		wait_for_completion(&bnad->bnad_completions.mcast_comp);
bnad             2364 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->bnad_completions.mcast_comp_status != BNA_CB_SUCCESS)
bnad             2372 drivers/net/ethernet/brocade/bna/bnad.c bnad_restore_vlans(struct bnad *bnad, u32 rx_id)
bnad             2377 drivers/net/ethernet/brocade/bna/bnad.c 	for_each_set_bit(vid, bnad->active_vlans, VLAN_N_VID) {
bnad             2378 drivers/net/ethernet/brocade/bna/bnad.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2379 drivers/net/ethernet/brocade/bna/bnad.c 		bna_rx_vlan_add(bnad->rx_info[rx_id].rx, vid);
bnad             2380 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2386 drivers/net/ethernet/brocade/bna/bnad.c bnad_netdev_qstats_fill(struct bnad *bnad, struct rtnl_link_stats64 *stats)
bnad             2390 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad             2391 drivers/net/ethernet/brocade/bna/bnad.c 		for (j = 0; j < bnad->num_rxp_per_rx; j++) {
bnad             2392 drivers/net/ethernet/brocade/bna/bnad.c 			if (bnad->rx_info[i].rx_ctrl[j].ccb) {
bnad             2393 drivers/net/ethernet/brocade/bna/bnad.c 				stats->rx_packets += bnad->rx_info[i].
bnad             2395 drivers/net/ethernet/brocade/bna/bnad.c 				stats->rx_bytes += bnad->rx_info[i].
bnad             2397 drivers/net/ethernet/brocade/bna/bnad.c 				if (bnad->rx_info[i].rx_ctrl[j].ccb->rcb[1] &&
bnad             2398 drivers/net/ethernet/brocade/bna/bnad.c 					bnad->rx_info[i].rx_ctrl[j].ccb->
bnad             2401 drivers/net/ethernet/brocade/bna/bnad.c 						bnad->rx_info[i].rx_ctrl[j].
bnad             2404 drivers/net/ethernet/brocade/bna/bnad.c 						bnad->rx_info[i].rx_ctrl[j].
bnad             2410 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->num_tx; i++) {
bnad             2411 drivers/net/ethernet/brocade/bna/bnad.c 		for (j = 0; j < bnad->num_txq_per_tx; j++) {
bnad             2412 drivers/net/ethernet/brocade/bna/bnad.c 			if (bnad->tx_info[i].tcb[j]) {
bnad             2414 drivers/net/ethernet/brocade/bna/bnad.c 				bnad->tx_info[i].tcb[j]->txq->tx_packets;
bnad             2416 drivers/net/ethernet/brocade/bna/bnad.c 					bnad->tx_info[i].tcb[j]->txq->tx_bytes;
bnad             2426 drivers/net/ethernet/brocade/bna/bnad.c bnad_netdev_hwstats_fill(struct bnad *bnad, struct rtnl_link_stats64 *stats)
bnad             2432 drivers/net/ethernet/brocade/bna/bnad.c 	mac_stats = &bnad->stats.bna_stats->hw_stats.mac_stats;
bnad             2451 drivers/net/ethernet/brocade/bna/bnad.c 	bmap = bna_rx_rid_mask(&bnad->bna);
bnad             2455 drivers/net/ethernet/brocade/bna/bnad.c 				bnad->stats.bna_stats->
bnad             2464 drivers/net/ethernet/brocade/bna/bnad.c bnad_mbox_irq_sync(struct bnad *bnad)
bnad             2469 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2470 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->cfg_flags & BNAD_CF_MSIX)
bnad             2471 drivers/net/ethernet/brocade/bna/bnad.c 		irq = bnad->msix_table[BNAD_MAILBOX_MSIX_INDEX].vector;
bnad             2473 drivers/net/ethernet/brocade/bna/bnad.c 		irq = bnad->pcidev->irq;
bnad             2474 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2481 drivers/net/ethernet/brocade/bna/bnad.c bnad_tso_prepare(struct bnad *bnad, struct sk_buff *skb)
bnad             2487 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tso_err);
bnad             2505 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tso4);
bnad             2513 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tso6);
bnad             2525 drivers/net/ethernet/brocade/bna/bnad.c bnad_q_num_init(struct bnad *bnad)
bnad             2532 drivers/net/ethernet/brocade/bna/bnad.c 	if (!(bnad->cfg_flags & BNAD_CF_MSIX))
bnad             2535 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->num_rx = 1;
bnad             2536 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->num_tx = 1;
bnad             2537 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->num_rxp_per_rx = rxps;
bnad             2538 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->num_txq_per_tx = BNAD_TXQ_NUM;
bnad             2548 drivers/net/ethernet/brocade/bna/bnad.c bnad_q_num_adjust(struct bnad *bnad, int msix_vectors, int temp)
bnad             2550 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->num_txq_per_tx = 1;
bnad             2551 drivers/net/ethernet/brocade/bna/bnad.c 	if ((msix_vectors >= (bnad->num_tx * bnad->num_txq_per_tx)  +
bnad             2553 drivers/net/ethernet/brocade/bna/bnad.c 	    (bnad->cfg_flags & BNAD_CF_MSIX)) {
bnad             2554 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->num_rxp_per_rx = msix_vectors -
bnad             2555 drivers/net/ethernet/brocade/bna/bnad.c 			(bnad->num_tx * bnad->num_txq_per_tx) -
bnad             2558 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->num_rxp_per_rx = 1;
bnad             2563 drivers/net/ethernet/brocade/bna/bnad.c bnad_ioceth_disable(struct bnad *bnad)
bnad             2568 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2569 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.ioc_comp);
bnad             2570 drivers/net/ethernet/brocade/bna/bnad.c 	bna_ioceth_disable(&bnad->bna.ioceth, BNA_HARD_CLEANUP);
bnad             2571 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2573 drivers/net/ethernet/brocade/bna/bnad.c 	wait_for_completion_timeout(&bnad->bnad_completions.ioc_comp,
bnad             2576 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad->bnad_completions.ioc_comp_status;
bnad             2581 drivers/net/ethernet/brocade/bna/bnad.c bnad_ioceth_enable(struct bnad *bnad)
bnad             2586 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2587 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.ioc_comp);
bnad             2588 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bnad_completions.ioc_comp_status = BNA_CB_WAITING;
bnad             2589 drivers/net/ethernet/brocade/bna/bnad.c 	bna_ioceth_enable(&bnad->bna.ioceth);
bnad             2590 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2592 drivers/net/ethernet/brocade/bna/bnad.c 	wait_for_completion_timeout(&bnad->bnad_completions.ioc_comp,
bnad             2595 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad->bnad_completions.ioc_comp_status;
bnad             2602 drivers/net/ethernet/brocade/bna/bnad.c bnad_res_free(struct bnad *bnad, struct bna_res_info *res_info,
bnad             2608 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_mem_free(bnad, &res_info[i].res_u.mem_info);
bnad             2613 drivers/net/ethernet/brocade/bna/bnad.c bnad_res_alloc(struct bnad *bnad, struct bna_res_info *res_info,
bnad             2619 drivers/net/ethernet/brocade/bna/bnad.c 		err = bnad_mem_alloc(bnad, &res_info[i].res_u.mem_info);
bnad             2626 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_res_free(bnad, res_info, res_val_max);
bnad             2632 drivers/net/ethernet/brocade/bna/bnad.c bnad_enable_msix(struct bnad *bnad)
bnad             2637 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2638 drivers/net/ethernet/brocade/bna/bnad.c 	if (!(bnad->cfg_flags & BNAD_CF_MSIX)) {
bnad             2639 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2642 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2644 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->msix_table)
bnad             2647 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->msix_table =
bnad             2648 drivers/net/ethernet/brocade/bna/bnad.c 		kcalloc(bnad->msix_num, sizeof(struct msix_entry), GFP_KERNEL);
bnad             2650 drivers/net/ethernet/brocade/bna/bnad.c 	if (!bnad->msix_table)
bnad             2653 drivers/net/ethernet/brocade/bna/bnad.c 	for (i = 0; i < bnad->msix_num; i++)
bnad             2654 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->msix_table[i].entry = i;
bnad             2656 drivers/net/ethernet/brocade/bna/bnad.c 	ret = pci_enable_msix_range(bnad->pcidev, bnad->msix_table,
bnad             2657 drivers/net/ethernet/brocade/bna/bnad.c 				    1, bnad->msix_num);
bnad             2660 drivers/net/ethernet/brocade/bna/bnad.c 	} else if (ret < bnad->msix_num) {
bnad             2661 drivers/net/ethernet/brocade/bna/bnad.c 		dev_warn(&bnad->pcidev->dev,
bnad             2663 drivers/net/ethernet/brocade/bna/bnad.c 			 ret, bnad->msix_num);
bnad             2665 drivers/net/ethernet/brocade/bna/bnad.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2667 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_q_num_adjust(bnad, (ret - BNAD_MAILBOX_MSIX_VECTORS) / 2,
bnad             2669 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2671 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->msix_num = BNAD_NUM_TXQ + BNAD_NUM_RXP +
bnad             2674 drivers/net/ethernet/brocade/bna/bnad.c 		if (bnad->msix_num > ret) {
bnad             2675 drivers/net/ethernet/brocade/bna/bnad.c 			pci_disable_msix(bnad->pcidev);
bnad             2680 drivers/net/ethernet/brocade/bna/bnad.c 	pci_intx(bnad->pcidev, 0);
bnad             2685 drivers/net/ethernet/brocade/bna/bnad.c 	dev_warn(&bnad->pcidev->dev,
bnad             2688 drivers/net/ethernet/brocade/bna/bnad.c 	kfree(bnad->msix_table);
bnad             2689 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->msix_table = NULL;
bnad             2690 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->msix_num = 0;
bnad             2691 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2692 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->cfg_flags &= ~BNAD_CF_MSIX;
bnad             2693 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_q_num_init(bnad);
bnad             2694 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2698 drivers/net/ethernet/brocade/bna/bnad.c bnad_disable_msix(struct bnad *bnad)
bnad             2703 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2704 drivers/net/ethernet/brocade/bna/bnad.c 	cfg_flags = bnad->cfg_flags;
bnad             2705 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->cfg_flags & BNAD_CF_MSIX)
bnad             2706 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->cfg_flags &= ~BNAD_CF_MSIX;
bnad             2707 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2710 drivers/net/ethernet/brocade/bna/bnad.c 		pci_disable_msix(bnad->pcidev);
bnad             2711 drivers/net/ethernet/brocade/bna/bnad.c 		kfree(bnad->msix_table);
bnad             2712 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->msix_table = NULL;
bnad             2721 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             2725 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             2728 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_setup_tx(bnad, 0);
bnad             2733 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_setup_rx(bnad, 0);
bnad             2741 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2742 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_mtu_set(&bnad->bna.enet,
bnad             2743 drivers/net/ethernet/brocade/bna/bnad.c 			 BNAD_FRAME_SIZE(bnad->netdev->mtu), NULL);
bnad             2744 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_pause_config(&bnad->bna.enet, &pause_config);
bnad             2745 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_enable(&bnad->bna.enet);
bnad             2746 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2749 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_enable_default_bcast(bnad);
bnad             2752 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_restore_vlans(bnad, 0);
bnad             2755 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2756 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_mac_addr_set_locked(bnad, netdev->dev_addr);
bnad             2757 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2760 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_stats_timer_start(bnad);
bnad             2762 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             2767 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_destroy_tx(bnad, 0);
bnad             2770 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             2777 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             2780 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             2783 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_stats_timer_stop(bnad);
bnad             2785 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.enet_comp);
bnad             2787 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             2788 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_disable(&bnad->bna.enet, BNA_HARD_CLEANUP,
bnad             2790 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             2792 drivers/net/ethernet/brocade/bna/bnad.c 	wait_for_completion(&bnad->bnad_completions.enet_comp);
bnad             2794 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_destroy_tx(bnad, 0);
bnad             2795 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_destroy_rx(bnad, 0);
bnad             2798 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_mbox_irq_sync(bnad);
bnad             2800 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             2808 drivers/net/ethernet/brocade/bna/bnad.c bnad_txq_wi_prepare(struct bnad *bnad, struct bna_tcb *tcb,
bnad             2819 drivers/net/ethernet/brocade/bna/bnad.c 	if (test_bit(BNAD_RF_CEE_RUNNING, &bnad->run_flags)) {
bnad             2828 drivers/net/ethernet/brocade/bna/bnad.c 		if (unlikely(gso_size > bnad->netdev->mtu)) {
bnad             2829 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, tx_skb_mss_too_long);
bnad             2836 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, tx_skb_tso_too_short);
bnad             2842 drivers/net/ethernet/brocade/bna/bnad.c 		if (bnad_tso_prepare(bnad, skb)) {
bnad             2843 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, tx_skb_tso_prepare);
bnad             2855 drivers/net/ethernet/brocade/bna/bnad.c 		if (unlikely(skb->len > (bnad->netdev->mtu + VLAN_ETH_HLEN))) {
bnad             2856 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, tx_skb_non_tso_too_long);
bnad             2878 drivers/net/ethernet/brocade/bna/bnad.c 				BNAD_UPDATE_CTR(bnad, tcpcsum_offload);
bnad             2883 drivers/net/ethernet/brocade/bna/bnad.c 					BNAD_UPDATE_CTR(bnad, tx_skb_tcp_hdr);
bnad             2892 drivers/net/ethernet/brocade/bna/bnad.c 				BNAD_UPDATE_CTR(bnad, udpcsum_offload);
bnad             2896 drivers/net/ethernet/brocade/bna/bnad.c 					BNAD_UPDATE_CTR(bnad, tx_skb_udp_hdr);
bnad             2901 drivers/net/ethernet/brocade/bna/bnad.c 				BNAD_UPDATE_CTR(bnad, tx_skb_csum_err);
bnad             2921 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             2937 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_too_short);
bnad             2942 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_headlen_zero);
bnad             2947 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_headlen_zero);
bnad             2951 drivers/net/ethernet/brocade/bna/bnad.c 	tcb = bnad->tx_info[0].tcb[txq_id];
bnad             2959 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_stopping);
bnad             2972 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_max_vectors);
bnad             2981 drivers/net/ethernet/brocade/bna/bnad.c 			sent = bnad_txcmpl_process(bnad, tcb);
bnad             2988 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, netif_queue_stop);
bnad             2998 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, netif_queue_stop);
bnad             3002 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, netif_queue_wakeup);
bnad             3010 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad_txq_wi_prepare(bnad, tcb, skb, txqent)) {
bnad             3022 drivers/net/ethernet/brocade/bna/bnad.c 	dma_addr = dma_map_single(&bnad->pcidev->dev, skb->data,
bnad             3024 drivers/net/ethernet/brocade/bna/bnad.c 	if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
bnad             3026 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_map_failed);
bnad             3040 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_tx_buff_unmap(bnad, unmap_q, q_depth,
bnad             3043 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, tx_skb_frag_zero);
bnad             3058 drivers/net/ethernet/brocade/bna/bnad.c 		dma_addr = skb_frag_dma_map(&bnad->pcidev->dev, frag,
bnad             3060 drivers/net/ethernet/brocade/bna/bnad.c 		if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
bnad             3062 drivers/net/ethernet/brocade/bna/bnad.c 			bnad_tx_buff_unmap(bnad, unmap_q, q_depth,
bnad             3065 drivers/net/ethernet/brocade/bna/bnad.c 			BNAD_UPDATE_CTR(bnad, tx_skb_map_failed);
bnad             3079 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_tx_buff_unmap(bnad, unmap_q, q_depth, tcb->producer_index);
bnad             3081 drivers/net/ethernet/brocade/bna/bnad.c 		BNAD_UPDATE_CTR(bnad, tx_skb_len_mismatch);
bnad             3107 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3110 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3112 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_netdev_qstats_fill(bnad, stats);
bnad             3113 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_netdev_hwstats_fill(bnad, stats);
bnad             3115 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3119 drivers/net/ethernet/brocade/bna/bnad.c bnad_set_rx_ucast_fltr(struct bnad *bnad)
bnad             3121 drivers/net/ethernet/brocade/bna/bnad.c 	struct net_device *netdev = bnad->netdev;
bnad             3128 drivers/net/ethernet/brocade/bna/bnad.c 	if (netdev_uc_empty(bnad->netdev)) {
bnad             3129 drivers/net/ethernet/brocade/bna/bnad.c 		bna_rx_ucast_listset(bnad->rx_info[0].rx, 0, NULL);
bnad             3133 drivers/net/ethernet/brocade/bna/bnad.c 	if (uc_count > bna_attr(&bnad->bna)->num_ucmac)
bnad             3146 drivers/net/ethernet/brocade/bna/bnad.c 	ret = bna_rx_ucast_listset(bnad->rx_info[0].rx, entry, mac_list);
bnad             3156 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->cfg_flags |= BNAD_CF_DEFAULT;
bnad             3157 drivers/net/ethernet/brocade/bna/bnad.c 	bna_rx_ucast_listset(bnad->rx_info[0].rx, 0, NULL);
bnad             3161 drivers/net/ethernet/brocade/bna/bnad.c bnad_set_rx_mcast_fltr(struct bnad *bnad)
bnad             3163 drivers/net/ethernet/brocade/bna/bnad.c 	struct net_device *netdev = bnad->netdev;
bnad             3174 drivers/net/ethernet/brocade/bna/bnad.c 	if (mc_count > bna_attr(&bnad->bna)->num_mcmac)
bnad             3186 drivers/net/ethernet/brocade/bna/bnad.c 	ret = bna_rx_mcast_listset(bnad->rx_info[0].rx, mc_count + 1, mac_list);
bnad             3195 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->cfg_flags |= BNAD_CF_ALLMULTI;
bnad             3196 drivers/net/ethernet/brocade/bna/bnad.c 	bna_rx_mcast_delall(bnad->rx_info[0].rx);
bnad             3202 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3206 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3208 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->rx_info[0].rx == NULL) {
bnad             3209 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3214 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->cfg_flags &= ~(BNAD_CF_PROMISC | BNAD_CF_DEFAULT |
bnad             3220 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->cfg_flags |= BNAD_CF_PROMISC;
bnad             3222 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_set_rx_mcast_fltr(bnad);
bnad             3224 drivers/net/ethernet/brocade/bna/bnad.c 		if (bnad->cfg_flags & BNAD_CF_ALLMULTI)
bnad             3227 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_set_rx_ucast_fltr(bnad);
bnad             3229 drivers/net/ethernet/brocade/bna/bnad.c 		if (bnad->cfg_flags & BNAD_CF_DEFAULT)
bnad             3235 drivers/net/ethernet/brocade/bna/bnad.c 	bna_rx_mode_set(bnad->rx_info[0].rx, new_mode, mode_mask);
bnad             3237 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3249 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3253 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3255 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_mac_addr_set_locked(bnad, sa->sa_data);
bnad             3259 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3265 drivers/net/ethernet/brocade/bna/bnad.c bnad_mtu_set(struct bnad *bnad, int frame_size)
bnad             3269 drivers/net/ethernet/brocade/bna/bnad.c 	init_completion(&bnad->bnad_completions.mtu_comp);
bnad             3271 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3272 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_mtu_set(&bnad->bna.enet, frame_size, bnad_cb_enet_mtu_set);
bnad             3273 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3275 drivers/net/ethernet/brocade/bna/bnad.c 	wait_for_completion(&bnad->bnad_completions.mtu_comp);
bnad             3277 drivers/net/ethernet/brocade/bna/bnad.c 	return bnad->bnad_completions.mtu_comp_status;
bnad             3284 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3287 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             3296 drivers/net/ethernet/brocade/bna/bnad.c 	if (BNAD_PCI_DEV_IS_CAT2(bnad) &&
bnad             3297 drivers/net/ethernet/brocade/bna/bnad.c 	    netif_running(bnad->netdev)) {
bnad             3301 drivers/net/ethernet/brocade/bna/bnad.c 			rx_count = bnad_reinit_rx(bnad);
bnad             3307 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_mtu_set(bnad, new_frame);
bnad             3311 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3318 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3321 drivers/net/ethernet/brocade/bna/bnad.c 	if (!bnad->rx_info[0].rx)
bnad             3324 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             3326 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3327 drivers/net/ethernet/brocade/bna/bnad.c 	bna_rx_vlan_add(bnad->rx_info[0].rx, vid);
bnad             3328 drivers/net/ethernet/brocade/bna/bnad.c 	set_bit(vid, bnad->active_vlans);
bnad             3329 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3331 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3339 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3342 drivers/net/ethernet/brocade/bna/bnad.c 	if (!bnad->rx_info[0].rx)
bnad             3345 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             3347 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3348 drivers/net/ethernet/brocade/bna/bnad.c 	clear_bit(vid, bnad->active_vlans);
bnad             3349 drivers/net/ethernet/brocade/bna/bnad.c 	bna_rx_vlan_del(bnad->rx_info[0].rx, vid);
bnad             3350 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3352 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3359 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(dev);
bnad             3365 drivers/net/ethernet/brocade/bna/bnad.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3368 drivers/net/ethernet/brocade/bna/bnad.c 			bna_rx_vlan_strip_enable(bnad->rx_info[0].rx);
bnad             3370 drivers/net/ethernet/brocade/bna/bnad.c 			bna_rx_vlan_strip_disable(bnad->rx_info[0].rx);
bnad             3372 drivers/net/ethernet/brocade/bna/bnad.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3382 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             3388 drivers/net/ethernet/brocade/bna/bnad.c 	if (!(bnad->cfg_flags & BNAD_CF_MSIX)) {
bnad             3389 drivers/net/ethernet/brocade/bna/bnad.c 		bna_intx_disable(&bnad->bna, curr_mask);
bnad             3390 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_isr(bnad->pcidev->irq, netdev);
bnad             3391 drivers/net/ethernet/brocade/bna/bnad.c 		bna_intx_enable(&bnad->bna, curr_mask);
bnad             3399 drivers/net/ethernet/brocade/bna/bnad.c 		for (i = 0; i < bnad->num_rx; i++) {
bnad             3400 drivers/net/ethernet/brocade/bna/bnad.c 			rx_info = &bnad->rx_info[i];
bnad             3403 drivers/net/ethernet/brocade/bna/bnad.c 			for (j = 0; j < bnad->num_rxp_per_rx; j++) {
bnad             3406 drivers/net/ethernet/brocade/bna/bnad.c 					bnad_netif_rx_schedule_poll(bnad,
bnad             3432 drivers/net/ethernet/brocade/bna/bnad.c bnad_netdev_init(struct bnad *bnad, bool using_dac)
bnad             3434 drivers/net/ethernet/brocade/bna/bnad.c 	struct net_device *netdev = bnad->netdev;
bnad             3450 drivers/net/ethernet/brocade/bna/bnad.c 	netdev->mem_start = bnad->mmio_start;
bnad             3451 drivers/net/ethernet/brocade/bna/bnad.c 	netdev->mem_end = bnad->mmio_start + bnad->mmio_len - 1;
bnad             3468 drivers/net/ethernet/brocade/bna/bnad.c bnad_init(struct bnad *bnad,
bnad             3476 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->netdev = netdev;
bnad             3477 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->pcidev = pdev;
bnad             3478 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->mmio_start = pci_resource_start(pdev, 0);
bnad             3479 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->mmio_len = pci_resource_len(pdev, 0);
bnad             3480 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->bar0 = ioremap_nocache(bnad->mmio_start, bnad->mmio_len);
bnad             3481 drivers/net/ethernet/brocade/bna/bnad.c 	if (!bnad->bar0) {
bnad             3485 drivers/net/ethernet/brocade/bna/bnad.c 	dev_info(&pdev->dev, "bar0 mapped to %p, len %llu\n", bnad->bar0,
bnad             3486 drivers/net/ethernet/brocade/bna/bnad.c 		 (unsigned long long) bnad->mmio_len);
bnad             3488 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3490 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->cfg_flags = BNAD_CF_MSIX;
bnad             3492 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->cfg_flags |= BNAD_CF_DIM_ENABLED;
bnad             3494 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_q_num_init(bnad);
bnad             3495 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3497 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->msix_num = (bnad->num_tx * bnad->num_txq_per_tx) +
bnad             3498 drivers/net/ethernet/brocade/bna/bnad.c 		(bnad->num_rx * bnad->num_rxp_per_rx) +
bnad             3501 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->txq_depth = BNAD_TXQ_DEPTH;
bnad             3502 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->rxq_depth = BNAD_RXQ_DEPTH;
bnad             3504 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->tx_coalescing_timeo = BFI_TX_COALESCING_TIMEO;
bnad             3505 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->rx_coalescing_timeo = BFI_RX_COALESCING_TIMEO;
bnad             3507 drivers/net/ethernet/brocade/bna/bnad.c 	sprintf(bnad->wq_name, "%s_wq_%d", BNAD_NAME, bnad->id);
bnad             3508 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->work_q = create_singlethread_workqueue(bnad->wq_name);
bnad             3509 drivers/net/ethernet/brocade/bna/bnad.c 	if (!bnad->work_q) {
bnad             3510 drivers/net/ethernet/brocade/bna/bnad.c 		iounmap(bnad->bar0);
bnad             3523 drivers/net/ethernet/brocade/bna/bnad.c bnad_uninit(struct bnad *bnad)
bnad             3525 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->work_q) {
bnad             3526 drivers/net/ethernet/brocade/bna/bnad.c 		flush_workqueue(bnad->work_q);
bnad             3527 drivers/net/ethernet/brocade/bna/bnad.c 		destroy_workqueue(bnad->work_q);
bnad             3528 drivers/net/ethernet/brocade/bna/bnad.c 		bnad->work_q = NULL;
bnad             3531 drivers/net/ethernet/brocade/bna/bnad.c 	if (bnad->bar0)
bnad             3532 drivers/net/ethernet/brocade/bna/bnad.c 		iounmap(bnad->bar0);
bnad             3542 drivers/net/ethernet/brocade/bna/bnad.c bnad_lock_init(struct bnad *bnad)
bnad             3544 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_init(&bnad->bna_lock);
bnad             3545 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_init(&bnad->conf_mutex);
bnad             3549 drivers/net/ethernet/brocade/bna/bnad.c bnad_lock_uninit(struct bnad *bnad)
bnad             3551 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_destroy(&bnad->conf_mutex);
bnad             3556 drivers/net/ethernet/brocade/bna/bnad.c bnad_pci_init(struct bnad *bnad,
bnad             3599 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad;
bnad             3617 drivers/net/ethernet/brocade/bna/bnad.c 	netdev = alloc_etherdev(sizeof(struct bnad));
bnad             3622 drivers/net/ethernet/brocade/bna/bnad.c 	bnad = netdev_priv(netdev);
bnad             3623 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_lock_init(bnad);
bnad             3624 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->id = atomic_inc_return(&bna_id) - 1;
bnad             3626 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             3633 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_pci_init(bnad, pdev, &using_dac);
bnad             3641 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_init(bnad, pdev, netdev);
bnad             3646 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_netdev_init(bnad, using_dac);
bnad             3653 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_debugfs_init(bnad);
bnad             3656 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3657 drivers/net/ethernet/brocade/bna/bnad.c 	bna_res_req(&bnad->res_info[0]);
bnad             3658 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3661 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_res_alloc(bnad, &bnad->res_info[0], BNA_RES_T_MAX);
bnad             3665 drivers/net/ethernet/brocade/bna/bnad.c 	bna = &bnad->bna;
bnad             3668 drivers/net/ethernet/brocade/bna/bnad.c 	pcidev_info.pci_slot = PCI_SLOT(bnad->pcidev->devfn);
bnad             3669 drivers/net/ethernet/brocade/bna/bnad.c 	pcidev_info.pci_func = PCI_FUNC(bnad->pcidev->devfn);
bnad             3670 drivers/net/ethernet/brocade/bna/bnad.c 	pcidev_info.device_id = bnad->pcidev->device;
bnad             3671 drivers/net/ethernet/brocade/bna/bnad.c 	pcidev_info.pci_bar_kva = bnad->bar0;
bnad             3673 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3674 drivers/net/ethernet/brocade/bna/bnad.c 	bna_init(bna, bnad, &pcidev_info, &bnad->res_info[0]);
bnad             3675 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3677 drivers/net/ethernet/brocade/bna/bnad.c 	bnad->stats.bna_stats = &bna->stats;
bnad             3679 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_enable_msix(bnad);
bnad             3680 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_mbox_irq_alloc(bnad);
bnad             3685 drivers/net/ethernet/brocade/bna/bnad.c 	timer_setup(&bnad->bna.ioceth.ioc.ioc_timer, bnad_ioc_timeout, 0);
bnad             3686 drivers/net/ethernet/brocade/bna/bnad.c 	timer_setup(&bnad->bna.ioceth.ioc.hb_timer, bnad_ioc_hb_check, 0);
bnad             3687 drivers/net/ethernet/brocade/bna/bnad.c 	timer_setup(&bnad->bna.ioceth.ioc.iocpf_timer, bnad_iocpf_timeout, 0);
bnad             3688 drivers/net/ethernet/brocade/bna/bnad.c 	timer_setup(&bnad->bna.ioceth.ioc.sem_timer, bnad_iocpf_sem_timeout,
bnad             3696 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_ioceth_enable(bnad);
bnad             3702 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3705 drivers/net/ethernet/brocade/bna/bnad.c 		bnad_q_num_adjust(bnad, bna_attr(bna)->num_txq - 1,
bnad             3711 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3715 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3716 drivers/net/ethernet/brocade/bna/bnad.c 	bna_mod_res_req(&bnad->bna, &bnad->mod_res_info[0]);
bnad             3717 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3719 drivers/net/ethernet/brocade/bna/bnad.c 	err = bnad_res_alloc(bnad, &bnad->mod_res_info[0], BNA_MOD_RES_T_MAX);
bnad             3725 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3726 drivers/net/ethernet/brocade/bna/bnad.c 	bna_mod_init(&bnad->bna, &bnad->mod_res_info[0]);
bnad             3727 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3730 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3731 drivers/net/ethernet/brocade/bna/bnad.c 	bna_enet_perm_mac_get(&bna->enet, bnad->perm_addr);
bnad             3732 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_set_netdev_perm_addr(bnad);
bnad             3733 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3735 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3743 drivers/net/ethernet/brocade/bna/bnad.c 	set_bit(BNAD_RF_NETDEV_REGISTERED, &bnad->run_flags);
bnad             3748 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3752 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             3753 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_res_free(bnad, &bnad->mod_res_info[0], BNA_MOD_RES_T_MAX);
bnad             3755 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_ioceth_disable(bnad);
bnad             3756 drivers/net/ethernet/brocade/bna/bnad.c 	del_timer_sync(&bnad->bna.ioceth.ioc.ioc_timer);
bnad             3757 drivers/net/ethernet/brocade/bna/bnad.c 	del_timer_sync(&bnad->bna.ioceth.ioc.sem_timer);
bnad             3758 drivers/net/ethernet/brocade/bna/bnad.c 	del_timer_sync(&bnad->bna.ioceth.ioc.hb_timer);
bnad             3759 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3761 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3762 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_mbox_irq_free(bnad);
bnad             3763 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_disable_msix(bnad);
bnad             3765 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_res_free(bnad, &bnad->res_info[0], BNA_RES_T_MAX);
bnad             3768 drivers/net/ethernet/brocade/bna/bnad.c 	kfree(bnad->regdata);
bnad             3769 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_debugfs_uninit(bnad);
bnad             3770 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_uninit(bnad);
bnad             3774 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3775 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_lock_uninit(bnad);
bnad             3784 drivers/net/ethernet/brocade/bna/bnad.c 	struct bnad *bnad;
bnad             3791 drivers/net/ethernet/brocade/bna/bnad.c 	bnad = netdev_priv(netdev);
bnad             3792 drivers/net/ethernet/brocade/bna/bnad.c 	bna = &bnad->bna;
bnad             3794 drivers/net/ethernet/brocade/bna/bnad.c 	if (test_and_clear_bit(BNAD_RF_NETDEV_REGISTERED, &bnad->run_flags))
bnad             3797 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_lock(&bnad->conf_mutex);
bnad             3798 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_ioceth_disable(bnad);
bnad             3799 drivers/net/ethernet/brocade/bna/bnad.c 	del_timer_sync(&bnad->bna.ioceth.ioc.ioc_timer);
bnad             3800 drivers/net/ethernet/brocade/bna/bnad.c 	del_timer_sync(&bnad->bna.ioceth.ioc.sem_timer);
bnad             3801 drivers/net/ethernet/brocade/bna/bnad.c 	del_timer_sync(&bnad->bna.ioceth.ioc.hb_timer);
bnad             3802 drivers/net/ethernet/brocade/bna/bnad.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             3804 drivers/net/ethernet/brocade/bna/bnad.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             3806 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_res_free(bnad, &bnad->mod_res_info[0], BNA_MOD_RES_T_MAX);
bnad             3807 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_res_free(bnad, &bnad->res_info[0], BNA_RES_T_MAX);
bnad             3808 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_mbox_irq_free(bnad);
bnad             3809 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_disable_msix(bnad);
bnad             3811 drivers/net/ethernet/brocade/bna/bnad.c 	mutex_unlock(&bnad->conf_mutex);
bnad             3812 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_lock_uninit(bnad);
bnad             3814 drivers/net/ethernet/brocade/bna/bnad.c 	kfree(bnad->regdata);
bnad             3815 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_debugfs_uninit(bnad);
bnad             3816 drivers/net/ethernet/brocade/bna/bnad.c 	bnad_uninit(bnad);
bnad               49 drivers/net/ethernet/brocade/bna/bnad.h 	struct bnad *bnad;
bnad               98 drivers/net/ethernet/brocade/bna/bnad.h #define BNAD_NUM_TXQ			(bnad->num_tx * bnad->num_txq_per_tx)
bnad               99 drivers/net/ethernet/brocade/bna/bnad.h #define BNAD_NUM_RXP			(bnad->num_rx * bnad->num_rxp_per_rx)
bnad              120 drivers/net/ethernet/brocade/bna/bnad.h 	struct bnad		*bnad;
bnad              381 drivers/net/ethernet/brocade/bna/bnad.h int bnad_mac_addr_set_locked(struct bnad *bnad, const u8 *mac_addr);
bnad              382 drivers/net/ethernet/brocade/bna/bnad.h int bnad_enable_default_bcast(struct bnad *bnad);
bnad              383 drivers/net/ethernet/brocade/bna/bnad.h void bnad_restore_vlans(struct bnad *bnad, u32 rx_id);
bnad              388 drivers/net/ethernet/brocade/bna/bnad.h void bnad_tx_coalescing_timeo_set(struct bnad *bnad);
bnad              389 drivers/net/ethernet/brocade/bna/bnad.h void bnad_rx_coalescing_timeo_set(struct bnad *bnad);
bnad              391 drivers/net/ethernet/brocade/bna/bnad.h int bnad_setup_rx(struct bnad *bnad, u32 rx_id);
bnad              392 drivers/net/ethernet/brocade/bna/bnad.h int bnad_setup_tx(struct bnad *bnad, u32 tx_id);
bnad              393 drivers/net/ethernet/brocade/bna/bnad.h void bnad_destroy_tx(struct bnad *bnad, u32 tx_id);
bnad              394 drivers/net/ethernet/brocade/bna/bnad.h void bnad_destroy_rx(struct bnad *bnad, u32 rx_id);
bnad              397 drivers/net/ethernet/brocade/bna/bnad.h void bnad_dim_timer_start(struct bnad *bnad);
bnad              400 drivers/net/ethernet/brocade/bna/bnad.h void bnad_netdev_qstats_fill(struct bnad *bnad,
bnad              402 drivers/net/ethernet/brocade/bna/bnad.h void bnad_netdev_hwstats_fill(struct bnad *bnad,
bnad              406 drivers/net/ethernet/brocade/bna/bnad.h void bnad_debugfs_init(struct bnad *bnad);
bnad              407 drivers/net/ethernet/brocade/bna/bnad.h void bnad_debugfs_uninit(struct bnad *bnad);
bnad               43 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bnad *bnad = inode->i_private;
bnad               61 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad               62 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	rc = bfa_nw_ioc_debug_fwtrc(&bnad->bna.ioceth.ioc,
bnad               65 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad               71 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed to collect fwtrc\n");
bnad               83 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bnad *bnad = inode->i_private;
bnad              101 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              102 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	rc = bfa_nw_ioc_debug_fwsave(&bnad->bna.ioceth.ioc,
bnad              105 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              111 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed to collect fwsave\n");
bnad              137 drivers/net/ethernet/brocade/bna/bnad_debugfs.c bnad_get_debug_drvinfo(struct bnad *bnad, void *buffer, u32 len)
bnad              145 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              146 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, &drvinfo->ioc_attr);
bnad              147 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              150 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	fcomp.bnad = bnad;
bnad              153 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              154 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	ret = bfa_nw_cee_get_attr(&bnad->bna.cee, &drvinfo->cee_attr,
bnad              157 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              160 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              167 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              168 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	ret = bfa_nw_flash_get_attr(&bnad->bna.flash, &drvinfo->flash_attr,
bnad              171 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              174 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              184 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bnad *bnad = inode->i_private;
bnad              201 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	mutex_lock(&bnad->conf_mutex);
bnad              202 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	rc = bnad_get_debug_drvinfo(bnad, drv_info->debug_buffer,
bnad              204 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	mutex_unlock(&bnad->conf_mutex);
bnad              210 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed to collect drvinfo\n");
bnad              282 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bnad *bnad = (struct bnad *)regrd_debug->i_private;
bnad              285 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	if (!bnad->regdata)
bnad              289 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			bnad->regdata, bnad->reglen);
bnad              291 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	if ((*pos + nbytes) >= bnad->reglen) {
bnad              292 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		kfree(bnad->regdata);
bnad              293 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		bnad->regdata = NULL;
bnad              294 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		bnad->reglen = 0;
bnad              305 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bnad *bnad = (struct bnad *)regrd_debug->i_private;
bnad              306 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
bnad              321 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed to read user buffer\n");
bnad              327 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	kfree(bnad->regdata);
bnad              328 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	bnad->reglen = 0;
bnad              330 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	bnad->regdata = kzalloc(len << 2, GFP_KERNEL);
bnad              331 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	if (!bnad->regdata)
bnad              334 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	bnad->reglen = len << 2;
bnad              341 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed reg offset check\n");
bnad              342 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		kfree(bnad->regdata);
bnad              343 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		bnad->regdata = NULL;
bnad              344 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		bnad->reglen = 0;
bnad              349 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	regbuf =  (u32 *)bnad->regdata;
bnad              350 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              356 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              366 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bnad *bnad = (struct bnad *)debug->i_private;
bnad              367 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
bnad              381 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed to read user buffer\n");
bnad              392 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		netdev_warn(bnad->netdev, "failed reg offset check\n");
bnad              397 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              399 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              493 drivers/net/ethernet/brocade/bna/bnad_debugfs.c bnad_debugfs_init(struct bnad *bnad)
bnad              504 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			netdev_warn(bnad->netdev,
bnad              511 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	snprintf(name, sizeof(name), "pci_dev:%s", pci_name(bnad->pcidev));
bnad              512 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	if (!bnad->port_debugfs_root) {
bnad              513 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		bnad->port_debugfs_root =
bnad              515 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		if (!bnad->port_debugfs_root) {
bnad              516 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			netdev_warn(bnad->netdev,
bnad              525 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			bnad->bnad_dentry_files[i] =
bnad              528 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 							bnad->port_debugfs_root,
bnad              529 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 							bnad,
bnad              531 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			if (!bnad->bnad_dentry_files[i]) {
bnad              532 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 				netdev_warn(bnad->netdev,
bnad              543 drivers/net/ethernet/brocade/bna/bnad_debugfs.c bnad_debugfs_uninit(struct bnad *bnad)
bnad              548 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		if (bnad->bnad_dentry_files[i]) {
bnad              549 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			debugfs_remove(bnad->bnad_dentry_files[i]);
bnad              550 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 			bnad->bnad_dentry_files[i] = NULL;
bnad              555 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 	if (bnad->port_debugfs_root) {
bnad              556 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		debugfs_remove(bnad->port_debugfs_root);
bnad              557 drivers/net/ethernet/brocade/bna/bnad_debugfs.c 		bnad->port_debugfs_root = NULL;
bnad              282 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              291 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              292 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bfa_nw_ioc_get_attr(&bnad->bna.ioceth.ioc, ioc_attr);
bnad              293 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              300 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	strlcpy(drvinfo->bus_info, pci_name(bnad->pcidev),
bnad              314 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              318 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              320 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		(bnad->cfg_flags & BNAD_CF_DIM_ENABLED) ? true : false;
bnad              321 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              323 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	coalesce->rx_coalesce_usecs = bnad->rx_coalescing_timeo *
bnad              325 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	coalesce->tx_coalesce_usecs = bnad->tx_coalescing_timeo *
bnad              335 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              349 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_lock(&bnad->conf_mutex);
bnad              355 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              357 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!(bnad->cfg_flags & BNAD_CF_DIM_ENABLED)) {
bnad              358 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad->cfg_flags |= BNAD_CF_DIM_ENABLED;
bnad              359 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_dim_timer_start(bnad);
bnad              362 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (bnad->cfg_flags & BNAD_CF_DIM_ENABLED) {
bnad              363 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad->cfg_flags &= ~BNAD_CF_DIM_ENABLED;
bnad              364 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (bnad->cfg_flags & BNAD_CF_DIM_ENABLED &&
bnad              366 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			    &bnad->run_flags)) {
bnad              368 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 							&bnad->run_flags);
bnad              371 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              373 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				del_timer_sync(&bnad->dim_timer);
bnad              374 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              375 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_rx_coalescing_timeo_set(bnad);
bnad              378 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (bnad->tx_coalescing_timeo != coalesce->tx_coalesce_usecs /
bnad              380 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bnad->tx_coalescing_timeo = coalesce->tx_coalesce_usecs /
bnad              382 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bnad_tx_coalescing_timeo_set(bnad);
bnad              385 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (bnad->rx_coalescing_timeo != coalesce->rx_coalesce_usecs /
bnad              387 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bnad->rx_coalescing_timeo = coalesce->rx_coalesce_usecs /
bnad              390 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!(bnad->cfg_flags & BNAD_CF_DIM_ENABLED))
bnad              391 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_rx_coalescing_timeo_set(bnad);
bnad              397 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              399 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_unlock(&bnad->conf_mutex);
bnad              407 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              412 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ringparam->rx_pending = bnad->rxq_depth;
bnad              413 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ringparam->tx_pending = bnad->txq_depth;
bnad              421 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              424 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_lock(&bnad->conf_mutex);
bnad              425 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (ringparam->rx_pending == bnad->rxq_depth &&
bnad              426 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	    ringparam->tx_pending == bnad->txq_depth) {
bnad              427 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		mutex_unlock(&bnad->conf_mutex);
bnad              434 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		mutex_unlock(&bnad->conf_mutex);
bnad              440 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		mutex_unlock(&bnad->conf_mutex);
bnad              444 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (ringparam->rx_pending != bnad->rxq_depth) {
bnad              445 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bnad->rxq_depth = ringparam->rx_pending;
bnad              447 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			mutex_unlock(&bnad->conf_mutex);
bnad              451 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (i = 0; i < bnad->num_rx; i++) {
bnad              452 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (!bnad->rx_info[i].rx)
bnad              454 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_destroy_rx(bnad, i);
bnad              455 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			current_err = bnad_setup_rx(bnad, i);
bnad              460 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!err && bnad->rx_info[0].rx) {
bnad              462 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_restore_vlans(bnad, 0);
bnad              463 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_enable_default_bcast(bnad);
bnad              464 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              465 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_mac_addr_set_locked(bnad, netdev->dev_addr);
bnad              466 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              467 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad->cfg_flags &= ~(BNAD_CF_ALLMULTI |
bnad              472 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (ringparam->tx_pending != bnad->txq_depth) {
bnad              473 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bnad->txq_depth = ringparam->tx_pending;
bnad              475 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			mutex_unlock(&bnad->conf_mutex);
bnad              479 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (i = 0; i < bnad->num_tx; i++) {
bnad              480 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (!bnad->tx_info[i].tx)
bnad              482 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			bnad_destroy_tx(bnad, i);
bnad              483 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			current_err = bnad_setup_tx(bnad, i);
bnad              489 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_unlock(&bnad->conf_mutex);
bnad              497 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              500 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	pauseparam->rx_pause = bnad->bna.enet.pause_config.rx_pause;
bnad              501 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	pauseparam->tx_pause = bnad->bna.enet.pause_config.tx_pause;
bnad              508 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              515 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_lock(&bnad->conf_mutex);
bnad              516 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (pauseparam->rx_pause != bnad->bna.enet.pause_config.rx_pause ||
bnad              517 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	    pauseparam->tx_pause != bnad->bna.enet.pause_config.tx_pause) {
bnad              520 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              521 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bna_enet_pause_config(&bnad->bna.enet, &pause_config);
bnad              522 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              524 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_unlock(&bnad->conf_mutex);
bnad              531 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              535 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_lock(&bnad->conf_mutex);
bnad              546 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bmap = bna_tx_rid_mask(&bnad->bna);
bnad              577 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		bmap = bna_rx_rid_mask(&bnad->bna);
bnad              605 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (i = 0; i < bnad->num_rx; i++) {
bnad              606 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (!bnad->rx_info[i].rx)
bnad              608 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			for (j = 0; j < bnad->num_rxp_per_rx; j++) {
bnad              631 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (i = 0; i < bnad->num_rx; i++) {
bnad              632 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (!bnad->rx_info[i].rx)
bnad              634 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			for (j = 0; j < bnad->num_rxp_per_rx; j++) {
bnad              651 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				if (bnad->rx_info[i].rx_ctrl[j].ccb &&
bnad              652 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 					bnad->rx_info[i].rx_ctrl[j].ccb->
bnad              654 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 					bnad->rx_info[i].rx_ctrl[j].ccb->
bnad              681 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (i = 0; i < bnad->num_tx; i++) {
bnad              682 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (!bnad->tx_info[i].tx)
bnad              684 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			for (j = 0; j < bnad->num_txq_per_tx; j++) {
bnad              706 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_unlock(&bnad->conf_mutex);
bnad              712 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              716 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bmap = bna_tx_rid_mask(&bnad->bna);
bnad              722 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bmap = bna_rx_rid_mask(&bnad->bna);
bnad              732 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad              733 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!bnad->rx_info[i].rx)
bnad              735 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		count += bnad->num_rxp_per_rx * BNAD_NUM_CQ_COUNTERS;
bnad              736 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		count += bnad->num_rxp_per_rx * BNAD_NUM_RXQ_COUNTERS;
bnad              737 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (j = 0; j < bnad->num_rxp_per_rx; j++)
bnad              738 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (bnad->rx_info[i].rx_ctrl[j].ccb &&
bnad              739 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->rx_info[i].rx_ctrl[j].ccb->rcb[1] &&
bnad              740 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->rx_info[i].rx_ctrl[j].ccb->rcb[1]->rxq)
bnad              744 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	for (i = 0; i < bnad->num_tx; i++) {
bnad              745 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!bnad->tx_info[i].tx)
bnad              747 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		count += bnad->num_txq_per_tx * BNAD_NUM_TXQ_COUNTERS;
bnad              753 drivers/net/ethernet/brocade/bna/bnad_ethtool.c bnad_per_q_stats_fill(struct bnad *bnad, u64 *buf, int bi)
bnad              759 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad              760 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!bnad->rx_info[i].rx)
bnad              762 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (j = 0; j < bnad->num_rxp_per_rx; j++)
bnad              763 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (bnad->rx_info[i].rx_ctrl[j].ccb &&
bnad              764 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->rx_info[i].rx_ctrl[j].ccb->rcb[0] &&
bnad              765 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->rx_info[i].rx_ctrl[j].ccb->rcb[0]->rxq) {
bnad              766 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = bnad->rx_info[i].rx_ctrl[j].
bnad              769 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = *(bnad->rx_info[i].rx_ctrl[j].
bnad              772 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = bnad->rx_info[i].
bnad              774 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = bnad->rx_info[i].
bnad              776 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = bnad->rx_info[i].
bnad              778 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = bnad->rx_info[i].
bnad              780 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				buf[bi++] = bnad->rx_info[i].
bnad              784 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	for (i = 0; i < bnad->num_rx; i++) {
bnad              785 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!bnad->rx_info[i].rx)
bnad              787 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (j = 0; j < bnad->num_rxp_per_rx; j++)
bnad              788 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (bnad->rx_info[i].rx_ctrl[j].ccb) {
bnad              789 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				if (bnad->rx_info[i].rx_ctrl[j].ccb->rcb[0] &&
bnad              790 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 					bnad->rx_info[i].rx_ctrl[j].ccb->
bnad              792 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 					rcb = bnad->rx_info[i].rx_ctrl[j].
bnad              804 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				if (bnad->rx_info[i].rx_ctrl[j].ccb->rcb[1] &&
bnad              805 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 					bnad->rx_info[i].rx_ctrl[j].ccb->
bnad              807 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 					rcb = bnad->rx_info[i].rx_ctrl[j].
bnad              822 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	for (i = 0; i < bnad->num_tx; i++) {
bnad              823 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		if (!bnad->tx_info[i].tx)
bnad              825 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		for (j = 0; j < bnad->num_txq_per_tx; j++)
bnad              826 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			if (bnad->tx_info[i].tcb[j] &&
bnad              827 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->tx_info[i].tcb[j]->txq) {
bnad              828 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				tcb = bnad->tx_info[i].tcb[j];
bnad              844 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad              851 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_lock(&bnad->conf_mutex);
bnad              853 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		mutex_unlock(&bnad->conf_mutex);
bnad              861 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              864 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bnad_netdev_qstats_fill(bnad, &net_stats64);
bnad              865 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bnad_netdev_hwstats_fill(bnad, &net_stats64);
bnad              883 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bnad->stats.drv_stats.netif_queue_stopped = netif_queue_stopped(netdev);
bnad              886 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	stats64 = (u64 *)&bnad->stats.drv_stats;
bnad              891 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	stats64 = (u64 *) &bnad->stats.bna_stats->hw_stats;
bnad              899 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bmap = bna_tx_rid_mask(&bnad->bna);
bnad              902 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			stats64 = (u64 *)&bnad->stats.bna_stats->
bnad              912 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bmap = bna_rx_rid_mask(&bnad->bna);
bnad              915 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			stats64 = (u64 *)&bnad->stats.bna_stats->
bnad              925 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	bi = bnad_per_q_stats_fill(bnad, buf, bi);
bnad              927 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              929 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	mutex_unlock(&bnad->conf_mutex);
bnad              944 drivers/net/ethernet/brocade/bna/bnad_ethtool.c bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset,
bnad              956 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	fcomp.bnad = bnad;
bnad              960 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad              961 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ret = bfa_nw_flash_get_attr(&bnad->bna.flash, flash_attr,
bnad              964 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              968 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad              998 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             1005 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	eeprom->magic = bnad->pcidev->vendor | (bnad->pcidev->device << 16);
bnad             1008 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	flash_part = bnad_get_flash_partition_by_offset(bnad,
bnad             1013 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	fcomp.bnad = bnad;
bnad             1017 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1018 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ret = bfa_nw_flash_read_part(&bnad->bna.flash, flash_part,
bnad             1019 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->id, bytes, eeprom->len,
bnad             1023 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1027 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1038 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             1045 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	if (eeprom->magic != (bnad->pcidev->vendor |
bnad             1046 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 			     (bnad->pcidev->device << 16)))
bnad             1050 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	flash_part = bnad_get_flash_partition_by_offset(bnad,
bnad             1055 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	fcomp.bnad = bnad;
bnad             1059 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irqsave(&bnad->bna_lock, flags);
bnad             1060 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ret = bfa_nw_flash_update_part(&bnad->bna.flash, flash_part,
bnad             1061 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->id, bytes, eeprom->len,
bnad             1065 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1069 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irqrestore(&bnad->bna_lock, flags);
bnad             1079 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	struct bnad *bnad = netdev_priv(netdev);
bnad             1084 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ret = request_firmware(&fw, eflash->data, &bnad->pcidev->dev);
bnad             1090 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	fcomp.bnad = bnad;
bnad             1094 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_lock_irq(&bnad->bna_lock);
bnad             1095 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	ret = bfa_nw_flash_update_part(&bnad->bna.flash, BFA_FLASH_PART_FWIMG,
bnad             1096 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 				bnad->id, (u8 *)fw->data, fw->size, 0,
bnad             1101 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 		spin_unlock_irq(&bnad->bna_lock);
bnad             1105 drivers/net/ethernet/brocade/bna/bnad_ethtool.c 	spin_unlock_irq(&bnad->bna_lock);