/titanic_50/usr/src/uts/common/io/nxge/ |
H A D | nxge_hw.c | 48 void nxge_get_mii(p_nxge_t nxgep, p_mblk_t mp); 49 void nxge_put_mii(p_nxge_t nxgep, p_mblk_t mp); 50 static nxge_status_t nxge_check_xaui_xfp(p_nxge_t nxgep); 61 nxge_global_reset(p_nxge_t nxgep) in nxge_global_reset() argument 65 NXGE_DEBUG_MSG((nxgep, DDI_CTL, "==> nxge_global_reset")); in nxge_global_reset() 67 if ((status = nxge_link_monitor(nxgep, LINK_MONITOR_STOP)) != NXGE_OK) in nxge_global_reset() 69 (void) nxge_intr_hw_disable(nxgep); in nxge_global_reset() 71 if ((nxgep->suspended) || in nxge_global_reset() 72 ((nxgep->statsp->port_stats.lb_mode == in nxge_global_reset() 74 (nxgep->statsp->port_stats.lb_mode == in nxge_global_reset() [all …]
|
H A D | nxge_main.c | 215 static nxge_status_t nxge_map_regs(p_nxge_t nxgep); 216 static void nxge_unmap_regs(p_nxge_t nxgep); 218 static void nxge_test_map_regs(p_nxge_t nxgep); 221 static nxge_status_t nxge_add_intrs(p_nxge_t nxgep); 222 static void nxge_remove_intrs(p_nxge_t nxgep); 224 static nxge_status_t nxge_add_intrs_adv(p_nxge_t nxgep); 227 static void nxge_intrs_enable(p_nxge_t nxgep); 228 static void nxge_intrs_disable(p_nxge_t nxgep); 275 extern nxge_status_t nxge_hio_rdc_enable(p_nxge_t nxgep); 288 static int nxge_altmac_set(p_nxge_t nxgep, uint8_t *mac_addr, [all …]
|
H A D | nxge_mac.c | 120 static nxge_status_t nxge_get_tn1010_speed(p_nxge_t nxgep, uint16_t *speed); 121 static nxge_status_t nxge_set_tn1010_param(p_nxge_t nxgep); 122 static nxge_status_t nxge_tn1010_check(p_nxge_t nxgep, 124 static boolean_t nxge_is_tn1010_phy(p_nxge_t nxgep); 125 static nxge_status_t nxge_tn1010_xcvr_init(p_nxge_t nxgep); 132 static nxge_status_t nxge_tn1010_reset(p_nxge_t nxgep); 133 static void nxge_dump_tn1010_status_regs(p_nxge_t nxgep); 257 static boolean_t nxge_is_tn1010_phy(p_nxge_t nxgep) in nxge_is_tn1010_phy() argument 259 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_is_tn1010_phy() 261 if (((nxgep->nxge_hw_p->niu_type >> (NXGE_PORT_TYPE_SHIFT * portn)) in nxge_is_tn1010_phy() [all …]
|
H A D | nxge_espc.c | 31 static void nxge_check_vpd_version(p_nxge_t nxgep); 57 nxge_espc_mac_addrs_get(p_nxge_t nxgep) in nxge_espc_mac_addrs_get() argument 61 uint8_t port_num = nxgep->mac.portnum; in nxge_espc_mac_addrs_get() 62 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep); in nxge_espc_mac_addrs_get() 65 NXGE_DEBUG_MSG((nxgep, MAC_CTL, in nxge_espc_mac_addrs_get() 71 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, in nxge_espc_mac_addrs_get() 76 nxge_espc_get_next_mac_addr(mac_addr, port_num, &nxgep->factaddr); in nxge_espc_mac_addrs_get() 77 NXGE_DEBUG_MSG((nxgep, CFG_CTL, in nxge_espc_mac_addrs_get() 83 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "<== nxge_espc_mac_addr_get, " in nxge_espc_mac_addrs_get() 90 nxge_espc_num_macs_get(p_nxge_t nxgep, uint8_t *nmacs) in nxge_espc_num_macs_get() argument [all …]
|
H A D | nxge_txdma.c | 90 static void nxge_txdma_fixup_hung_channel(p_nxge_t nxgep, 94 nxge_init_txdma_channels(p_nxge_t nxgep) in nxge_init_txdma_channels() argument 96 nxge_grp_set_t *set = &nxgep->tx_set; in nxge_init_txdma_channels() 102 NXGE_DEBUG_MSG((nxgep, MEM2_CTL, "==> nxge_init_txdma_channels")); in nxge_init_txdma_channels() 108 nxgep->pt_config.hw_config.def_mac_txdma_grpid + i; in nxge_init_txdma_channels() 109 map = nxgep->pt_config.tdc_grps[dev_gindex].map; in nxge_init_txdma_channels() 112 if ((nxge_grp_dc_add(nxgep, in nxge_init_txdma_channels() 122 NXGE_DEBUG_MSG((nxgep, MEM2_CTL, "<== nxge_init_txdma_channels")); in nxge_init_txdma_channels() 130 nxgep->pt_config.hw_config.def_mac_txdma_grpid + i; in nxge_init_txdma_channels() 131 map = nxgep->pt_config.tdc_grps[dev_gindex].map; in nxge_init_txdma_channels() [all …]
|
H A D | nxge_virtual.c | 141 void nxge_virint_regs_dump(p_nxge_t nxgep); 144 nxge_virint_regs_dump(p_nxge_t nxgep) in nxge_virint_regs_dump() argument 148 NXGE_DEBUG_MSG((nxgep, INT_CTL, "==> nxge_virint_regs_dump")); in nxge_virint_regs_dump() 149 handle = NXGE_DEV_NPI_HANDLE(nxgep); in nxge_virint_regs_dump() 155 (void) npi_mac_dump_regs(handle, nxgep->function_num); in nxge_virint_regs_dump() 156 (void) npi_ipp_dump_regs(handle, nxgep->function_num); in nxge_virint_regs_dump() 158 NXGE_DEBUG_MSG((nxgep, INT_CTL, "<== nxge_virint_regs_dump")); in nxge_virint_regs_dump() 185 p_nxge_t nxgep; in nxge_cntlops() local 199 nxgep = (p_nxge_t)ddi_get_soft_state(nxge_list, instance); in nxge_cntlops() 200 if (nxgep == NULL) { in nxge_cntlops() [all …]
|
H A D | nxge_fzc.c | 52 nxge_test_and_set(p_nxge_t nxgep, uint8_t tas) in nxge_test_and_set() argument 57 handle = NXGE_DEV_NPI_HANDLE(nxgep); in nxge_test_and_set() 67 nxge_set_fzc_multi_part_ctl(p_nxge_t nxgep, boolean_t mpc) in nxge_set_fzc_multi_part_ctl() argument 72 NXGE_DEBUG_MSG((nxgep, DMA_CTL, "==> nxge_set_fzc_multi_part_ctl")); in nxge_set_fzc_multi_part_ctl() 79 if (nxgep->use_partition && nxgep->function_num) { in nxge_set_fzc_multi_part_ctl() 83 handle = NXGE_DEV_NPI_HANDLE(nxgep); in nxge_set_fzc_multi_part_ctl() 85 NXGE_DEBUG_MSG((nxgep, DMA_CTL, in nxge_set_fzc_multi_part_ctl() 90 NXGE_DEBUG_MSG((nxgep, DMA_CTL, "<== nxge_set_fzc_multi_part_ctl")); in nxge_set_fzc_multi_part_ctl() 96 nxge_get_fzc_multi_part_ctl(p_nxge_t nxgep, boolean_t *mpc_p) in nxge_get_fzc_multi_part_ctl() argument 101 NXGE_DEBUG_MSG((nxgep, DMA_CTL, "<== nxge_get_fzc_multi_part_ctl")); in nxge_get_fzc_multi_part_ctl() [all …]
|
H A D | nxge_fflp.c | 88 nxge_tcam_dump_entry(p_nxge_t nxgep, uint32_t location) in nxge_tcam_dump_entry() argument 95 handle = nxgep->npi_reg_handle; in nxge_tcam_dump_entry() 101 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, in nxge_tcam_dump_entry() 109 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "location %x\n" in nxge_tcam_dump_entry() 121 nxge_get_tcam(p_nxge_t nxgep, p_mblk_t mp) in nxge_get_tcam() argument 128 uint32_t stop_location = nxgep->classifier.tcam_size; in nxge_get_tcam() 132 if ((location >= nxgep->classifier.tcam_size) || (location < -1)) { in nxge_get_tcam() 133 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, in nxge_get_tcam() 139 stop_location = nxgep->classifier.tcam_size; in nxge_get_tcam() 145 (void) nxge_tcam_dump_entry(nxgep, tcam_loc); in nxge_get_tcam() [all …]
|
H A D | nxge_rxdma.c | 37 #define NXGE_ACTUAL_RDCGRP(nxgep, rdcgrp) \ argument 38 (rdcgrp + nxgep->pt_config.hw_config.def_mac_rxdma_grpid) 39 #define NXGE_ACTUAL_RDC(nxgep, rdc) \ argument 40 (rdc + nxgep->pt_config.hw_config.start_rdc) 137 nxge_init_rxdma_channels(p_nxge_t nxgep) in nxge_init_rxdma_channels() argument 139 nxge_grp_set_t *set = &nxgep->rx_set; in nxge_init_rxdma_channels() 145 NXGE_DEBUG_MSG((nxgep, MEM2_CTL, "==> nxge_init_rxdma_channels")); in nxge_init_rxdma_channels() 147 if (!isLDOMguest(nxgep)) { in nxge_init_rxdma_channels() 148 if (nxge_rxdma_hw_start_common(nxgep) != NXGE_OK) { in nxge_init_rxdma_channels() 164 nxgep->pt_config.hw_config.def_mac_rxdma_grpid + i; in nxge_init_rxdma_channels() [all …]
|
H A D | nxge_zcp.c | 33 nxge_zcp_init(p_nxge_t nxgep) in nxge_zcp_init() argument 44 handle = nxgep->npi_handle; in nxge_zcp_init() 45 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_zcp_init() 47 if (nxgep->niu_type == N2_NIU) { in nxge_zcp_init() 49 } else if (NXGE_IS_VALID_NEPTUNE_TYPE(nxgep)) { in nxge_zcp_init() 103 NXGE_DEBUG_MSG((nxgep, RX_CTL, "==> nxge_zcp_init: port%d", portn)); in nxge_zcp_init() 107 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, in nxge_zcp_init() 113 nxge_zcp_handle_sys_errors(p_nxge_t nxgep) in nxge_zcp_handle_sys_errors() argument 123 handle = nxgep->npi_handle; in nxge_zcp_handle_sys_errors() 124 statsp = (p_nxge_zcp_stats_t)&nxgep->statsp->zcp_stats; in nxge_zcp_handle_sys_errors() [all …]
|
H A D | nxge_ndd.c | 544 nxge_get_param_soft_properties(p_nxge_t nxgep) in nxge_get_param_soft_properties() argument 553 NXGE_DEBUG_MSG((nxgep, DDI_CTL, " ==> nxge_get_param_soft_properties")); in nxge_get_param_soft_properties() 555 param_arr = nxgep->param_arr; in nxge_get_param_soft_properties() 556 param_count = nxgep->param_count; in nxge_get_param_soft_properties() 565 nxgep->dip, 0, param_arr[i].fcode_name, in nxge_get_param_soft_properties() 591 if (ddi_prop_lookup_int_array(DDI_DEV_T_ANY, nxgep->dip, 0, in nxge_get_param_soft_properties() 600 NXGE_DEBUG_MSG((nxgep, OBP_CTL, in nxge_get_param_soft_properties() 602 nxgep->instance)); in nxge_get_param_soft_properties() 603 NXGE_DEBUG_MSG((nxgep, OBP_CTL, in nxge_get_param_soft_properties() 612 if (ddi_prop_lookup_int_array(DDI_DEV_T_ANY, nxgep->dip, 0, in nxge_get_param_soft_properties() [all …]
|
H A D | nxge_ipp.c | 35 nxge_ipp_init(p_nxge_t nxgep) in nxge_ipp_init() argument 48 handle = nxgep->npi_handle; in nxge_ipp_init() 49 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_ipp_init() 51 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_init: port%d", portn)); in nxge_ipp_init() 54 if (nxgep->niu_type == N2_NIU) { in nxge_ipp_init() 56 } else if (NXGE_IS_VALID_NEPTUNE_TYPE(nxgep)) { in nxge_ipp_init() 88 IPP_REG_RD(nxgep->npi_handle, portn, IPP_ECC_ERR_COUNTER_REG, &val); in nxge_ipp_init() 89 IPP_REG_RD(nxgep->npi_handle, portn, IPP_BAD_CKSUM_ERR_CNT_REG, &val); in nxge_ipp_init() 90 IPP_REG_RD(nxgep->npi_handle, portn, IPP_DISCARD_PKT_CNT_REG, &val); in nxge_ipp_init() 99 nxgep->ipp.iconfig = ICFG_IPP_ALL; in nxge_ipp_init() [all …]
|
H A D | nxge_txc.c | 39 nxge_txc_init(p_nxge_t nxgep) in nxge_txc_init() argument 45 handle = NXGE_DEV_NPI_HANDLE(nxgep); in nxge_txc_init() 46 port = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_txc_init() 48 NXGE_DEBUG_MSG((nxgep, TX_CTL, "==> nxge_txc_init: portn %d", port)); in nxge_txc_init() 64 TXDMA_PORT_BITMAP(nxgep))) != NPI_SUCCESS) { in nxge_txc_init() 71 NXGE_DEBUG_MSG((nxgep, TX_CTL, "<== nxge_txc_init: portn %d", port)); in nxge_txc_init() 75 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, in nxge_txc_init() 83 nxge_txc_uninit(p_nxge_t nxgep) in nxge_txc_uninit() argument 89 handle = NXGE_DEV_NPI_HANDLE(nxgep); in nxge_txc_uninit() 90 port = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_txc_uninit() [all …]
|
H A D | nxge_fm.c | 347 nxge_fm_init(p_nxge_t nxgep, ddi_device_acc_attr_t *reg_attr, in nxge_fm_init() argument 357 nxgep->fm_capabilities = ddi_prop_get_int(DDI_DEV_T_ANY, nxgep->dip, in nxge_fm_init() 361 NXGE_ERROR_MSG((nxgep, DDI_CTL, in nxge_fm_init() 362 "FM capable = %d\n", nxgep->fm_capabilities)); in nxge_fm_init() 364 if (isLDOMguest(nxgep)) { in nxge_fm_init() 365 nxgep->fm_capabilities = DDI_FM_NOT_CAPABLE; in nxge_fm_init() 374 if (nxgep->fm_capabilities) in nxge_fm_init() 375 ddi_fm_init(nxgep->dip, &nxgep->fm_capabilities, &iblk); in nxge_fm_init() 380 if (DDI_FM_EREPORT_CAP(nxgep->fm_capabilities) || in nxge_fm_init() 381 DDI_FM_ERRCB_CAP(nxgep->fm_capabilities)) { in nxge_fm_init() [all …]
|
H A D | nxge_kstats.c | 43 nxge_init_statsp(p_nxge_t nxgep) in nxge_init_statsp() argument 47 NXGE_DEBUG_MSG((nxgep, KST_CTL, "==> nxge_init_statsp")); in nxge_init_statsp() 50 nxgep->statsp = KMEM_ZALLOC(stats_size, KM_SLEEP); in nxge_init_statsp() 51 nxgep->statsp->stats_size = stats_size; in nxge_init_statsp() 53 NXGE_DEBUG_MSG((nxgep, KST_CTL, " <== nxge_init_statsp")); in nxge_init_statsp() 523 p_nxge_t nxgep; in nxge_tdc_stat_update() local 529 nxgep = (p_nxge_t)ksp->ks_private; in nxge_tdc_stat_update() 530 if (nxgep == NULL) in nxge_tdc_stat_update() 533 NXGE_DEBUG_MSG((nxgep, KST_CTL, "==> nxge_rxstat_update")); in nxge_tdc_stat_update() 540 statsp = (p_nxge_tx_ring_stats_t)&nxgep->statsp->tdc_stats[channel]; in nxge_tdc_stat_update() [all …]
|
H A D | nxge_send.c | 68 (void) nxge_txdma_reclaim(ring->nxgep, ring, 0); in nxge_tx_ring_task() 72 mac_tx_ring_update(ring->nxgep->mach, ring->tx_ring_handle); in nxge_tx_ring_task() 90 p_nxge_t nxgep; in nxge_tx_ring_send() local 95 nxgep = nrhp->nxgep; in nxge_tx_ring_send() 96 channel = nxgep->pt_config.hw_config.tdc.start + nrhp->index; in nxge_tx_ring_send() 97 tx_ring_p = nxgep->tx_rings->rings[channel]; in nxge_tx_ring_send() 112 ASSERT(nxgep == tx_ring_p->nxgep); in nxge_tx_ring_send() 117 if (isLDOMservice(nxgep) && tx_ring_p->tx_ring_offline) { in nxge_tx_ring_send() 126 status = nxge_start(nxgep, tx_ring_p, mp); in nxge_tx_ring_send() 136 nxge_start(p_nxge_t nxgep, p_tx_ring_t tx_ring_p, p_mblk_t mp) in nxge_start() argument [all …]
|
H A D | nxge_classify.c | 168 nxge_classify_init(p_nxge_t nxgep) in nxge_classify_init() argument 172 status = nxge_classify_init_sw(nxgep); in nxge_classify_init() 175 status = nxge_set_hw_classify_config(nxgep); in nxge_classify_init() 179 status = nxge_classify_init_hw(nxgep); in nxge_classify_init() 187 nxge_classify_uninit(p_nxge_t nxgep) in nxge_classify_uninit() argument 191 status = nxge_classify_exit_sw(nxgep); in nxge_classify_uninit() 200 nxge_classify_get_cfg_value(p_nxge_t nxgep, uint8_t cfg_type, uint8_t cfg_param) in nxge_classify_get_cfg_value() argument 219 nxge_set_hw_classify_config(p_nxge_t nxgep) in nxge_set_hw_classify_config() argument 224 NXGE_DEBUG_MSG((nxgep, OBP_CTL, "==> nxge_get_hw_classify_config")); in nxge_set_hw_classify_config() 228 p_all_cfgp = (p_nxge_dma_pt_cfg_t)&nxgep->pt_config; in nxge_set_hw_classify_config() [all …]
|
H A D | nxge_hio.c | 151 nxge->tx_hio_groups[i].nxgep = nxge; in nxge_hio_init() 159 nxge->rx_hio_groups[i].nxgep = nxge; in nxge_hio_init() 1022 nxge->tx_hio_groups[i].nxgep = nxge; in nxge_hio_init() 1030 nxge->rx_hio_groups[i].nxgep = nxge; in nxge_hio_init() 1062 nxge->shares[i].nxgep = nxge; in nxge_hio_init() 1122 p_nxge_t nxgep = (p_nxge_t)arg; in nxge_hio_set_unicst() local 1126 if (nxge_set_mac_addr(nxgep, &addrp)) { in nxge_hio_set_unicst() 1127 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, in nxge_hio_set_unicst() 1132 nxgep->primary = B_TRUE; in nxge_hio_set_unicst() 1139 nxge_hio_clear_unicst(p_nxge_t nxgep, const uint8_t *mac_addr) in nxge_hio_clear_unicst() argument [all …]
|
/titanic_50/usr/src/uts/common/sys/nxge/ |
H A D | nxge_impl.h | 155 #define NXGE_DEV_NPI_HANDLE(nxgep) (nxgep->npi_handle) argument 157 #define NPI_PCI_ACC_HANDLE_SET(nxgep, ah) (nxgep->npi_pci_handle.regh = ah) argument 158 #define NPI_PCI_ADD_HANDLE_SET(nxgep, ap) (nxgep->npi_pci_handle.regp = ap) argument 160 #define NPI_ACC_HANDLE_SET(nxgep, ah) (nxgep->npi_handle.regh = ah) argument 161 #define NPI_ADD_HANDLE_SET(nxgep, ap) \ argument 162 nxgep->npi_handle.is_vraddr = B_FALSE; \ 163 nxgep->npi_handle.function.instance = nxgep->instance; \ 164 nxgep->npi_handle.function.function = nxgep->function_num; \ 165 nxgep->npi_handle.nxgep = (void *) nxgep; \ 166 nxgep->npi_handle.regp = ap; [all …]
|
H A D | nxge_common_impl.h | 298 #define FM_REPORT_FAULT(nxgep, impact, location, msg)\ argument 299 ddi_dev_report_fault(nxgep->dip, impact, location, msg) 300 #define FM_CHECK_DEV_HANDLE(nxgep)\ argument 301 ddi_check_acc_handle(nxgep->dev_regs->nxge_regh) 302 #define FM_GET_DEVSTATE(nxgep)\ argument 303 ddi_get_devstate(nxgep->dip) 304 #define FM_SERVICE_RESTORED(nxgep)\ argument 305 ddi_fm_service_impact(nxgep->dip, DDI_SERVICE_RESTORED) 306 #define NXGE_FM_REPORT_ERROR(nxgep, portn, chan, ereport_id)\ argument 307 nxge_fm_report_error(nxgep, portn, chan, ereport_id) [all …]
|
H A D | nxge_zcp.h | 67 nxge_status_t nxge_zcp_init(p_nxge_t nxgep); 68 void nxge_zcp_inject_err(p_nxge_t nxgep, uint32_t); 69 nxge_status_t nxge_zcp_fatal_err_recover(p_nxge_t nxgep);
|
H A D | nxge_txdma.h | 37 #define TXDMA_PORT_BITMAP(nxgep) (nxgep->pt_config.tx_dma_map) argument 128 struct _nxge_t *nxgep; member 204 struct _nxge_t *nxgep; member 278 extern nxge_status_t nxge_alloc_txb(p_nxge_t nxgep, int channel); 279 extern void nxge_free_txb(p_nxge_t nxgep, int channel);
|
H A D | nxge_rxdma.h | 170 struct _nxge_t *nxgep; member 208 struct _nxge_t *nxgep; member 301 struct _nxge_t *nxgep; member 367 struct _nxge_t *nxgep; member 439 extern nxge_status_t nxge_alloc_rxb(p_nxge_t nxgep, int channel); 440 extern void nxge_free_rxb(p_nxge_t nxgep, int channel);
|
H A D | nxge_virtual.h | 75 nxge_status_t nxge_intr_mask_mgmt(p_nxge_t nxgep); 76 void nxge_virint_regs_dump(p_nxge_t nxgep);
|
/titanic_50/usr/src/uts/common/io/nxge/npi/ |
H A D | npi.h | 208 void * nxgep; member
|