/linux-4.1.27/drivers/net/ethernet/neterion/vxge/ |
H A D | vxge-config.c | 25 status = __vxge_hw_vpath_stats_access(vpath, \ 50 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_wait_receive_idle() local 54 vpath = &hldev->virtual_paths[vp_id]; vxge_hw_vpath_wait_receive_idle() 55 vp_reg = vpath->vp_reg; vxge_hw_vpath_wait_receive_idle() 59 /* Check that the ring controller for this vpath has enough free RxDs vxge_hw_vpath_wait_receive_idle() 62 * RXD_SPAT value for the vpath. vxge_hw_vpath_wait_receive_idle() 76 /* Check that the ring controller for this vpath does vxge_hw_vpath_wait_receive_idle() 96 * stored in the frame buffer for each vpath assigned to the given 157 vxge_hw_vpath_fw_api(struct __vxge_hw_virtualpath *vpath, u32 action, vxge_hw_vpath_fw_api() argument 161 struct vxge_hw_vpath_reg __iomem *vp_reg = vpath->vp_reg; vxge_hw_vpath_fw_api() 166 spin_lock(&vpath->lock); vxge_hw_vpath_fw_api() 167 if (!vpath->vp_open) { vxge_hw_vpath_fw_api() 168 spin_unlock(&vpath->lock); vxge_hw_vpath_fw_api() 196 if (!vpath->vp_open) vxge_hw_vpath_fw_api() 216 if (vpath->vp_open) vxge_hw_vpath_fw_api() 217 spin_unlock(&vpath->lock); vxge_hw_vpath_fw_api() 226 struct __vxge_hw_virtualpath *vpath; vxge_hw_upgrade_read_version() local 229 vpath = &hldev->virtual_paths[hldev->first_vp_id]; vxge_hw_upgrade_read_version() 231 status = vxge_hw_vpath_fw_api(vpath, vxge_hw_upgrade_read_version() 249 struct __vxge_hw_virtualpath *vpath; vxge_hw_flash_fw() local 253 vpath = &hldev->virtual_paths[hldev->first_vp_id]; vxge_hw_flash_fw() 255 status = vxge_hw_vpath_fw_api(vpath, vxge_hw_flash_fw() 280 struct __vxge_hw_virtualpath *vpath; vxge_update_fw_image() local 284 vpath = &hldev->virtual_paths[hldev->first_vp_id]; vxge_update_fw_image() 287 status = vxge_hw_vpath_fw_api(vpath, vxge_update_fw_image() 306 status = vxge_hw_vpath_fw_api(vpath, vxge_update_fw_image() 377 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_eprom_img_ver_get() local 381 vpath = &hldev->virtual_paths[hldev->first_vp_id]; vxge_hw_vpath_eprom_img_ver_get() 387 status = vxge_hw_vpath_fw_api(vpath, vxge_hw_vpath_eprom_img_ver_get() 426 struct __vxge_hw_virtualpath *vpath; __vxge_hw_channel_initialize() local 428 vpath = channel->vph->vpath; __vxge_hw_channel_initialize() 437 vpath->fifoh = (struct __vxge_hw_fifo *)channel; __vxge_hw_channel_initialize() 442 vpath->ringh = (struct __vxge_hw_ring *)channel; __vxge_hw_channel_initialize() 496 /* __vxge_hw_device_vpath_reset_in_prog_check - Check if vpath reset 498 * This routine checks the vpath reset in progress register is turned zero 700 * __vxge_hw_vpath_func_id_get - Get the function id of the vpath. 701 * Returns the function number of the vpath. 804 __vxge_hw_vpath_fw_ver_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_fw_ver_get() argument 814 status = vxge_hw_vpath_fw_api(vpath, __vxge_hw_vpath_fw_ver_get() 871 __vxge_hw_vpath_card_info_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_card_info_get() argument 883 status = vxge_hw_vpath_fw_api(vpath, __vxge_hw_vpath_card_info_get() 896 status = vxge_hw_vpath_fw_api(vpath, __vxge_hw_vpath_card_info_get() 911 status = vxge_hw_vpath_fw_api(vpath, __vxge_hw_vpath_card_info_get() 930 __vxge_hw_vpath_pci_func_mode_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_pci_func_mode_get() argument 938 status = vxge_hw_vpath_fw_api(vpath, __vxge_hw_vpath_pci_func_mode_get() 950 * __vxge_hw_vpath_addr_get - Get the hw address entry for this vpath 954 __vxge_hw_vpath_addr_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_addr_get() argument 963 status = vxge_hw_vpath_fw_api(vpath, action, __vxge_hw_vpath_addr_get() 991 * Returns the vpath mask that has the bits set for each vpath allocated 993 * each vpath 1006 struct __vxge_hw_virtualpath vpath; vxge_hw_device_hw_info_get() local 1054 spin_lock_init(&vpath.lock); vxge_hw_device_hw_info_get() 1055 vpath.vp_reg = bar0 + val64; vxge_hw_device_hw_info_get() 1056 vpath.vp_open = VXGE_HW_VP_NOT_OPEN; vxge_hw_device_hw_info_get() 1058 status = __vxge_hw_vpath_pci_func_mode_get(&vpath, hw_info); vxge_hw_device_hw_info_get() 1062 status = __vxge_hw_vpath_fw_ver_get(&vpath, hw_info); vxge_hw_device_hw_info_get() 1066 status = __vxge_hw_vpath_card_info_get(&vpath, hw_info); vxge_hw_device_hw_info_get() 1078 vpath.vp_reg = bar0 + val64; vxge_hw_device_hw_info_get() 1079 vpath.vp_open = VXGE_HW_VP_NOT_OPEN; vxge_hw_device_hw_info_get() 1081 status = __vxge_hw_vpath_addr_get(&vpath, vxge_hw_device_hw_info_get() 1241 * __vxge_hw_device_vpath_config_check - Check vpath configuration. 1242 * Check the vpath configuration 1413 __vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_stats_access() argument 1420 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { __vxge_hw_vpath_stats_access() 1425 vp_reg = vpath->vp_reg; __vxge_hw_vpath_stats_access() 1434 vpath->hldev->config.device_poll_millis); __vxge_hw_vpath_stats_access() 1445 * __vxge_hw_vpath_xmac_tx_stats_get - Get the TX Statistics of a vpath 1448 __vxge_hw_vpath_xmac_tx_stats_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_xmac_tx_stats_get() argument 1458 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { __vxge_hw_vpath_xmac_tx_stats_get() 1464 status = __vxge_hw_vpath_stats_access(vpath, __vxge_hw_vpath_xmac_tx_stats_get() 1477 * __vxge_hw_vpath_xmac_rx_stats_get - Get the RX Statistics of a vpath 1480 __vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_xmac_rx_stats_get() argument 1489 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { __vxge_hw_vpath_xmac_rx_stats_get() 1494 status = __vxge_hw_vpath_stats_access(vpath, __vxge_hw_vpath_xmac_rx_stats_get() 1508 * __vxge_hw_vpath_stats_get - Get the vpath hw statistics. 1511 __vxge_hw_vpath_stats_get(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_stats_get() argument 1518 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { __vxge_hw_vpath_stats_get() 1522 vp_reg = vpath->vp_reg; __vxge_hw_vpath_stats_get() 1582 status = __vxge_hw_vpath_xmac_tx_stats_get(vpath, &hw_stats->tx_stats); __vxge_hw_vpath_stats_get() 1586 status = __vxge_hw_vpath_xmac_rx_stats_get(vpath, &hw_stats->rx_stats); __vxge_hw_vpath_stats_get() 1646 * Returns the vpath h/w stats for the device. 1678 * Returns the vpath s/w stats for the device. 2194 hldev = vph->vpath->hldev; __vxge_hw_channel_allocate() 2195 vp_id = vph->vpath->vp_id; __vxge_hw_channel_allocate() 2756 * This function resets the ring during vpath reset operation 2788 struct __vxge_hw_ring *ring = vp->vpath->ringh; __vxge_hw_ring_delete() 2795 vp->vpath->ringh = NULL; __vxge_hw_ring_delete() 2824 hldev = vp->vpath->hldev; __vxge_hw_ring_create() 2825 vp_id = vp->vpath->vp_id; __vxge_hw_ring_create() 2842 vp->vpath->ringh = ring; __vxge_hw_ring_create() 2844 ring->vp_reg = vp->vpath->vp_reg; __vxge_hw_ring_create() 2846 ring->stats = &vp->vpath->sw_stats->ring_stats; __vxge_hw_ring_create() 2852 ring->tim_rti_cfg1_saved = vp->vpath->tim_rti_cfg1_saved; __vxge_hw_ring_create() 2853 ring->tim_rti_cfg3_saved = vp->vpath->tim_rti_cfg3_saved; __vxge_hw_ring_create() 3071 * __vxge_hw_vpath_swapper_set - Set the swapper bits for the vpath. 3072 * Set the swapper bits appropriately for the vpath. 3091 * Set the swapper bits appropriately for the vpath. 3373 * This function resets the fifo during vpath reset operation 3392 struct __vxge_hw_fifo *fifo = vp->vpath->fifoh; __vxge_hw_fifo_delete() 3399 vp->vpath->fifoh = NULL; __vxge_hw_fifo_delete() 3461 struct __vxge_hw_virtualpath *vpath; __vxge_hw_fifo_create() local 3467 vpath = vp->vpath; __vxge_hw_fifo_create() 3468 config = &vpath->hldev->config.vp_config[vpath->vp_id].fifo; __vxge_hw_fifo_create() 3484 vpath->fifoh = fifo; __vxge_hw_fifo_create() 3485 fifo->nofl_db = vpath->nofl_db; __vxge_hw_fifo_create() 3487 fifo->vp_id = vpath->vp_id; __vxge_hw_fifo_create() 3488 fifo->vp_reg = vpath->vp_reg; __vxge_hw_fifo_create() 3489 fifo->stats = &vpath->sw_stats->fifo_stats; __vxge_hw_fifo_create() 3495 fifo->tim_tti_cfg1_saved = vpath->tim_tti_cfg1_saved; __vxge_hw_fifo_create() 3496 fifo->tim_tti_cfg3_saved = vpath->tim_tti_cfg3_saved; __vxge_hw_fifo_create() 3546 __vxge_hw_mempool_create(vpath->hldev, __vxge_hw_fifo_create() 3575 * Read from the vpath pci config space. 3578 __vxge_hw_vpath_pci_read(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_pci_read() argument 3583 struct vxge_hw_vpath_reg __iomem *vp_reg = vpath->vp_reg; __vxge_hw_vpath_pci_read() 3624 struct __vxge_hw_virtualpath *vpath; vxge_hw_device_flick_link_led() local 3633 vpath = &hldev->virtual_paths[hldev->first_vp_id]; vxge_hw_device_flick_link_led() 3636 status = vxge_hw_vpath_fw_api(vpath, vxge_hw_device_flick_link_led() 3671 status = vxge_hw_vpath_fw_api(vp->vpath, action, rts_table, offset, __vxge_hw_vpath_rts_table_get() 3707 status = vxge_hw_vpath_fw_api(vp->vpath, action, rts_table, offset, __vxge_hw_vpath_rts_table_set() 3831 if (vp->vpath->hldev->config.rth_it_type vxge_hw_vpath_rts_rth_itable_set() 3974 struct __vxge_hw_virtualpath *vpath) __vxge_hw_vpath_mgmt_read() 3981 val64 = readq(&vpath->vpmgmt_reg-> __vxge_hw_vpath_mgmt_read() 3991 vpath->max_mtu = mtu + VXGE_HW_MAC_HEADER_MAX_SIZE; __vxge_hw_vpath_mgmt_read() 3993 val64 = readq(&vpath->vpmgmt_reg->xmac_vsport_choices_vp); __vxge_hw_vpath_mgmt_read() 3997 vpath->vsport_number = i; __vxge_hw_vpath_mgmt_read() 4000 val64 = readq(&vpath->vpmgmt_reg->xgmac_gen_status_vpmgmt_clone); __vxge_hw_vpath_mgmt_read() 4003 VXGE_HW_DEVICE_LINK_STATE_SET(vpath->hldev, VXGE_HW_LINK_UP); __vxge_hw_vpath_mgmt_read() 4005 VXGE_HW_DEVICE_LINK_STATE_SET(vpath->hldev, VXGE_HW_LINK_DOWN); __vxge_hw_vpath_mgmt_read() 4011 * __vxge_hw_vpath_reset_check - Check if resetting the vpath completed 4013 * adapter completed the reset process for the vpath 4016 __vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath) __vxge_hw_vpath_reset_check() argument 4021 &vpath->hldev->common_reg->vpath_rst_in_prog, __vxge_hw_vpath_reset_check() 4023 1 << (16 - vpath->vp_id)), __vxge_hw_vpath_reset_check() 4024 vpath->hldev->config.device_poll_millis); __vxge_hw_vpath_reset_check() 4031 * This routine resets the vpath on the device 4048 * This routine resets the vpath structures 4054 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vpath_sw_reset() local 4056 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vpath_sw_reset() 4058 if (vpath->ringh) { __vxge_hw_vpath_sw_reset() 4059 status = __vxge_hw_ring_reset(vpath->ringh); __vxge_hw_vpath_sw_reset() 4064 if (vpath->fifoh) __vxge_hw_vpath_sw_reset() 4065 status = __vxge_hw_fifo_reset(vpath->fifoh); __vxge_hw_vpath_sw_reset() 4079 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vpath_prc_configure() local 4083 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vpath_prc_configure() 4084 vp_reg = vpath->vp_reg; __vxge_hw_vpath_prc_configure() 4085 vp_config = vpath->vp_config; __vxge_hw_vpath_prc_configure() 4094 val64 = readq(&vpath->vp_reg->prc_cfg6); __vxge_hw_vpath_prc_configure() 4096 writeq(val64, &vpath->vp_reg->prc_cfg6); __vxge_hw_vpath_prc_configure() 4100 if (vpath->vp_config->ring.scatter_mode != __vxge_hw_vpath_prc_configure() 4105 switch (vpath->vp_config->ring.scatter_mode) { __vxge_hw_vpath_prc_configure() 4125 vpath->ringh) >> 3), &vp_reg->prc_cfg5); __vxge_hw_vpath_prc_configure() 4153 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vpath_kdfc_configure() local 4156 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vpath_kdfc_configure() 4157 vp_reg = vpath->vp_reg; __vxge_hw_vpath_kdfc_configure() 4165 vpath->max_kdfc_db = __vxge_hw_vpath_kdfc_configure() 4169 if (vpath->vp_config->fifo.enable == VXGE_HW_FIFO_ENABLE) { __vxge_hw_vpath_kdfc_configure() 4171 vpath->max_nofl_db = vpath->max_kdfc_db; __vxge_hw_vpath_kdfc_configure() 4173 if (vpath->max_nofl_db < __vxge_hw_vpath_kdfc_configure() 4174 ((vpath->vp_config->fifo.memblock_size / __vxge_hw_vpath_kdfc_configure() 4175 (vpath->vp_config->fifo.max_frags * __vxge_hw_vpath_kdfc_configure() 4177 vpath->vp_config->fifo.fifo_blocks)) { __vxge_hw_vpath_kdfc_configure() 4182 (vpath->max_nofl_db*2)-1); __vxge_hw_vpath_kdfc_configure() 4207 vpath->nofl_db = __vxge_hw_vpath_kdfc_configure() 4224 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vpath_mac_configure() local 4228 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vpath_mac_configure() 4229 vp_reg = vpath->vp_reg; __vxge_hw_vpath_mac_configure() 4230 vp_config = vpath->vp_config; __vxge_hw_vpath_mac_configure() 4233 vpath->vsport_number), &vp_reg->xmac_vsport_choice); __vxge_hw_vpath_mac_configure() 4254 VXGE_HW_MAC_HEADER_MAX_SIZE) < vpath->max_mtu) __vxge_hw_vpath_mac_configure() 4260 vpath->max_mtu); __vxge_hw_vpath_mac_configure() 4291 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vpath_tim_configure() local 4295 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vpath_tim_configure() 4296 vp_reg = vpath->vp_reg; __vxge_hw_vpath_tim_configure() 4297 config = vpath->vp_config; __vxge_hw_vpath_tim_configure() 4359 vpath->tim_tti_cfg1_saved = val64; __vxge_hw_vpath_tim_configure() 4417 vpath->tim_tti_cfg3_saved = val64; __vxge_hw_vpath_tim_configure() 4466 vpath->tim_rti_cfg1_saved = val64; __vxge_hw_vpath_tim_configure() 4524 vpath->tim_rti_cfg3_saved = val64; __vxge_hw_vpath_tim_configure() 4546 * registers of the vpath using the configuration passed. 4554 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vpath_initialize() local 4557 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vpath_initialize() 4563 vp_reg = vpath->vp_reg; __vxge_hw_vpath_initialize() 4565 status = __vxge_hw_vpath_swapper_set(vpath->vp_reg); __vxge_hw_vpath_initialize() 4584 status = __vxge_hw_vpath_pci_read(vpath, 1, 0x78, &val32); __vxge_hw_vpath_initialize() 4613 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vp_terminate() local 4615 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vp_terminate() 4617 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) __vxge_hw_vp_terminate() 4620 VXGE_HW_DEVICE_TIM_INT_MASK_RESET(vpath->hldev->tim_int_mask0, __vxge_hw_vp_terminate() 4621 vpath->hldev->tim_int_mask1, vpath->vp_id); __vxge_hw_vp_terminate() 4622 hldev->stats.hw_dev_info_stats.vpath_info[vpath->vp_id] = NULL; __vxge_hw_vp_terminate() 4627 spin_lock(&vpath->lock); __vxge_hw_vp_terminate() 4628 vpath->vp_open = VXGE_HW_VP_NOT_OPEN; __vxge_hw_vp_terminate() 4629 spin_unlock(&vpath->lock); __vxge_hw_vp_terminate() 4631 vpath->vpmgmt_reg = NULL; __vxge_hw_vp_terminate() 4632 vpath->nofl_db = NULL; __vxge_hw_vp_terminate() 4633 vpath->max_mtu = 0; __vxge_hw_vp_terminate() 4634 vpath->vsport_number = 0; __vxge_hw_vp_terminate() 4635 vpath->max_kdfc_db = 0; __vxge_hw_vp_terminate() 4636 vpath->max_nofl_db = 0; __vxge_hw_vp_terminate() 4637 vpath->ringh = NULL; __vxge_hw_vp_terminate() 4638 vpath->fifoh = NULL; __vxge_hw_vp_terminate() 4639 memset(&vpath->vpath_handles, 0, sizeof(struct list_head)); __vxge_hw_vp_terminate() 4640 vpath->stats_block = NULL; __vxge_hw_vp_terminate() 4641 vpath->hw_stats = NULL; __vxge_hw_vp_terminate() 4642 vpath->hw_stats_sav = NULL; __vxge_hw_vp_terminate() 4643 vpath->sw_stats = NULL; __vxge_hw_vp_terminate() 4651 * This routine is the initial phase of init which resets the vpath and 4658 struct __vxge_hw_virtualpath *vpath; __vxge_hw_vp_initialize() local 4666 vpath = &hldev->virtual_paths[vp_id]; __vxge_hw_vp_initialize() 4668 spin_lock_init(&vpath->lock); __vxge_hw_vp_initialize() 4669 vpath->vp_id = vp_id; __vxge_hw_vp_initialize() 4670 vpath->vp_open = VXGE_HW_VP_OPEN; __vxge_hw_vp_initialize() 4671 vpath->hldev = hldev; __vxge_hw_vp_initialize() 4672 vpath->vp_config = config; __vxge_hw_vp_initialize() 4673 vpath->vp_reg = hldev->vpath_reg[vp_id]; __vxge_hw_vp_initialize() 4674 vpath->vpmgmt_reg = hldev->vpmgmt_reg[vp_id]; __vxge_hw_vp_initialize() 4678 status = __vxge_hw_vpath_reset_check(vpath); __vxge_hw_vp_initialize() 4680 memset(vpath, 0, sizeof(struct __vxge_hw_virtualpath)); __vxge_hw_vp_initialize() 4684 status = __vxge_hw_vpath_mgmt_read(hldev, vpath); __vxge_hw_vp_initialize() 4686 memset(vpath, 0, sizeof(struct __vxge_hw_virtualpath)); __vxge_hw_vp_initialize() 4690 INIT_LIST_HEAD(&vpath->vpath_handles); __vxge_hw_vp_initialize() 4692 vpath->sw_stats = &hldev->stats.sw_dev_info_stats.vpath_info[vp_id]; __vxge_hw_vp_initialize() 4714 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_mtu_set() local 4720 vpath = vp->vpath; vxge_hw_vpath_mtu_set() 4724 if ((new_mtu < VXGE_HW_MIN_MTU) || (new_mtu > vpath->max_mtu)) vxge_hw_vpath_mtu_set() 4727 val64 = readq(&vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_mtu_set() 4732 writeq(val64, &vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_mtu_set() 4734 vpath->vp_config->mtu = new_mtu - VXGE_HW_MAC_HEADER_MAX_SIZE; vxge_hw_vpath_mtu_set() 4741 * vxge_hw_vpath_stats_enable - Enable vpath h/wstatistics. 4742 * Enable the DMA vpath statistics. The function is to be called to re-enable 4749 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_stats_enable() local 4751 vpath = vp->vpath; vxge_hw_vpath_stats_enable() 4753 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { vxge_hw_vpath_stats_enable() 4758 memcpy(vpath->hw_stats_sav, vpath->hw_stats, vxge_hw_vpath_stats_enable() 4761 status = __vxge_hw_vpath_stats_get(vpath, vpath->hw_stats); vxge_hw_vpath_stats_enable() 4809 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_open() local 4813 vpath = &hldev->virtual_paths[attr->vp_id]; vxge_hw_vpath_open() 4815 if (vpath->vp_open == VXGE_HW_VP_OPEN) { vxge_hw_vpath_open() 4831 vp->vpath = vpath; vxge_hw_vpath_open() 4833 if (vpath->vp_config->fifo.enable == VXGE_HW_FIFO_ENABLE) { vxge_hw_vpath_open() 4839 if (vpath->vp_config->ring.enable == VXGE_HW_RING_ENABLE) { vxge_hw_vpath_open() 4847 vpath->fifoh->tx_intr_num = vxge_hw_vpath_open() 4851 vpath->stats_block = __vxge_hw_blockpool_block_allocate(hldev, vxge_hw_vpath_open() 4853 if (vpath->stats_block == NULL) { vxge_hw_vpath_open() 4858 vpath->hw_stats = vpath->stats_block->memblock; vxge_hw_vpath_open() 4859 memset(vpath->hw_stats, 0, vxge_hw_vpath_open() 4863 vpath->hw_stats; vxge_hw_vpath_open() 4865 vpath->hw_stats_sav = vxge_hw_vpath_open() 4867 memset(vpath->hw_stats_sav, 0, vxge_hw_vpath_open() 4870 writeq(vpath->stats_block->dma_addr, &vpath->vp_reg->stats_cfg); vxge_hw_vpath_open() 4876 list_add(&vp->item, &vpath->vpath_handles); vxge_hw_vpath_open() 4878 hldev->vpaths_deployed |= vxge_mBIT(vpath->vp_id); vxge_hw_vpath_open() 4882 attr->fifo_attr.userdata = vpath->fifoh; vxge_hw_vpath_open() 4883 attr->ring_attr.userdata = vpath->ringh; vxge_hw_vpath_open() 4888 if (vpath->ringh != NULL) vxge_hw_vpath_open() 4891 if (vpath->fifoh != NULL) vxge_hw_vpath_open() 4903 * vxge_hw_vpath_rx_doorbell_post - Close the handle got from previous vpath 4904 * (vpath) open 4905 * @vp: Handle got from previous vpath open 4912 struct __vxge_hw_virtualpath *vpath = vp->vpath; vxge_hw_vpath_rx_doorbell_init() local 4913 struct __vxge_hw_ring *ring = vpath->ringh; vxge_hw_vpath_rx_doorbell_init() 4914 struct vxgedev *vdev = netdev_priv(vpath->hldev->ndev); vxge_hw_vpath_rx_doorbell_init() 4918 new_count = readq(&vpath->vp_reg->rxdmem_size); vxge_hw_vpath_rx_doorbell_init() 4926 &vpath->vp_reg->prc_rxd_doorbell); vxge_hw_vpath_rx_doorbell_init() 4927 readl(&vpath->vp_reg->prc_rxd_doorbell); vxge_hw_vpath_rx_doorbell_init() 4930 val64 = readq(&vpath->vp_reg->prc_cfg6); vxge_hw_vpath_rx_doorbell_init() 4969 * vxge_hw_vpath_close - Close the handle got from previous vpath (vpath) open 4975 struct __vxge_hw_virtualpath *vpath = NULL; vxge_hw_vpath_close() local 4977 u32 vp_id = vp->vpath->vp_id; vxge_hw_vpath_close() 4981 vpath = vp->vpath; vxge_hw_vpath_close() 4982 devh = vpath->hldev; vxge_hw_vpath_close() 4984 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { vxge_hw_vpath_close() 4991 if (!list_empty(&vpath->vpath_handles)) { vxge_hw_vpath_close() 4992 list_add(&vp->item, &vpath->vpath_handles); vxge_hw_vpath_close() 5003 if (vpath->ringh != NULL) vxge_hw_vpath_close() 5006 if (vpath->fifoh != NULL) vxge_hw_vpath_close() 5009 if (vpath->stats_block != NULL) vxge_hw_vpath_close() 5010 __vxge_hw_blockpool_block_free(devh, vpath->stats_block); vxge_hw_vpath_close() 5021 * vxge_hw_vpath_reset - Resets vpath 5022 * This function is used to request a reset of vpath 5028 struct __vxge_hw_virtualpath *vpath = vp->vpath; vxge_hw_vpath_reset() local 5030 vp_id = vpath->vp_id; vxge_hw_vpath_reset() 5032 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { vxge_hw_vpath_reset() 5037 status = __vxge_hw_vpath_reset(vpath->hldev, vp_id); vxge_hw_vpath_reset() 5039 vpath->sw_stats->soft_reset_cnt++; vxge_hw_vpath_reset() 5046 * This function poll's for the vpath reset completion and re initializes 5047 * the vpath. 5052 struct __vxge_hw_virtualpath *vpath = NULL; vxge_hw_vpath_recover_from_reset() local 5057 vp_id = vp->vpath->vp_id; vxge_hw_vpath_recover_from_reset() 5058 vpath = vp->vpath; vxge_hw_vpath_recover_from_reset() 5059 hldev = vpath->hldev; vxge_hw_vpath_recover_from_reset() 5061 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { vxge_hw_vpath_recover_from_reset() 5066 status = __vxge_hw_vpath_reset_check(vpath); vxge_hw_vpath_recover_from_reset() 5078 if (vpath->ringh != NULL) vxge_hw_vpath_recover_from_reset() 5081 memset(vpath->hw_stats, 0, vxge_hw_vpath_recover_from_reset() 5084 memset(vpath->hw_stats_sav, 0, vxge_hw_vpath_recover_from_reset() 5087 writeq(vpath->stats_block->dma_addr, vxge_hw_vpath_recover_from_reset() 5088 &vpath->vp_reg->stats_cfg); vxge_hw_vpath_recover_from_reset() 5097 * vxge_hw_vpath_enable - Enable vpath. 5098 * This routine clears the vpath reset thereby enabling a vpath 5107 hldev = vp->vpath->hldev; vxge_hw_vpath_enable() 5110 1 << (16 - vp->vpath->vp_id)); vxge_hw_vpath_enable() 3972 __vxge_hw_vpath_mgmt_read( struct __vxge_hw_device *hldev, struct __vxge_hw_virtualpath *vpath) __vxge_hw_vpath_mgmt_read() argument
|
H A D | vxge-main.c | 630 /* select a vpath to transmit the packet */ vxge_get_vpath_no() 656 struct vxge_vpath *vpath, u64 del_mac) vxge_search_mac_addr_in_list() 659 list_for_each_safe(entry, next, &vpath->mac_addr_list) { vxge_search_mac_addr_in_list() 666 static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac) vxge_mac_list_add() argument 671 if (vpath->mac_addr_cnt >= VXGE_MAX_LEARN_MAC_ADDR_CNT) vxge_mac_list_add() 682 list_add(&new_mac_entry->item, &vpath->mac_addr_list); vxge_mac_list_add() 689 vpath->mac_addr_cnt++; vxge_mac_list_add() 692 vpath->mcast_addr_cnt++; vxge_mac_list_add() 702 struct vxge_vpath *vpath; vxge_add_mac_addr() local 710 vpath = &vdev->vpaths[mac->vpath_no]; vxge_add_mac_addr() 711 status = vxge_hw_vpath_mac_addr_add(vpath->handle, mac->macaddr, vxge_add_mac_addr() 715 "DA config add entry failed for vpath:%d", vxge_add_mac_addr() 716 vpath->device_id); vxge_add_mac_addr() 718 if (FALSE == vxge_mac_list_add(vpath, mac)) vxge_add_mac_addr() 731 struct vxge_vpath *vpath = NULL; vxge_learn_mac() local 738 vpath = &vdev->vpaths[vpath_idx]; vxge_learn_mac() 739 if (vxge_search_mac_addr_in_list(vpath, mac_addr)) vxge_learn_mac() 746 /* Any vpath has room to add mac address to its da table? */ vxge_learn_mac() 748 vpath = &vdev->vpaths[vpath_idx]; vxge_learn_mac() 749 if (vpath->mac_addr_cnt < vpath->max_mac_addr_cnt) { vxge_learn_mac() 750 /* Add this mac address to this vpath */ vxge_learn_mac() 763 /* Is the first vpath already selected as catch-basin ? */ vxge_learn_mac() 764 vpath = &vdev->vpaths[vpath_idx]; vxge_learn_mac() 765 if (vpath->mac_addr_cnt > vpath->max_mac_addr_cnt) { vxge_learn_mac() 766 /* Add this mac address to this vpath */ vxge_learn_mac() 767 if (FALSE == vxge_mac_list_add(vpath, &mac_info)) vxge_learn_mac() 772 /* Select first vpath as catch-basin */ vxge_learn_mac() 773 vpath_vector = vxge_mBIT(vpath->device_id); vxge_learn_mac() 774 status = vxge_hw_mgmt_reg_write(vpath->vdev->devh, vxge_learn_mac() 783 "%s: Unable to set the vpath-%d in catch-basin mode", vxge_learn_mac() 784 VXGE_DRIVER_NAME, vpath->device_id); vxge_learn_mac() 788 if (FALSE == vxge_mac_list_add(vpath, &mac_info)) vxge_learn_mac() 1066 static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac) vxge_mac_list_del() argument 1075 list_for_each_safe(entry, next, &vpath->mac_addr_list) { vxge_mac_list_del() 1079 vpath->mac_addr_cnt--; vxge_mac_list_del() 1082 vpath->mcast_addr_cnt--; vxge_mac_list_del() 1095 struct vxge_vpath *vpath; vxge_del_mac_addr() local 1097 vpath = &vdev->vpaths[mac->vpath_no]; vxge_del_mac_addr() 1098 status = vxge_hw_vpath_mac_addr_delete(vpath->handle, mac->macaddr, vxge_del_mac_addr() 1102 "DA config delete entry failed for vpath:%d", vxge_del_mac_addr() 1103 vpath->device_id); vxge_del_mac_addr() 1105 vxge_mac_list_del(vpath, mac); vxge_del_mac_addr() 1126 struct vxge_vpath *vpath; vxge_set_multicast() local 1146 vpath = &vdev->vpaths[i]; vxge_set_multicast() 1147 vxge_assert(vpath->is_open); vxge_set_multicast() 1148 status = vxge_hw_vpath_mcast_enable(vpath->handle); vxge_set_multicast() 1156 vpath = &vdev->vpaths[i]; vxge_set_multicast() 1157 vxge_assert(vpath->is_open); vxge_set_multicast() 1158 status = vxge_hw_vpath_mcast_disable(vpath->handle); vxge_set_multicast() 1169 vpath = &vdev->vpaths[i]; vxge_set_multicast() 1170 vxge_assert(vpath->is_open); vxge_set_multicast() 1174 vpath->handle); vxge_set_multicast() 1177 vpath->handle); vxge_set_multicast() 1258 vpath = &vdev->vpaths[i]; 1259 vxge_assert(vpath->is_open); 1261 status = vxge_hw_vpath_mcast_enable(vpath->handle); 1314 struct vxge_vpath *vpath = &vdev->vpaths[vpath_idx]; vxge_set_mac_addr() local 1315 if (!vpath->is_open) { vxge_set_mac_addr() 1319 vxge_mac_list_del(vpath, &mac_info_old); vxge_set_mac_addr() 1323 vxge_mac_list_add(vpath, &mac_info_new); vxge_set_mac_addr() 1354 * @vp_id: vpath for which to enable the interrupts 1356 * Enables the interrupts for the vpath 1360 struct vxge_vpath *vpath = &vdev->vpaths[vp_id]; vxge_vpath_intr_enable() local 1365 vxge_hw_vpath_intr_enable(vpath->handle); vxge_vpath_intr_enable() 1368 vxge_hw_vpath_inta_unmask_tx_rx(vpath->handle); vxge_vpath_intr_enable() 1370 vxge_hw_vpath_msix_set(vpath->handle, tim_msix_id, vxge_vpath_intr_enable() 1373 msix_id = vpath->device_id * VXGE_HW_VPATH_MSIX_ACTIVE; vxge_vpath_intr_enable() 1374 vxge_hw_vpath_msix_unmask(vpath->handle, msix_id); vxge_vpath_intr_enable() 1375 vxge_hw_vpath_msix_unmask(vpath->handle, msix_id + 1); vxge_vpath_intr_enable() 1378 msix_id = (vpath->handle->vpath->hldev->first_vp_id * vxge_vpath_intr_enable() 1380 vxge_hw_vpath_msix_unmask(vpath->handle, msix_id); vxge_vpath_intr_enable() 1387 * @vp_id: vpath for which to disable the interrupts 1389 * Disables the interrupts for the vpath 1393 struct vxge_vpath *vpath = &vdev->vpaths[vp_id]; vxge_vpath_intr_disable() local 1399 vxge_hw_vpath_wait_receive_idle(hldev, vpath->device_id); vxge_vpath_intr_disable() 1401 vxge_hw_vpath_intr_disable(vpath->handle); vxge_vpath_intr_disable() 1404 vxge_hw_vpath_inta_mask_tx_rx(vpath->handle); vxge_vpath_intr_disable() 1406 msix_id = vpath->device_id * VXGE_HW_VPATH_MSIX_ACTIVE; vxge_vpath_intr_disable() 1407 vxge_hw_vpath_msix_mask(vpath->handle, msix_id); vxge_vpath_intr_disable() 1408 vxge_hw_vpath_msix_mask(vpath->handle, msix_id + 1); vxge_vpath_intr_disable() 1411 msix_id = (vpath->handle->vpath->hldev->first_vp_id * vxge_vpath_intr_disable() 1413 vxge_hw_vpath_msix_mask(vpath->handle, msix_id); vxge_vpath_intr_disable() 1419 vxge_search_mac_addr_in_da_table(struct vxge_vpath *vpath, struct macInfo *mac) vxge_search_mac_addr_in_da_table() argument 1425 status = vxge_hw_vpath_mac_addr_get(vpath->handle, vxge_search_mac_addr_in_da_table() 1429 "DA config list entry failed for vpath:%d", vxge_search_mac_addr_in_da_table() 1430 vpath->device_id); vxge_search_mac_addr_in_da_table() 1435 status = vxge_hw_vpath_mac_addr_get_next(vpath->handle, vxge_search_mac_addr_in_da_table() 1445 static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath) vxge_restore_vpath_mac_addr() argument 1454 if (vpath->is_open) { vxge_restore_vpath_mac_addr() 1455 list_for_each_safe(entry, next, &vpath->mac_addr_list) { vxge_restore_vpath_mac_addr() 1463 status = vxge_search_mac_addr_in_da_table(vpath, vxge_restore_vpath_mac_addr() 1468 vpath->handle, mac_info.macaddr, vxge_restore_vpath_mac_addr() 1473 "DA add entry failed for vpath:%d", vxge_restore_vpath_mac_addr() 1474 vpath->device_id); vxge_restore_vpath_mac_addr() 1487 vxge_restore_vpath_vid_table(struct vxge_vpath *vpath) vxge_restore_vpath_vid_table() argument 1490 struct vxgedev *vdev = vpath->vdev; vxge_restore_vpath_vid_table() 1493 if (!vpath->is_open) vxge_restore_vpath_vid_table() 1497 status = vxge_hw_vpath_vid_add(vpath->handle, vid); vxge_restore_vpath_vid_table() 1505 * @vp_id: vpath to reset 1507 * Resets the vpath 1512 struct vxge_vpath *vpath = &vdev->vpaths[vp_id]; vxge_reset_vpath() local 1523 if (vpath->handle) { vxge_reset_vpath() 1524 if (vxge_hw_vpath_reset(vpath->handle) == VXGE_HW_OK) { vxge_reset_vpath() 1526 vxge_hw_vpath_recover_from_reset(vpath->handle) vxge_reset_vpath() 1530 "failed for vpath:%d", vp_id); vxge_reset_vpath() 1536 "vpath:%d", vp_id); vxge_reset_vpath() 1542 vxge_restore_vpath_mac_addr(vpath); vxge_reset_vpath() 1543 vxge_restore_vpath_vid_table(vpath); vxge_reset_vpath() 1546 vxge_hw_vpath_bcast_enable(vpath->handle); vxge_reset_vpath() 1550 status = vxge_hw_vpath_mcast_enable(vpath->handle); vxge_reset_vpath() 1562 /* Enable the flow of traffic through the vpath */ vxge_reset_vpath() 1563 vxge_hw_vpath_enable(vpath->handle); vxge_reset_vpath() 1566 vxge_hw_vpath_rx_doorbell_init(vpath->handle); vxge_reset_vpath() 1567 vpath->ring.last_status = VXGE_HW_OK; vxge_reset_vpath() 1572 /* Start the vpath queue */ vxge_reset_vpath() 1573 if (netif_tx_queue_stopped(vpath->fifo.txq)) vxge_reset_vpath() 1574 netif_tx_wake_queue(vpath->fifo.txq); vxge_reset_vpath() 1600 * vpath. (Have only one free running timer). vxge_config_ci_for_tti_rti() 1629 /* wait for all the vpath reset to complete */ do_vxge_reset() 1732 "from_reset failed for vpath: " do_vxge_reset() 1740 "vpath:%d", i); do_vxge_reset() 1753 /* enable vpath interrupts */ do_vxge_reset() 1829 /* Re enable the Rx interrupts for the vpath */ vxge_poll_msix() 1917 u8 mtable[256] = {0}; /* CPU to vpath mapping */ vxge_rth_configure() 1923 * - mtable with bucket-to-vpath mapping vxge_rth_configure() 1930 /* set indirection table, bucket-to-vpath mapping */ vxge_rth_configure() 1938 "for vpath:%d", vdev->vpaths[0].device_id); vxge_rth_configure() 1965 "RTH configuration failed for vpath:%d", vxge_rth_configure() 1978 struct vxge_vpath *vpath; vxge_reset_all_vpaths() local 1982 vpath = &vdev->vpaths[i]; vxge_reset_all_vpaths() 1983 if (vpath->handle) { vxge_reset_all_vpaths() 1984 if (vxge_hw_vpath_reset(vpath->handle) == VXGE_HW_OK) { vxge_reset_all_vpaths() 1987 vpath->handle) != VXGE_HW_OK) { vxge_reset_all_vpaths() 1990 "from_reset failed for vpath: " vxge_reset_all_vpaths() 1997 "vpath:%d", i); vxge_reset_all_vpaths() 2009 struct vxge_vpath *vpath; vxge_close_vpaths() local 2013 vpath = &vdev->vpaths[i]; vxge_close_vpaths() 2015 if (vpath->handle && vpath->is_open) { vxge_close_vpaths() 2016 vxge_hw_vpath_close(vpath->handle); vxge_close_vpaths() 2019 vpath->is_open = 0; vxge_close_vpaths() 2020 vpath->handle = NULL; vxge_close_vpaths() 2029 struct vxge_vpath *vpath; vxge_open_vpaths() local 2034 vpath = &vdev->vpaths[i]; vxge_open_vpaths() 2035 vxge_assert(vpath->is_configured); vxge_open_vpaths() 2039 vcfg = &vdev->devh->config.vp_config[vpath->device_id]; vxge_open_vpaths() 2052 attr.vp_id = vpath->device_id; vxge_open_vpaths() 2056 attr.fifo_attr.userdata = &vpath->fifo; vxge_open_vpaths() 2062 attr.ring_attr.userdata = &vpath->ring; vxge_open_vpaths() 2064 vpath->ring.ndev = vdev->ndev; vxge_open_vpaths() 2065 vpath->ring.pdev = vdev->pdev; vxge_open_vpaths() 2067 status = vxge_hw_vpath_open(vdev->devh, &attr, &vpath->handle); vxge_open_vpaths() 2069 vpath->fifo.handle = vxge_open_vpaths() 2071 vpath->ring.handle = vxge_open_vpaths() 2073 vpath->fifo.tx_steering_type = vxge_open_vpaths() 2075 vpath->fifo.ndev = vdev->ndev; vxge_open_vpaths() 2076 vpath->fifo.pdev = vdev->pdev; vxge_open_vpaths() 2078 u64_stats_init(&vpath->fifo.stats.syncp); vxge_open_vpaths() 2079 u64_stats_init(&vpath->ring.stats.syncp); vxge_open_vpaths() 2082 vpath->fifo.txq = vxge_open_vpaths() 2085 vpath->fifo.txq = vxge_open_vpaths() 2087 vpath->fifo.indicate_max_pkts = vxge_open_vpaths() 2089 vpath->fifo.tx_vector_no = 0; vxge_open_vpaths() 2090 vpath->ring.rx_vector_no = 0; vxge_open_vpaths() 2091 vpath->ring.rx_hwts = vdev->rx_hwts; vxge_open_vpaths() 2092 vpath->is_open = 1; vxge_open_vpaths() 2093 vdev->vp_handles[i] = vpath->handle; vxge_open_vpaths() 2094 vpath->ring.vlan_tag_strip = vdev->vlan_tag_strip; vxge_open_vpaths() 2098 vxge_debug_init(VXGE_ERR, "%s: vpath: %d failed to " vxge_open_vpaths() 2100 vdev->ndev->name, vpath->device_id, vxge_open_vpaths() 2106 vp_id = vpath->handle->vpath->vp_id; vxge_open_vpaths() 2271 struct vxge_vpath *vpath = (struct vxge_vpath *)dev_id; vxge_alarm_msix_handle() local 2272 struct vxgedev *vdev = vpath->vdev; vxge_alarm_msix_handle() 2273 int msix_id = (vpath->handle->vpath->vp_id * vxge_alarm_msix_handle() 2404 struct vxge_vpath *vpath = &vdev->vpaths[i]; vxge_enable_msix() local 2409 vpath->ring.rx_vector_no = (vpath->device_id * vxge_enable_msix() 2412 vpath->fifo.tx_vector_no = (vpath->device_id * vxge_enable_msix() 2415 vxge_hw_vpath_msix_set(vpath->handle, tim_msix_id, vxge_enable_msix() 2489 "%s:vxge:MSI-X %d - Tx - fn:%d vpath:%d", vxge_add_isr() 2504 "%s:vxge:MSI-X %d - Rx - fn:%d vpath:%d", vxge_add_isr() 2543 /* Point to next vpath handler */ vxge_add_isr() 2572 msix_idx = (vdev->vpaths[0].handle->vpath->vp_id * vxge_add_isr() 2630 struct vxge_vpath *vpath; vxge_poll_vp_lockup() local 2641 /* Did this vpath received any packets */ vxge_poll_vp_lockup() 2649 /* schedule vpath reset */ vxge_poll_vp_lockup() 2651 vpath = &vdev->vpaths[i]; vxge_poll_vp_lockup() 2653 /* disable interrupts for this vpath */ vxge_poll_vp_lockup() 2656 /* stop the queue for this vpath */ vxge_poll_vp_lockup() 2657 netif_tx_stop_queue(vpath->fifo.txq); vxge_poll_vp_lockup() 2676 * vpath reset. Due to these restrictions, only allow modification vxge_fix_features() 2720 struct vxge_vpath *vpath; vxge_open() local 2760 vpath = &vdev->vpaths[i]; vxge_open() 2761 vpath->ring.napi_p = &vdev->napi; vxge_open() 2765 vpath = &vdev->vpaths[i]; vxge_open() 2766 netif_napi_add(dev, &vpath->ring.napi, vxge_open() 2768 napi_enable(&vpath->ring.napi); vxge_open() 2769 vpath->ring.napi_p = &vpath->ring.napi; vxge_open() 2788 vpath = &vdev->vpaths[i]; vxge_open() 2791 status = vxge_hw_vpath_mtu_set(vpath->handle, vdev->mtu); vxge_open() 2810 vpath = &vdev->vpaths[i]; vxge_open() 2811 vxge_restore_vpath_mac_addr(vpath); vxge_open() 2812 vxge_restore_vpath_vid_table(vpath); vxge_open() 2814 status = vxge_hw_vpath_mcast_enable(vpath->handle); vxge_open() 2822 /* Enable vpath to sniff all unicast/multicast traffic that not vxge_open() 2846 /* Enabling Bcast and mcast for all vpath */ vxge_open() 2848 vpath = &vdev->vpaths[i]; vxge_open() 2849 status = vxge_hw_vpath_bcast_enable(vpath->handle); vxge_open() 2852 "%s : Can not enable bcast for vpath " vxge_open() 2855 status = vxge_hw_vpath_mcast_enable(vpath->handle); vxge_open() 2858 "%s : Can not enable mcast for vpath " vxge_open() 2891 vpath = &vdev->vpaths[i]; vxge_open() 2893 vxge_hw_vpath_enable(vpath->handle); vxge_open() 2895 vxge_hw_vpath_rx_doorbell_init(vpath->handle); vxge_open() 2926 static void vxge_free_mac_add_list(struct vxge_vpath *vpath) vxge_free_mac_add_list() argument 2930 if (list_empty(&vpath->mac_addr_list)) vxge_free_mac_add_list() 2933 list_for_each_safe(entry, next, &vpath->mac_addr_list) { vxge_free_mac_add_list() 2972 /* Put the vpath back in normal mode */ do_vxge_close() 3329 struct vxge_vpath *vpath; vxge_vlan_rx_add_vid() local 3334 vpath = &vdev->vpaths[vp_id]; vxge_vlan_rx_add_vid() 3335 if (!vpath->is_open) vxge_vlan_rx_add_vid() 3337 vxge_hw_vpath_vid_add(vpath->handle, vid); vxge_vlan_rx_add_vid() 3355 struct vxge_vpath *vpath; vxge_vlan_rx_kill_vid() local 3362 vpath = &vdev->vpaths[vp_id]; vxge_vlan_rx_kill_vid() 3363 if (!vpath->is_open) vxge_vlan_rx_kill_vid() 3365 vxge_hw_vpath_vid_delete(vpath->handle, vid); vxge_vlan_rx_kill_vid() 3452 /* Allocate memory for vpath */ vxge_device_register() 3457 "%s: vpath memory allocation failed", vxge_device_register() 3570 struct vxge_vpath *vpath = NULL; vxge_callback_crit_err() local 3582 vpath = &vdev->vpaths[vpath_idx]; vxge_callback_crit_err() 3583 if (vpath->device_id == vp_id) vxge_callback_crit_err() 3615 /* check if this vpath is already set for reset */ vxge_callback_crit_err() 3618 /* disable interrupts for this vpath */ vxge_callback_crit_err() 3621 /* stop the queue for this vpath */ vxge_callback_crit_err() 3622 netif_tx_stop_queue(vpath->fifo.txq); vxge_callback_crit_err() 3702 /* No more CPU. Return vpath number as zero.*/ vxge_config_vpaths() 3731 "as single vpath is configured", VXGE_DRIVER_NAME); vxge_config_vpaths() 3747 "%s: vpath: %d is not available", vxge_config_vpaths() 3752 "%s: vpath: %d available", vxge_config_vpaths() 3758 "%s: vpath: %d is not configured, " vxge_config_vpaths() 4367 /* Now making the CPU based no of vpath calculation vxge_probe() 655 vxge_search_mac_addr_in_list( struct vxge_vpath *vpath, u64 del_mac) vxge_search_mac_addr_in_list() argument
|
H A D | vxge-traffic.c | 22 * vxge_hw_vpath_intr_enable - Enable vpath interrupts. 25 * Enable vpath interrupts. The function is to be executed the last in 26 * vpath initialization sequence. 34 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_intr_enable() local 42 vpath = vp->vpath; vxge_hw_vpath_intr_enable() 44 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { vxge_hw_vpath_intr_enable() 49 vp_reg = vpath->vp_reg; vxge_hw_vpath_intr_enable() 131 if (vpath->hldev->first_vp_id != vpath->vp_id) vxge_hw_vpath_intr_enable() 148 * vxge_hw_vpath_intr_disable - Disable vpath interrupts. 151 * Disable vpath interrupts. The function is to be executed the last in 152 * vpath initialization sequence. 161 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_intr_disable() local 169 vpath = vp->vpath; vxge_hw_vpath_intr_disable() 171 if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) { vxge_hw_vpath_intr_disable() 175 vp_reg = vpath->vp_reg; vxge_hw_vpath_intr_disable() 181 val64 = VXGE_HW_TIM_CLR_INT_EN_VP(1 << (16 - vpath->vp_id)); vxge_hw_vpath_intr_disable() 595 * @vpath: Virtual Path. 598 * Process vpath alarms. 602 __vxge_hw_vpath_alarm_process(struct __vxge_hw_virtualpath *vpath, __vxge_hw_vpath_alarm_process() argument 614 if (vpath == NULL) { __vxge_hw_vpath_alarm_process() 620 hldev = vpath->hldev; __vxge_hw_vpath_alarm_process() 621 vp_reg = vpath->vp_reg; __vxge_hw_vpath_alarm_process() 630 sw_stats = vpath->sw_stats; __vxge_hw_vpath_alarm_process() 860 __vxge_hw_device_handle_error(hldev, vpath->vp_id, alarm_event); __vxge_hw_vpath_alarm_process() 1736 * vxge_hw_vpath_mac_addr_add - Add the mac address entry for this vpath 1739 * @macaddr: MAC address to be added for this vpath into the list 1745 * vpath. 1802 * vxge_hw_vpath_mac_addr_get - Get the first mac address entry for this vpath 1805 * @macaddr: First MAC address entry for this vpath in the list 1809 * vpath. 1854 * vpath 1857 * @macaddr: Next MAC address entry for this vpath in the list 1861 * vpath. 1906 * vxge_hw_vpath_mac_addr_delete - Delete the mac address entry for this vpath 1909 * @macaddr: MAC address to be added for this vpath into the list 1913 * vpath. 1953 * vxge_hw_vpath_vid_add - Add the vlan id entry for this vpath 1956 * @vid: vlan id to be added for this vpath into the list 1958 * Adds the given vlan id into the list for this vpath. 1981 * vxge_hw_vpath_vid_delete - Delete the vlan id entry for this vpath 1984 * @vid: vlan id to be added for this vpath into the list 1986 * Adds the given vlan id into the list for this vpath. 2020 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_promisc_enable() local 2023 if ((vp == NULL) || (vp->vpath->ringh == NULL)) { vxge_hw_vpath_promisc_enable() 2028 vpath = vp->vpath; vxge_hw_vpath_promisc_enable() 2031 if (!(vpath->hldev->access_rights & vxge_hw_vpath_promisc_enable() 2035 val64 = readq(&vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_promisc_enable() 2044 writeq(val64, &vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_promisc_enable() 2062 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_promisc_disable() local 2065 if ((vp == NULL) || (vp->vpath->ringh == NULL)) { vxge_hw_vpath_promisc_disable() 2070 vpath = vp->vpath; vxge_hw_vpath_promisc_disable() 2072 val64 = readq(&vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_promisc_disable() 2080 writeq(val64, &vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_promisc_disable() 2096 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_bcast_enable() local 2099 if ((vp == NULL) || (vp->vpath->ringh == NULL)) { vxge_hw_vpath_bcast_enable() 2104 vpath = vp->vpath; vxge_hw_vpath_bcast_enable() 2106 val64 = readq(&vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_bcast_enable() 2110 writeq(val64, &vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_bcast_enable() 2128 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_mcast_enable() local 2131 if ((vp == NULL) || (vp->vpath->ringh == NULL)) { vxge_hw_vpath_mcast_enable() 2136 vpath = vp->vpath; vxge_hw_vpath_mcast_enable() 2138 val64 = readq(&vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_mcast_enable() 2142 writeq(val64, &vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_mcast_enable() 2161 struct __vxge_hw_virtualpath *vpath; vxge_hw_vpath_mcast_disable() local 2164 if ((vp == NULL) || (vp->vpath->ringh == NULL)) { vxge_hw_vpath_mcast_disable() 2169 vpath = vp->vpath; vxge_hw_vpath_mcast_disable() 2171 val64 = readq(&vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_mcast_disable() 2175 writeq(val64, &vpath->vp_reg->rxmac_vcfg0); vxge_hw_vpath_mcast_disable() 2183 * @vpath: Virtual Path. 2186 * Process vpath alarms. 2200 status = __vxge_hw_vpath_alarm_process(vp->vpath, skip_alarms); vxge_hw_vpath_alarm_process() 2222 struct __vxge_hw_virtualpath *vpath = vp->vpath; vxge_hw_vpath_msix_set() local 2223 struct vxge_hw_vpath_reg __iomem *vp_reg = vpath->vp_reg; vxge_hw_vpath_msix_set() 2224 u32 vp_id = vp->vpath->vp_id; vxge_hw_vpath_msix_set() 2234 (vpath->hldev->first_vp_id * 4) + alarm_msix_id), vxge_hw_vpath_msix_set() 2237 if (vpath->hldev->config.intr_mode == vxge_hw_vpath_msix_set() 2266 struct __vxge_hw_device *hldev = vp->vpath->hldev; vxge_hw_vpath_msix_mask() 2286 struct __vxge_hw_device *hldev = vp->vpath->hldev; vxge_hw_vpath_msix_clear() 2313 struct __vxge_hw_device *hldev = vp->vpath->hldev; vxge_hw_vpath_msix_unmask() 2323 * Mask Tx and Rx vpath interrupts. 2332 struct __vxge_hw_device *hldev = vp->vpath->hldev; vxge_hw_vpath_inta_mask_tx_rx() 2335 tim_int_mask1, vp->vpath->vp_id); vxge_hw_vpath_inta_mask_tx_rx() 2361 * Unmask Tx and Rx vpath interrupts. 2370 struct __vxge_hw_device *hldev = vp->vpath->hldev; vxge_hw_vpath_inta_unmask_tx_rx() 2373 tim_int_mask1, vp->vpath->vp_id); vxge_hw_vpath_inta_unmask_tx_rx()
|
H A D | vxge-main.h | 271 /* The vpath id maintained in the driver - 305 /* Actual vpath id for this vpath in the device - 0 to 16 */ 341 /* Indicates which vpath to reset */ 344 /* Timer used for polling vpath resets */ 347 /* Timer used for polling vpath lockup */ 363 * 4 for each vpath * 17; 392 /* Below variables are used for vpath selection to transmit a packet */
|
H A D | vxge-ethtool.c | 121 * Dumps the vpath register space of Titan NIC into the user given 232 struct vxge_vpath *vpath = NULL; vxge_get_ethtool_stats() local 298 vpath = &vdev->vpaths[k]; vxge_get_ethtool_stats() 299 j = vpath->device_id; vxge_get_ethtool_stats() 489 vpath = &vdev->vpaths[k]; vxge_get_ethtool_stats() 490 j = vpath->device_id; vxge_get_ethtool_stats() 532 vpath = &vdev->vpaths[k]; vxge_get_ethtool_stats() 533 j = vpath->device_id; vxge_get_ethtool_stats()
|
H A D | vxge-traffic.h | 74 * @VXGE_HW_EVENT_SERR: Serious vpath hardware error event. 75 * @VXGE_HW_EVENT_ECCERR: vpath ECC error event. 76 * @VXGE_HW_EVENT_VPATH_ERR: Error local to the respective vpath 1090 * @vpath_tx_stats: Per vpath XMAC TX stats 1091 * @vpath_rx_stats: Per vpath XMAC RX stats 1107 * struct vxge_hw_vpath_stats_hw_info - Titan vpath hardware statistics. 1158 * Titan vpath hardware statistics. 1607 * struct vxge_hw_vpath_stats_sw_err - HW vpath error statistics 1624 * HW vpath error statistics 1645 * struct vxge_hw_vpath_stats_sw_info - HW vpath sw statistics 1646 * @soft_reset_cnt: Number of times soft reset is done on this vpath. 1647 * @error_stats: error counters for the vpath 1648 * @ring_stats: counters for ring belonging to the vpath 1649 * @fifo_stats: counters for fifo belonging to the vpath 1651 * HW vpath sw statistics 1686 * @vpath_alarms: Number of vpath alarms 1763 * @vxge_hw_mgmt_reg_type_vpmgmt: vpath management registers 1764 * @vxge_hw_mgmt_reg_type_vpath: vpath registers 2090 #define VXGE_HW_VIRTUAL_PATH_HANDLE(vpath) \ 2091 ((struct __vxge_hw_vpath_handle *)(vpath)->vpath_handles.next)
|
H A D | vxge-config.h | 659 * @vsport_number: vsport attached to this vpath 709 * @vpath: Virtual path to which this item belongs 715 struct __vxge_hw_virtualpath *vpath; member in struct:__vxge_hw_vpath_handle 785 * @vpath_mask: vpath bit mask 790 * @mac_addrs: Mac addresses for each vpath 791 * @mac_addr_masks: Mac address masks for each vpath 793 * Returns the vpath mask that has the bits set for each vpath allocated 794 * for the driver and the first mac address for each vpath
|
/linux-4.1.27/tools/power/acpi/ |
H A D | Makefile | 97 vpath %.c \
|