15 #include <linux/prefetch.h>
56 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
59 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
62 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
65 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
68 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
71 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
74 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
77 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
80 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
83 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
90 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
93 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
96 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
99 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
102 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
113 __vxge_hw_pio_mem_write32_upper(
124 __vxge_hw_pio_mem_write32_upper(
131 if (vpath->
hldev->first_vp_id != vpath->
vp_id)
132 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
140 __vxge_hw_pio_mem_write32_upper(0,
177 __vxge_hw_pio_mem_write32_upper(
185 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
188 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
191 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
194 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
197 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
200 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
203 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
206 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
209 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
212 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
215 __vxge_hw_pio_mem_write32_upper((
u32)VXGE_HW_INTR_MASK_ALL,
296 __vxge_hw_pio_mem_write32_upper(
298 &channel->
common_reg->set_msix_mask_vect[msix_id%4]);
314 __vxge_hw_pio_mem_write32_upper(
316 &channel->
common_reg->clear_msix_mask_vect[msix_id%4]);
331 __vxge_hw_pio_mem_write32_upper(
333 &channel->
common_reg->clr_msix_one_shot_vec[msix_id % 4]);
351 hldev->
config.intr_mode = intr_mode;
397 __vxge_hw_pio_mem_write32_upper(val32,
400 __vxge_hw_pio_mem_write32_upper(~val32,
456 __vxge_hw_pio_mem_write32_upper((
u32)
vxge_bVALn(val64, 0, 32),
475 __vxge_hw_pio_mem_write32_upper((
u32)
vxge_bVALn(val64, 0, 32),
620 hldev = vpath->
hldev;
632 if (alarm_status & ~(
665 VXGE_HW_ASIC_NW_VP_ERR_REG_XMACJ_STN_FLT,
668 __vxge_hw_device_handle_link_down_ind(hldev);
674 VXGE_HW_ASIC_NW_VP_ERR_REG_XMACJ_STN_OK) &&
676 VXGE_HW_ASIC_NW_VP_ERR_REG_XMACJ_STN_FLT))) ||
678 VXGE_HW_ASIC_NW_VP_ERR_REG_XMACJ_STN_OK_OCCURR) &&
680 VXGE_HW_ASIC_NW_VP_ERR_REG_XMACJ_STN_FLT_OCCURR)
686 VXGE_HW_ASIC_NW_VP_ERR_REG_XMACJ_STN_OK,
689 __vxge_hw_device_handle_link_up_ind(hldev);
854 hldev->
stats.sw_dev_err_stats.vpath_alarms++;
860 __vxge_hw_device_handle_error(hldev, vpath->
vp_id, alarm_event);
914 __vxge_hw_device_handle_error(hldev,
922 hldev->
stats.sw_dev_info_stats.total_intr_cnt++;
931 hldev->
stats.sw_dev_info_stats.traffic_intr_cnt++;
936 hldev->
stats.sw_dev_info_stats.not_traffic_intr_cnt++;
943 hldev->
stats.sw_dev_err_stats.vpath_alarms++;
950 ret = __vxge_hw_vpath_alarm_process(
988 __vxge_hw_pio_mem_write32_upper(
1031 channel->
stats->reserve_free_swaps_cnt++;
1033 goto _alloc_after_swap;
1036 channel->
stats->full_cnt++;
1055 channel->
work_arr[channel->post_index++] = dtrh;
1058 if (channel->post_index == channel->
length)
1059 channel->post_index = 0;
1075 *dtrh = channel->
work_arr[channel->compl_index];
1091 if (++channel->compl_index == channel->
length)
1092 channel->compl_index = 0;
1094 channel->
stats->total_compl_cnt++;
1145 status = vxge_hw_channel_dtr_alloc(channel, rxdh);
1204 vxge_hw_channel_dtr_post(channel, rxdh);
1223 if (ring->stats->common_stats.usage_cnt > 0)
1224 ring->stats->common_stats.usage_cnt--;
1247 vxge_hw_channel_dtr_post(channel, rxdh);
1249 if (ring->stats->common_stats.usage_cnt > 0)
1250 ring->stats->common_stats.usage_cnt--;
1332 ring->stats->common_stats.usage_cnt++;
1333 if (ring->stats->common_stats.usage_max <
1334 ring->stats->common_stats.usage_cnt)
1335 ring->stats->common_stats.usage_max =
1336 ring->stats->common_stats.usage_cnt;
1388 ring->stats->rxd_t_code_err_cnt[t_code]++;
1405 u64 txdl_ptr,
u32 num_txds,
u32 no_snoop)
1455 void **txdlh,
void **txdl_priv)
1463 status = vxge_hw_channel_dtr_alloc(channel, txdlh);
1482 for (i = 0; i < fifo->
config->max_frags; i++) {
1509 void *txdlh,
u32 frag_idx,
1529 if (txdl_priv->
frags) {
1531 (txdl_priv->
frags - 1);
1541 fifo->stats->total_buffers++;
1574 vxge_hw_channel_dtr_post(&fifo->
channel, txdlh);
1576 __vxge_hw_non_offload_db_post(fifo,
1578 txdl_priv->
frags - 1,
1581 fifo->stats->total_posts++;
1582 fifo->stats->common_stats.usage_cnt++;
1583 if (fifo->stats->common_stats.usage_max <
1584 fifo->stats->common_stats.usage_cnt)
1585 fifo->stats->common_stats.usage_max =
1586 fifo->stats->common_stats.usage_cnt;
1648 if (fifo->stats->common_stats.usage_cnt > 0)
1649 fifo->stats->common_stats.usage_cnt--;
1685 if (((t_code & 0x7) < 0) || ((t_code & 0x7) > 0x4)) {
1690 fifo->stats->txd_t_code_err_cnt[t_code]++;
1730 max_frags = fifo->
config->max_frags;
1754 u8 (macaddr_mask)[ETH_ALEN],
1772 data2 |= (
u8)macaddr_mask[i];
1775 switch (duplicate_mode) {
1817 u8 (macaddr_mask)[ETH_ALEN])
1841 for (i = ETH_ALEN; i > 0; i--) {
1845 macaddr_mask[i-1] = (
u8)(data2 & 0xFF);
1869 u8 (macaddr_mask)[ETH_ALEN])
1893 for (i = ETH_ALEN; i > 0; i--) {
1897 macaddr_mask[i-1] = (
u8)(data2 & 0xFF);
1922 u8 (macaddr_mask)[ETH_ALEN])
1939 data2 |= (
u8)macaddr_mask[i];
2064 if (!(vpath->
hldev->access_rights &
2072 val64 |= VXGE_HW_RXMAC_VCFG0_UCAST_ALL_ADDR_EN |
2109 val64 &= ~(VXGE_HW_RXMAC_VCFG0_UCAST_ALL_ADDR_EN |
2207 val64 &= ~VXGE_HW_RXMAC_VCFG0_MCAST_ALL_ADDR_EN;
2233 status = __vxge_hw_vpath_alarm_process(vp->
vpath, skip_alarms);
2260 (vp_id * 4) + tim_msix_id[0]) |
2262 (vp_id * 4) + tim_msix_id[1]);
2267 (vpath->
hldev->first_vp_id * 4) + alarm_msix_id),
2270 if (vpath->
hldev->config.intr_mode ==
2300 __vxge_hw_pio_mem_write32_upper(
2302 &hldev->
common_reg->set_msix_mask_vect[msix_id % 4]);
2322 __vxge_hw_pio_mem_write32_upper(
2324 &hldev->
common_reg->clr_msix_one_shot_vec[msix_id % 4]);
2326 __vxge_hw_pio_mem_write32_upper(
2328 &hldev->
common_reg->clear_msix_mask_vect[msix_id % 4]);
2347 __vxge_hw_pio_mem_write32_upper(
2349 &hldev->
common_reg->clear_msix_mask_vect[msix_id%4]);
2368 tim_int_mask1, vp->
vpath->vp_id);
2383 __vxge_hw_pio_mem_write32_upper(
2406 tim_int_mask1, vp->
vpath->vp_id);
2419 __vxge_hw_pio_mem_write32_upper(
2453 t_code, ring->
channel.userdata);
2472 &ring->
vp_reg->prc_rxd_doorbell);
2506 &first_txdlh, &t_code);
2508 if (fifo->
callback(fifo, first_txdlh, t_code,