/illumos-gate/usr/src/uts/common/io/nxge/npi/ |
H A D | npi_ipp.c | 157 npi_ipp_reset(npi_handle_t handle, uint8_t portn) in npi_ipp_reset() argument 162 ASSERT(IS_PORT_NUM_VALID(portn)); in npi_ipp_reset() 164 IPP_REG_RD(handle, portn, IPP_CONFIG_REG, &val); in npi_ipp_reset() 166 IPP_REG_WR(handle, portn, IPP_CONFIG_REG, val); in npi_ipp_reset() 170 IPP_REG_RD(handle, portn, IPP_CONFIG_REG, &val); in npi_ipp_reset() 178 return (NPI_FAILURE | NPI_IPP_RESET_FAILED(portn)); in npi_ipp_reset() 189 npi_ipp_config(npi_handle_t handle, config_op_t op, uint8_t portn, in npi_ipp_config() argument 194 ASSERT(IS_PORT_NUM_VALID(portn)); in npi_ipp_config() 205 return (NPI_FAILURE | NPI_IPP_CONFIG_INVALID(portn)); in npi_ipp_config() 208 IPP_REG_RD(handle, portn, IPP_CONFIG_REG, &val); in npi_ipp_config() [all …]
|
H A D | npi_mac.c | 36 #define XMAC_WAIT_REG(handle, portn, reg, val) {\ argument 40 XMAC_REG_RD(handle, portn, reg, &val);\ 45 #define BMAC_WAIT_REG(handle, portn, reg, val) {\ argument 49 BMAC_REG_RD(handle, portn, reg, &val);\ 555 npi_mac_pcs_link_intr_enable(npi_handle_t handle, uint8_t portn) in npi_mac_pcs_link_intr_enable() argument 559 ASSERT(IS_PORT_NUM_VALID(portn)); in npi_mac_pcs_link_intr_enable() 561 PCS_REG_RD(handle, portn, PCS_CONFIG_REG, &pcs_cfg.value); in npi_mac_pcs_link_intr_enable() 563 PCS_REG_WR(handle, portn, PCS_CONFIG_REG, pcs_cfg.value); in npi_mac_pcs_link_intr_enable() 569 npi_mac_pcs_link_intr_disable(npi_handle_t handle, uint8_t portn) in npi_mac_pcs_link_intr_disable() argument 573 ASSERT(IS_PORT_NUM_VALID(portn)); in npi_mac_pcs_link_intr_disable() [all …]
|
H A D | npi_mac.h | 271 #define IS_XMAC_PORT_NUM_VALID(portn)\ argument 272 ((portn == XMAC_PORT_0) || (portn == XMAC_PORT_1)) 274 #define IS_BMAC_PORT_NUM_VALID(portn)\ argument 275 ((portn == BMAC_PORT_0) || (portn == BMAC_PORT_1)) 277 #define XMAC_REG_WR(handle, portn, reg, val)\ argument 278 NXGE_REG_WR64(handle, XMAC_REG_ADDR((portn), (reg)), (val)) 280 #define XMAC_REG_RD(handle, portn, reg, val_p)\ argument 281 NXGE_REG_RD64(handle, XMAC_REG_ADDR((portn), (reg)), (val_p)) 283 #define BMAC_REG_WR(handle, portn, reg, val)\ argument 284 NXGE_REG_WR64(handle, BMAC_REG_ADDR((portn), (reg)), (val)) [all …]
|
H A D | npi_ipp.h | 97 #define NPI_IPP_PORT_INVALID(portn)\ argument 99 IS_PORT | (portn << NPI_PORT_CHAN_SHIFT)) 100 #define NPI_IPP_OPCODE_INVALID(portn)\ argument 102 IS_PORT | (portn << NPI_PORT_CHAN_SHIFT)) 103 #define NPI_IPP_CONFIG_INVALID(portn)\ argument 105 IS_PORT | (portn << NPI_PORT_CHAN_SHIFT)) 106 #define NPI_IPP_MAX_PKT_BYTES_INVALID(portn)\ argument 109 IS_PORT | (portn << NPI_PORT_CHAN_SHIFT)) 110 #define NPI_IPP_COUNTER_INVALID(portn)\ argument 112 IS_PORT | (portn << NPI_PORT_CHAN_SHIFT)) [all …]
|
H A D | npi_zcp.h | 149 #define NPI_ZCP_PORT_INVALID(portn) ((ZCP_BLK_ID << 8) | PORT_INVALID |\ argument 150 (portn << 12))
|
H A D | npi_zcp.c | 585 npi_zcp_tt_cfifo_entry(npi_handle_t handle, io_op_t op, uint8_t portn, in npi_zcp_tt_cfifo_entry() argument 595 if (portn > 3) { in npi_zcp_tt_cfifo_entry() 598 " Invalid Input: portn <%d>", portn)); in npi_zcp_tt_cfifo_entry() 599 return (NPI_FAILURE | NPI_ZCP_PORT_INVALID(portn)); in npi_zcp_tt_cfifo_entry() 603 if (zcp_mem_write(handle, 0, ZCP_RAM_SEL_CFIFO0 + portn, in npi_zcp_tt_cfifo_entry() 612 if (zcp_mem_read(handle, 0, ZCP_RAM_SEL_CFIFO0 + portn, in npi_zcp_tt_cfifo_entry()
|
H A D | npi_espc.c | 243 npi_espc_port_phy_type_get(npi_handle_t handle, uint8_t *data, uint8_t portn) in npi_espc_port_phy_type_get() argument 247 ASSERT(IS_PORT_NUM_VALID(portn)); in npi_espc_port_phy_type_get() 250 switch (portn) { in npi_espc_port_phy_type_get() 267 portn)); in npi_espc_port_phy_type_get()
|
H A D | npi_txc.c | 1038 npi_txc_global_imask_set(npi_handle_t handle, uint8_t portn, uint8_t istatus) in npi_txc_global_imask_set() argument 1043 switch (portn) { in npi_txc_global_imask_set()
|
/illumos-gate/usr/src/uts/common/io/nxge/ |
H A D | nxge_ipp.c | 35 uint8_t portn; in nxge_ipp_init() local 47 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_ipp_init() 49 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_init: port%d", portn)); in nxge_ipp_init() 55 if (portn < 2) in nxge_ipp_init() 65 portn, i, 0, 0, 0, 0, 0)) != NPI_SUCCESS) in nxge_ipp_init() 67 if ((rs = npi_ipp_read_dfifo(handle, portn, in nxge_ipp_init() 73 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS) in nxge_ipp_init() 75 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS) in nxge_ipp_init() 82 if ((rs = npi_ipp_reset(handle, portn)) != NPI_SUCCESS) in nxge_ipp_init() 86 IPP_REG_RD(nxgep->npi_handle, portn, IPP_ECC_ERR_COUNTER_REG, &val); in nxge_ipp_init() [all …]
|
H A D | nxge_zcp.c | 33 uint8_t portn; in nxge_zcp_init() local 43 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_zcp_init() 48 if (portn < 2) in nxge_zcp_init() 65 portn, i, &w_data) != NPI_SUCCESS) in nxge_zcp_init() 68 portn, i, &r_data) != NPI_SUCCESS) in nxge_zcp_init() 72 if (npi_zcp_rest_cfifo_port(handle, portn) != NPI_SUCCESS) in nxge_zcp_init() 79 switch (portn) { in nxge_zcp_init() 101 NXGE_DEBUG_MSG((nxgep, RX_CTL, "==> nxge_zcp_init: port%d", portn)); in nxge_zcp_init() 106 "nxge_zcp_init: Fail to initialize ZCP Port #%d\n", portn)); in nxge_zcp_init() 116 uint8_t portn; in nxge_zcp_handle_sys_errors() local [all …]
|
H A D | nxge_mac.c | 259 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_is_tn1010_phy() local 261 if (((nxgep->nxge_hw_p->niu_type >> (NXGE_PORT_TYPE_SHIFT * portn)) in nxge_is_tn1010_phy() 283 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_get_xcvr_type() local 323 if (portn > 1) { in nxge_get_xcvr_type() 327 if (nxge_hswap_phy_present(nxgep, portn)) in nxge_get_xcvr_type() 574 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_setup_xcvr_table() local 581 portn)); in nxge_setup_xcvr_table() 589 nxgep->xcvr_addr = portn; in nxge_setup_xcvr_table() 598 if (nxgep->nxge_hw_p->xcvr_addr[portn]) { in nxge_setup_xcvr_table() 600 nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table() [all …]
|
H A D | nxge_txc.c | 394 uint8_t portn; in nxge_txc_handle_port_errors() local 399 portn = nxgep->mac.portnum; in nxge_txc_handle_port_errors() 406 if ((rs = npi_txc_ro_states_get(handle, portn, in nxge_txc_handle_port_errors() 413 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_txc_handle_port_errors() 421 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_txc_handle_port_errors() 429 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_txc_handle_port_errors() 441 if ((rs = npi_txc_ro_ecc_state_clr(handle, portn)) in nxge_txc_handle_port_errors() 449 portn, 0); in nxge_txc_handle_port_errors() 455 if ((rs = npi_txc_sf_states_get(handle, portn, in nxge_txc_handle_port_errors() 461 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_txc_handle_port_errors() [all …]
|
H A D | nxge_kstats.c | 1912 uint8_t portn; in nxge_save_cntrs() local 1921 portn = nxgep->mac.portnum; in nxge_save_cntrs() 1929 XMAC_REG_RD(handle, portn, XTXMAC_FRM_CNT_REG, &val); in nxge_save_cntrs() 1931 XMAC_REG_RD(handle, portn, XTXMAC_BYTE_CNT_REG, &val); in nxge_save_cntrs() 1936 XMAC_REG_RD(handle, portn, XRXMAC_CRC_ER_CNT_REG, &val); in nxge_save_cntrs() 1940 XMAC_REG_RD(handle, portn, XRXMAC_MPSZER_CNT_REG, &val); in nxge_save_cntrs() 1944 XMAC_REG_RD(handle, portn, XRXMAC_CD_VIO_CNT_REG, &val); in nxge_save_cntrs() 1948 XMAC_REG_RD(handle, portn, XRXMAC_BT_CNT_REG, &val); in nxge_save_cntrs() 1951 XMAC_REG_RD(handle, portn, XRXMAC_HIST_CNT1_REG, &val); in nxge_save_cntrs() 1957 XMAC_REG_RD(handle, portn, XRXMAC_HIST_CNT2_REG, &val); in nxge_save_cntrs() [all …]
|
H A D | nxge_rxdma.c | 2899 uint8_t portn; in nxge_rx_err_evnts() local 2905 portn = nxgep->mac.portnum; in nxge_rx_err_evnts() 2910 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2918 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2927 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2936 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2945 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2954 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2974 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() 2983 NXGE_FM_REPORT_ERROR(nxgep, portn, channel, in nxge_rx_err_evnts() [all …]
|
H A D | nxge_hw.c | 330 uint8_t portn; in nxge_check_xaui_xfp() local 334 portn = nxgep->mac.portnum; in nxge_check_xaui_xfp() 351 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_check_xaui_xfp() 355 "XAUI is bad or absent on port<%d>\n", portn)); in nxge_check_xaui_xfp() 375 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL, in nxge_check_xaui_xfp() 380 portn)); in nxge_check_xaui_xfp()
|
H A D | nxge_fflp.c | 2133 uint8_t portn, rdc_grp; in nxge_fflp_handle_sys_errors() local 2144 portn = nxgep->mac.portnum; in nxge_fflp_handle_sys_errors() 2157 portn, vlan_err.bits.ldw.addr, in nxge_fflp_handle_sys_errors() 2164 portn)); in nxge_fflp_handle_sys_errors() 2177 portn, tcam_err.bits.ldw.addr, in nxge_fflp_handle_sys_errors() 2184 portn, tcam_err.bits.ldw.addr, in nxge_fflp_handle_sys_errors() 2191 " TCAM Multiple errors on port %d", portn)); in nxge_fflp_handle_sys_errors() 2194 " TCAM PIO error on port %d", portn)); in nxge_fflp_handle_sys_errors() 2214 portn, rdc_grp, in nxge_fflp_handle_sys_errors() 2243 multi_str, multi_bit_str, portn, in nxge_fflp_handle_sys_errors()
|
H A D | nxge_main.c | 532 uint8_t portn; in nxge_attach() local 669 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_attach() 670 nxgep->mac.portnum = portn; in nxge_attach() 671 if ((portn == 0) || (portn == 1)) in nxge_attach() 4123 uint8_t portn; in nxge_altmac_set() local 4133 portn = nxgep->mac.portnum; in nxge_altmac_set() 4165 if (portn == XMAC_PORT_0 || portn == XMAC_PORT_1) in nxge_altmac_set() 4258 uint8_t portn; in nxge_m_mmac_remove() local 4282 portn = nxgep->mac.portnum; in nxge_m_mmac_remove() 4283 if (portn == XMAC_PORT_0 || portn == XMAC_PORT_1) in nxge_m_mmac_remove() [all …]
|
/illumos-gate/usr/src/uts/common/sys/nxge/ |
H A D | nxge_defs.h | 436 #define IS_PORT_NUM_VALID(portn)\ argument 437 (portn < 4)
|
H A D | nxge_common_impl.h | 306 #define NXGE_FM_REPORT_ERROR(nxgep, portn, chan, ereport_id)\ argument 307 nxge_fm_report_error(nxgep, portn, chan, ereport_id)
|
H A D | nxge_impl.h | 1056 void nxge_pcs_check(p_nxge_t, uint8_t portn, nxge_link_state_t *);
|
/illumos-gate/usr/src/cmd/bhyve/common/ |
H A D | pci_xhci.c | 341 static void pci_xhci_reset_port(struct pci_xhci_softc *sc, int portn, int warm); 2592 pci_xhci_reset_port(struct pci_xhci_softc *sc, int portn, int warm) in pci_xhci_reset_port() argument 2599 assert(portn <= XHCI_MAX_DEVS); in pci_xhci_reset_port() 2601 DPRINTF(("xhci reset port %d", portn)); in pci_xhci_reset_port() 2603 port = XHCI_PORTREG_PTR(sc, portn); in pci_xhci_reset_port() 2604 dev = XHCI_DEVINST_PTR(sc, portn); in pci_xhci_reset_port() 2617 pci_xhci_set_evtrb(&evtrb, portn, in pci_xhci_reset_port() 2629 pci_xhci_init_port(struct pci_xhci_softc *sc, int portn) in pci_xhci_init_port() argument 2634 port = XHCI_PORTREG_PTR(sc, portn); in pci_xhci_init_port() 2635 dev = XHCI_DEVINST_PTR(sc, portn); in pci_xhci_init_port() [all …]
|
/illumos-gate/usr/src/uts/common/io/mlxcx/ |
H A D | mlxcx_intr.c | 749 uint_t portn; in mlxcx_intr_async() local 821 portn = get_bits8( in mlxcx_intr_async() 824 if (portn >= mlxp->mlx_nports) in mlxcx_intr_async() 827 param = &mlxp->mlx_ports[portn].mlx_port_event; in mlxcx_intr_async() 840 ASSERT3P(param->mla_port, ==, &mlxp->mlx_ports[portn]); in mlxcx_intr_async()
|