• Home
  • Raw
  • Download

Lines Matching refs:nesvnic

58 	nesdev = mgtvnic->nesvnic->nesdev;  in nes_replenish_mgt_rq()
75 skb = dev_alloc_skb(mgtvnic->nesvnic->max_frame_size); in nes_replenish_mgt_rq()
77 skb->dev = mgtvnic->nesvnic->netdev; in nes_replenish_mgt_rq()
80 skb->data, mgtvnic->nesvnic->max_frame_size, PCI_DMA_FROMDEVICE); in nes_replenish_mgt_rq()
83 cb->maplen = mgtvnic->nesvnic->max_frame_size; in nes_replenish_mgt_rq()
87 cpu_to_le32(mgtvnic->nesvnic->max_frame_size); in nes_replenish_mgt_rq()
406 static int forward_fpdus(struct nes_vnic *nesvnic, struct nes_qp *nesqp) in forward_fpdus() argument
408 struct nes_device *nesdev = nesvnic->nesdev; in forward_fpdus()
430 (((u32)nesvnic->logical_port) << NES_CQP_OP_LOGICAL_PORT_SHIFT)); in forward_fpdus()
483 static void process_fpdus(struct nes_vnic *nesvnic, struct nes_qp *nesqp) in process_fpdus() argument
490 forward_fpdus(nesvnic, nesqp); in process_fpdus()
507 static void queue_fpdus(struct sk_buff *skb, struct nes_vnic *nesvnic, struct nes_qp *nesqp) in queue_fpdus() argument
540 nes_mgt_free_skb(nesvnic->nesdev, skb, PCI_DMA_TODEVICE); in queue_fpdus()
570 process_fpdus(nesvnic, nesqp); in queue_fpdus()
580 struct nes_vnic *nesvnic = context; in mgt_thread() local
585 wait_event_interruptible(nesvnic->mgt_wait_queue, in mgt_thread()
586 skb_queue_len(&nesvnic->mgt_skb_list) || kthread_should_stop()); in mgt_thread()
587 while ((skb_queue_len(&nesvnic->mgt_skb_list)) && !kthread_should_stop()) { in mgt_thread()
588 skb = skb_dequeue(&nesvnic->mgt_skb_list); in mgt_thread()
591 cb->busaddr = pci_map_single(nesvnic->nesdev->pcidev, cb->data_start, in mgt_thread()
592 nesvnic->max_frame_size, PCI_DMA_TODEVICE); in mgt_thread()
593 queue_fpdus(skb, nesvnic, cb->nesqp); in mgt_thread()
598 while (skb_queue_len(&nesvnic->mgt_skb_list)) { in mgt_thread()
599 skb = skb_dequeue(&nesvnic->mgt_skb_list); in mgt_thread()
610 void nes_queue_mgt_skbs(struct sk_buff *skb, struct nes_vnic *nesvnic, struct nes_qp *nesqp) in nes_queue_mgt_skbs() argument
616 skb_queue_tail(&nesvnic->mgt_skb_list, skb); in nes_queue_mgt_skbs()
617 wake_up_interruptible(&nesvnic->mgt_wait_queue); in nes_queue_mgt_skbs()
706 process_fpdus(qh_chg->nesvnic, qh_chg->nesqp); in nes_chg_qh_handler()
716 struct nes_vnic *nesvnic, struct nes_qp *nesqp) in nes_change_quad_hash() argument
738 qh_chg->nesvnic = nesvnic; in nes_change_quad_hash()
814 nes_change_quad_hash(nesdev, mgtvnic->nesvnic, nesqp); in nes_mgt_ce_handler()
820 rx_skb->protocol = eth_type_trans(rx_skb, mgtvnic->nesvnic->netdev); in nes_mgt_ce_handler()
828 nes_queue_mgt_skbs(rx_skb, mgtvnic->nesvnic, nesqp); in nes_mgt_ce_handler()
860 int nes_init_mgt_qp(struct nes_device *nesdev, struct net_device *netdev, struct nes_vnic *nesvnic) in nes_init_mgt_qp() argument
902 nesvnic->mgt_mem_size = NES_MGT_QP_COUNT * mgt_mem_size; in nes_init_mgt_qp()
903 nesvnic->mgt_vbase = mgt_vbase; in nes_init_mgt_qp()
904 nesvnic->mgt_pbase = mgt_pbase; in nes_init_mgt_qp()
906 skb_queue_head_init(&nesvnic->mgt_skb_list); in nes_init_mgt_qp()
907 init_waitqueue_head(&nesvnic->mgt_wait_queue); in nes_init_mgt_qp()
908 nesvnic->mgt_thread = kthread_run(mgt_thread, nesvnic, "nes_mgt_thread"); in nes_init_mgt_qp()
911 mgtvnic->nesvnic = nesvnic; in nes_init_mgt_qp()
1014 pci_free_consistent(nesdev->pcidev, nesvnic->mgt_mem_size, nesvnic->mgt_vbase, in nes_init_mgt_qp()
1015 nesvnic->mgt_pbase); in nes_init_mgt_qp()
1018 nes_destroy_mgt(nesvnic); in nes_init_mgt_qp()
1025 skb = dev_alloc_skb(nesvnic->max_frame_size); in nes_init_mgt_qp()
1034 nesvnic->max_frame_size, PCI_DMA_FROMDEVICE); in nes_init_mgt_qp()
1037 cb->maplen = nesvnic->max_frame_size; in nes_init_mgt_qp()
1040 mgt_rqe->wqe_words[NES_NIC_RQ_WQE_LENGTH_1_0_IDX] = cpu_to_le32((u32)nesvnic->max_frame_size); in nes_init_mgt_qp()
1066 nesvnic->mgtvnic[i] = mgtvnic++; in nes_init_mgt_qp()
1072 void nes_destroy_mgt(struct nes_vnic *nesvnic) in nes_destroy_mgt() argument
1074 struct nes_device *nesdev = nesvnic->nesdev; in nes_destroy_mgt()
1084 kthread_stop(nesvnic->mgt_thread); in nes_destroy_mgt()
1087 first_mgtvnic = nesvnic->mgtvnic[0]; in nes_destroy_mgt()
1089 mgtvnic = nesvnic->mgtvnic[i]; in nes_destroy_mgt()
1149 nesvnic->mgtvnic[i] = NULL; in nes_destroy_mgt()
1152 if (nesvnic->mgt_vbase) { in nes_destroy_mgt()
1153 pci_free_consistent(nesdev->pcidev, nesvnic->mgt_mem_size, nesvnic->mgt_vbase, in nes_destroy_mgt()
1154 nesvnic->mgt_pbase); in nes_destroy_mgt()
1155 nesvnic->mgt_vbase = NULL; in nes_destroy_mgt()
1156 nesvnic->mgt_pbase = 0; in nes_destroy_mgt()