Lines Matching refs:portn
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()
609 nxgep->xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table()
615 nxgep->xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table()
648 (NXGE_PORT_TYPE_SHIFT * portn); in nxge_setup_xcvr_table()
709 nxgep->xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table()
722 switch (portn) { in nxge_setup_xcvr_table()
755 nxgep->xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table()
762 nxgep->xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table()
770 nxgep->xcvr_addr = portn; in nxge_setup_xcvr_table()
781 nxgep->nxge_hw_p->xcvr_addr[portn], in nxge_setup_xcvr_table()
783 if (nxgep->nxge_hw_p->xcvr_addr[portn]) { in nxge_setup_xcvr_table()
785 nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_setup_xcvr_table()
899 uint8_t portn; in nxge_mac_init() local
901 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_mac_init()
903 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "==> nxge_mac_init: port<%d>", portn)); in nxge_mac_init()
905 nxgep->mac.portnum = portn; in nxge_mac_init()
908 if ((portn == BMAC_PORT_0) || (portn == BMAC_PORT_1)) in nxge_mac_init()
957 ((portn == 0) || (portn == 1))) { in nxge_mac_init()
966 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "<== nxge_mac_init: port<%d>", portn)); in nxge_mac_init()
971 "nxge_mac_init: failed to initialize MAC port<%d>", portn)); in nxge_mac_init()
983 uint8_t portn; in nxge_link_init() local
985 portn = nxgep->mac.portnum; in nxge_link_init()
987 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "==> nxge_link_init: port<%d>", portn)); in nxge_link_init()
1015 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "<== nxge_link_init: port<%d>", portn)); in nxge_link_init()
1021 "failed to initialize Ethernet link on port<%d>", portn)); in nxge_link_init()
1034 uint8_t portn; in nxge_xif_init() local
1041 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_xif_init()
1043 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "==> nxge_xif_init: port<%d>", portn)); in nxge_xif_init()
1054 ((portn == 0) || (portn == 1))) { in nxge_xif_init()
1099 rs = npi_xmac_xif_config(handle, INIT, portn, xif_cfg); in nxge_xif_init()
1111 SET_MAC_ATTR1(handle, ap, portn, MAC_PORT_MODE, in nxge_xif_init()
1129 portn, portmode, statsp->mac_stats.link_speed)); in nxge_xif_init()
1131 SET_MAC_ATTR1(handle, ap, portn, MAC_PORT_MODE, in nxge_xif_init()
1134 SET_MAC_ATTR1(handle, ap, portn, MAC_PORT_MODE, in nxge_xif_init()
1142 " for port<%d>", portmode, portn)); in nxge_xif_init()
1166 rs = npi_bmac_xif_config(handle, INIT, portn, xif_cfg); in nxge_xif_init()
1171 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "<== nxge_xif_init: port<%d>", portn)); in nxge_xif_init()
1175 "nxge_xif_init: Failed to initialize XIF port<%d>", portn)); in nxge_xif_init()
1189 uint8_t portn; in nxge_pcs_init() local
1199 portn = nxgep->mac.portnum; in nxge_pcs_init()
1202 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "==> nxge_pcs_init: port<%d>", portn)); in nxge_pcs_init()
1210 if ((rs = npi_mac_pcs_reset(handle, portn)) in nxge_pcs_init()
1216 if ((rs = npi_mac_pcs_reset(handle, portn)) in nxge_pcs_init()
1225 PCS_REG_WR(handle, portn, PCS_CONFIG_REG, pcs_cfg.value); in nxge_pcs_init()
1226 PCS_REG_WR(handle, portn, PCS_DATAPATH_MODE_REG, 0); in nxge_pcs_init()
1230 portn, pcs_cfg.value)); in nxge_pcs_init()
1240 PCS_REG_WR(handle, portn, PCS_MII_CTRL_REG, in nxge_pcs_init()
1249 XMAC_REG_RD(handle, portn, XMAC_CONFIG_REG, &val); in nxge_pcs_init()
1251 XMAC_REG_WR(handle, portn, XMAC_CONFIG_REG, val); in nxge_pcs_init()
1253 if ((rs = npi_xmac_xpcs_reset(handle, portn)) != NPI_SUCCESS) in nxge_pcs_init()
1257 if ((rs = npi_xmac_xpcs_read(handle, portn, in nxge_pcs_init()
1266 if ((rs = npi_xmac_xpcs_write(handle, portn, in nxge_pcs_init()
1271 if ((rs = npi_xmac_xpcs_write(handle, portn, in nxge_pcs_init()
1275 if ((rs = npi_xmac_xpcs_read(handle, portn, in nxge_pcs_init()
1278 if ((rs = npi_xmac_xpcs_read(handle, portn, in nxge_pcs_init()
1285 "==> nxge_pcs_init: (1G) copper port<%d>", portn)); in nxge_pcs_init()
1286 if (portn < 4) { in nxge_pcs_init()
1287 PCS_REG_WR(handle, portn, PCS_DATAPATH_MODE_REG, in nxge_pcs_init()
1290 if ((rs = npi_mac_pcs_reset(handle, portn)) != NPI_SUCCESS) in nxge_pcs_init()
1297 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "<== nxge_pcs_init: port<%d>", portn)); in nxge_pcs_init()
1301 "nxge_pcs_init: Failed to initialize PCS port<%d>", portn)); in nxge_pcs_init()
1312 uint8_t portn; in nxge_mac_ctrl_init() local
1318 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_mac_ctrl_init()
1321 portn)); in nxge_mac_ctrl_init()
1329 XMAC_REG_RD(handle, portn, XMAC_CONFIG_REG, &val); in nxge_mac_ctrl_init()
1353 portn)); in nxge_mac_ctrl_init()
1357 "enable pause", portn)); in nxge_mac_ctrl_init()
1371 "disable pause", portn)); in nxge_mac_ctrl_init()
1375 XMAC_REG_WR(handle, portn, XMAC_CONFIG_REG, val); in nxge_mac_ctrl_init()
1378 BMAC_REG_RD(handle, portn, MAC_CTRL_CONFIG_REG, &val); in nxge_mac_ctrl_init()
1416 BMAC_REG_WR(handle, portn, MAC_CTRL_CONFIG_REG, val); in nxge_mac_ctrl_init()
1420 portn)); in nxge_mac_ctrl_init()
1432 uint8_t portn; in nxge_serdes_init() local
1437 portn = nxgep->mac.portnum; in nxge_serdes_init()
1439 "==> nxge_serdes_init port<%d>", portn)); in nxge_serdes_init()
1451 portn)); in nxge_serdes_init()
1458 portn)); in nxge_serdes_init()
1468 uint8_t portn; in nxge_n2_serdes_init() local
1482 portn = nxgep->mac.portnum; in nxge_n2_serdes_init()
1485 portn)); in nxge_n2_serdes_init()
1488 "==> nxge_n2_serdes_init port<%d>: KT-NIU", portn)); in nxge_n2_serdes_init()
1540 if ((status = nxge_mdio_write(nxgep, portn, in nxge_n2_serdes_init()
1550 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1554 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1559 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1563 portn, pll_cfg_l.value, cfg.value)); in nxge_n2_serdes_init()
1565 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1569 portn, pll_sts_l.value, cfg.value)); in nxge_n2_serdes_init()
1586 if (portn == 0) { in nxge_n2_serdes_init()
1595 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1599 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1604 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1608 portn, pll_cfg_l.value, cfg.value)); in nxge_n2_serdes_init()
1610 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1614 portn, pll_sts_l.value, cfg.value)); in nxge_n2_serdes_init()
1624 portn, test_cfg.value)); in nxge_n2_serdes_init()
1625 if ((status = nxge_mdio_write(nxgep, portn, in nxge_n2_serdes_init()
1641 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1645 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1651 portn, chan, tx_cfg_l.value)); in nxge_n2_serdes_init()
1654 portn, chan, tx_cfg_h.value)); in nxge_n2_serdes_init()
1659 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1663 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_serdes_init()
1669 portn, chan, rx_cfg_l.value)); in nxge_n2_serdes_init()
1673 portn, chan, rx_cfg_h.value)); in nxge_n2_serdes_init()
1677 portn)); in nxge_n2_serdes_init()
1683 portn)); in nxge_n2_serdes_init()
1694 uint8_t portn; in nxge_n2_kt_serdes_init() local
1710 portn = nxgep->mac.portnum; in nxge_n2_kt_serdes_init()
1713 "==> nxge_n2_kt_serdes_init port<%d>", portn)); in nxge_n2_kt_serdes_init()
1759 portn, tx_cfg_l.value)); in nxge_n2_kt_serdes_init()
1770 portn, tx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1783 portn, rx_cfg_l.value)); in nxge_n2_kt_serdes_init()
1794 portn, rx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1806 portn, pll_cfg_l.value)); in nxge_n2_kt_serdes_init()
1808 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1813 portn, pll_cfg_l.value)); in nxge_n2_kt_serdes_init()
1823 "loopback 0x%x", portn, tx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1826 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1831 portn, pll_cfg_l.value, cfg.value)); in nxge_n2_kt_serdes_init()
1833 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1837 portn, cfg.value)); in nxge_n2_kt_serdes_init()
1850 portn, tx_cfg_l.value)); in nxge_n2_kt_serdes_init()
1857 portn, tx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1868 portn, rx_cfg_l.value)); in nxge_n2_kt_serdes_init()
1875 portn, rx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1883 portn, pll_cfg_l.value)); in nxge_n2_kt_serdes_init()
1885 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1892 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1896 portn, pll_cfg_l.value, cfg.value)); in nxge_n2_kt_serdes_init()
1898 nxge_mdio_read(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1902 portn, cfg.value)); in nxge_n2_kt_serdes_init()
1911 "loopback 0x%x", portn, test_cfg.value)); in nxge_n2_kt_serdes_init()
1912 if ((status = nxge_mdio_write(nxgep, portn, in nxge_n2_kt_serdes_init()
1923 portn, nxgep->mac.portmode)); in nxge_n2_kt_serdes_init()
1929 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1939 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1943 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1949 "chan %d tx_cfg_l 0x%x", portn, chan, tx_cfg_l.value)); in nxge_n2_kt_serdes_init()
1953 "chan %d tx_cfg_h 0x%x", portn, chan, tx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1959 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1964 if ((status = nxge_mdio_write(nxgep, portn, ESR_N2_DEV_ADDR, in nxge_n2_kt_serdes_init()
1971 "chan %d rx_cfg_l 0x%x", portn, chan, rx_cfg_l.value)); in nxge_n2_kt_serdes_init()
1975 "chan %d rx_cfg_h 0x%x", portn, chan, rx_cfg_h.value)); in nxge_n2_kt_serdes_init()
1978 if (portn == 0) { in nxge_n2_kt_serdes_init()
2004 "Serdes/signal for port<%d> not ready", portn)); in nxge_n2_kt_serdes_init()
2007 } else if (portn == 1) { in nxge_n2_kt_serdes_init()
2033 "Serdes/signal for port<%d> not ready", portn)); in nxge_n2_kt_serdes_init()
2040 "<== nxge_n2_kt_serdes_init port<%d>", portn)); in nxge_n2_kt_serdes_init()
2046 portn)); in nxge_n2_kt_serdes_init()
2057 uint8_t portn; in nxge_neptune_10G_serdes_init() local
2068 portn = nxgep->mac.portnum; in nxge_neptune_10G_serdes_init()
2070 if ((portn != 0) && (portn != 1)) in nxge_neptune_10G_serdes_init()
2074 "==> nxge_neptune_10G_serdes_init port<%d>", portn)); in nxge_neptune_10G_serdes_init()
2076 switch (portn) { in nxge_neptune_10G_serdes_init()
2153 if ((status = nxge_mdio_read(nxgep, portn, in nxge_neptune_10G_serdes_init()
2157 if ((status = nxge_mdio_read(nxgep, portn, in nxge_neptune_10G_serdes_init()
2161 if ((status = nxge_mdio_read(nxgep, portn, in nxge_neptune_10G_serdes_init()
2165 if ((status = nxge_mdio_read(nxgep, portn, in nxge_neptune_10G_serdes_init()
2176 if ((status = nxge_mdio_write(nxgep, portn, in nxge_neptune_10G_serdes_init()
2180 if ((status = nxge_mdio_write(nxgep, portn, in nxge_neptune_10G_serdes_init()
2184 if ((status = nxge_mdio_write(nxgep, portn, in nxge_neptune_10G_serdes_init()
2188 if ((status = nxge_mdio_write(nxgep, portn, in nxge_neptune_10G_serdes_init()
2195 if ((status = nxge_mdio_write(nxgep, portn, in nxge_neptune_10G_serdes_init()
2200 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_neptune_10G_serdes_init()
2208 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_neptune_10G_serdes_init()
2214 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_neptune_10G_serdes_init()
2219 if ((status = nxge_mdio_read(nxgep, portn, in nxge_neptune_10G_serdes_init()
2223 if ((status = nxge_mdio_read(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_neptune_10G_serdes_init()
2230 portn, val16l, val16h)); in nxge_neptune_10G_serdes_init()
2233 if (portn == 0) { in nxge_neptune_10G_serdes_init()
2259 "Serdes/signal for port<%d> not ready", portn)); in nxge_neptune_10G_serdes_init()
2262 } else if (portn == 1) { in nxge_neptune_10G_serdes_init()
2288 "Serdes/signal for port<%d> not ready", portn)); in nxge_neptune_10G_serdes_init()
2295 "<== nxge_neptune_10G_serdes_init port<%d>", portn)); in nxge_neptune_10G_serdes_init()
2301 "Failed to initialize Neptune serdes for port<%d>", portn)); in nxge_neptune_10G_serdes_init()
2312 uint8_t portn; in nxge_1G_serdes_init() local
2323 portn = nxgep->mac.portnum; in nxge_1G_serdes_init()
2326 "==> nxge_1G_serdes_init port<%d>", portn)); in nxge_1G_serdes_init()
2330 switch (portn) { in nxge_1G_serdes_init()
2394 if ((status = nxge_mdio_read(nxgep, portn, in nxge_1G_serdes_init()
2399 if ((status = nxge_mdio_read(nxgep, portn, in nxge_1G_serdes_init()
2404 if ((status = nxge_mdio_read(nxgep, portn, in nxge_1G_serdes_init()
2409 if ((status = nxge_mdio_read(nxgep, portn, in nxge_1G_serdes_init()
2422 if ((status = nxge_mdio_write(nxgep, portn, in nxge_1G_serdes_init()
2427 if ((status = nxge_mdio_write(nxgep, portn, in nxge_1G_serdes_init()
2432 if ((status = nxge_mdio_write(nxgep, portn, in nxge_1G_serdes_init()
2437 if ((status = nxge_mdio_write(nxgep, portn, in nxge_1G_serdes_init()
2444 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2448 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2452 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2456 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2462 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2467 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2476 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2483 if ((status = nxge_mdio_write(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2489 if ((status = nxge_mdio_read(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2493 if ((status = nxge_mdio_read(nxgep, portn, ESR_NEPTUNE_DEV_ADDR, in nxge_1G_serdes_init()
2500 "(val16l 0x%x val16h 0x%x)", portn, val16l, val16h)); in nxge_1G_serdes_init()
2509 "val 0x%x", portn, val)); in nxge_1G_serdes_init()
2510 if (portn == 0) { in nxge_1G_serdes_init()
2521 "Serdes/signal for port<%d> not ready", portn)); in nxge_1G_serdes_init()
2524 } else if (portn == 1) { in nxge_1G_serdes_init()
2535 "Serdes/signal for port<%d> not ready", portn)); in nxge_1G_serdes_init()
2543 "<== nxge_1G_serdes_init port<%d>", portn)); in nxge_1G_serdes_init()
2549 portn)); in nxge_1G_serdes_init()
2583 uint8_t portn; in nxge_BCM8704_xcvr_init() local
2595 portn = nxgep->mac.portnum; in nxge_BCM8704_xcvr_init()
2599 portn)); in nxge_BCM8704_xcvr_init()
2623 "failed to reset Transceiver on port<%d>", portn)); in nxge_BCM8704_xcvr_init()
2723 "BCM8704 port<%d> Dev 1 Reg 0xA = 0x%x\n", portn, val)); in nxge_BCM8704_xcvr_init()
2728 "BCM8704 port<%d> Dev 3 Reg 0x20 = 0x%x\n", portn, val)); in nxge_BCM8704_xcvr_init()
2733 "BCM8704 port<%d> Dev 4 Reg 0x18 = 0x%x\n", portn, val)); in nxge_BCM8704_xcvr_init()
2762 " cable on port<%d>\n", portn)); in nxge_BCM8704_xcvr_init()
2766 " on port<%d>\n", portn)); in nxge_BCM8704_xcvr_init()
2772 portn)); in nxge_BCM8704_xcvr_init()
2794 uint8_t portn = nxgep->mac.portnum; in nxge_BCM8706_xcvr_init() local
2798 portn)); in nxge_BCM8706_xcvr_init()
2822 "failed to reset Transceiver on port<%d>", portn)); in nxge_BCM8706_xcvr_init()
2867 portn)); in nxge_BCM8706_xcvr_init()
3596 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_is_nlp2020_phy() local
3599 uint8_t xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_is_nlp2020_phy()
3614 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_get_nlp2020_connector_type() local
3615 uint8_t xcvr_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_get_nlp2020_connector_type()
3779 uint8_t portn = nxgep->mac.portnum; in nxge_10G_xcvr_init() local
3782 portn)); in nxge_10G_xcvr_init()
3837 portn)); in nxge_10G_xcvr_init()
3912 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_tn1010_xcvr_init() local
4058 phy_port_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_tn1010_xcvr_init()
4095 uint8_t portn; in nxge_xcvr_init() local
4100 portn = nxgep->mac.portnum; in nxge_xcvr_init()
4102 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "==> nxge_xcvr_init: port<%d>", portn)); in nxge_xcvr_init()
4137 portn)); in nxge_xcvr_init()
4143 portn)); in nxge_xcvr_init()
4172 uint8_t portn; in nxge_tx_mac_init() local
4178 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_tx_mac_init()
4184 portn)); in nxge_tx_mac_init()
4195 portn)); in nxge_tx_mac_init()
4197 SET_MAC_ATTR2(handle, ap, portn, in nxge_tx_mac_init()
4206 if ((rs = npi_xmac_tx_iconfig(handle, INIT, portn, in nxge_tx_mac_init()
4215 SET_MAC_ATTR1(handle, ap, portn, XMAC_10G_PORT_IPG, in nxge_tx_mac_init()
4221 SET_MAC_ATTR1(handle, ap, portn, XMAC_PORT_IPG, in nxge_tx_mac_init()
4227 if ((rs = npi_xmac_tx_config(handle, INIT, portn, in nxge_tx_mac_init()
4235 if ((rs = npi_xmac_zap_tx_counters(handle, portn)) in nxge_tx_mac_init()
4240 if ((rs = npi_bmac_tx_iconfig(handle, INIT, portn, in nxge_tx_mac_init()
4245 SET_MAC_ATTR1(handle, ap, portn, BMAC_PORT_CTRL_TYPE, 0x8808, in nxge_tx_mac_init()
4251 SET_MAC_ATTR1(handle, ap, portn, BMAC_PORT_PA_SIZE, 0x7, rs); in nxge_tx_mac_init()
4256 if ((rs = npi_bmac_tx_config(handle, INIT, portn, in nxge_tx_mac_init()
4263 portn)); in nxge_tx_mac_init()
4268 "nxge_tx_mac_init: failed to initialize port<%d> TXMAC", portn)); in nxge_tx_mac_init()
4279 uint8_t portn; in nxge_rx_mac_mcast_hash_table() local
4283 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_rx_mac_mcast_hash_table()
4298 if ((rs = npi_mac_hashtab_entry(handle, OP_SET, portn, i, in nxge_rx_mac_mcast_hash_table()
4314 uint8_t portn; in nxge_rx_mac_init() local
4322 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_rx_mac_init()
4325 portn)); in nxge_rx_mac_init()
4333 SET_MAC_ATTR3(handle, ap, portn, MAC_PORT_ADDR, in nxge_rx_mac_init()
4337 SET_MAC_ATTR3(handle, ap, portn, MAC_PORT_ADDR_FILTER, 0, 0, 0, rs); in nxge_rx_mac_init()
4340 SET_MAC_ATTR2(handle, ap, portn, MAC_PORT_ADDR_FILTER_MASK, 0, 0, rs); in nxge_rx_mac_init()
4349 if ((rs = npi_xmac_rx_iconfig(handle, INIT, portn, in nxge_rx_mac_init()
4368 portn, xconfig)) != NPI_SUCCESS) in nxge_rx_mac_init()
4376 if ((rs = npi_xmac_zap_rx_counters(handle, portn)) in nxge_rx_mac_init()
4380 if (npi_bmac_rx_iconfig(nxgep->npi_handle, INIT, portn, in nxge_rx_mac_init()
4398 portn, bconfig)) != NPI_SUCCESS) in nxge_rx_mac_init()
4406 portn, 0)) != NPI_SUCCESS) in nxge_rx_mac_init()
4411 portn)); in nxge_rx_mac_init()
4417 "nxge_rx_mac_init: Failed to Initialize port<%d> RxMAC", portn)); in nxge_rx_mac_init()
4508 uint8_t portn; in nxge_rx_mac_enable() local
4517 portn = nxgep->mac.portnum; in nxge_rx_mac_enable()
4520 portn)); in nxge_rx_mac_enable()
4526 if ((rs = npi_xmac_rx_config(handle, ENABLE, portn, in nxge_rx_mac_enable()
4530 if ((rs = npi_bmac_rx_config(handle, ENABLE, portn, in nxge_rx_mac_enable()
4536 "<== nxge_rx_mac_enable: port<%d>", portn)); in nxge_rx_mac_enable()
4541 "nxgep_rx_mac_enable: Failed to enable port<%d> RxMAC", portn)); in nxge_rx_mac_enable()
4555 uint8_t portn; in nxge_rx_mac_disable() local
4563 portn = nxgep->mac.portnum; in nxge_rx_mac_disable()
4566 portn)); in nxge_rx_mac_disable()
4569 if ((rs = npi_xmac_rx_config(handle, DISABLE, portn, in nxge_rx_mac_disable()
4573 if ((rs = npi_bmac_rx_config(handle, DISABLE, portn, in nxge_rx_mac_disable()
4579 portn)); in nxge_rx_mac_disable()
4583 "nxgep_rx_mac_disable: Failed to disable port<%d> RxMAC", portn)); in nxge_rx_mac_disable()
4594 uint8_t portn; in nxge_tx_mac_reset() local
4598 portn = nxgep->mac.portnum; in nxge_tx_mac_reset()
4601 portn)); in nxge_tx_mac_reset()
4604 if ((rs = npi_xmac_reset(handle, portn, XTX_MAC_RESET_ALL)) in nxge_tx_mac_reset()
4608 if ((rs = npi_bmac_reset(handle, portn, TX_MAC_RESET)) in nxge_tx_mac_reset()
4614 portn)); in nxge_tx_mac_reset()
4619 "nxge_tx_mac_reset: Failed to Reset TxMAC port<%d>", portn)); in nxge_tx_mac_reset()
4630 uint8_t portn; in nxge_rx_mac_reset() local
4634 portn = nxgep->mac.portnum; in nxge_rx_mac_reset()
4637 portn)); in nxge_rx_mac_reset()
4640 if ((rs = npi_xmac_reset(handle, portn, XRX_MAC_RESET_ALL)) in nxge_rx_mac_reset()
4644 if ((rs = npi_bmac_reset(handle, portn, RX_MAC_RESET)) in nxge_rx_mac_reset()
4650 portn)); in nxge_rx_mac_reset()
4655 "nxge_rx_mac_reset: Failed to Reset RxMAC port<%d>", portn)); in nxge_rx_mac_reset()
4665 uint8_t portn = nxgep->mac.portnum; in nxge_10G_link_intr_start() local
4667 rs = npi_xmac_xpcs_link_intr_enable(nxgep->npi_handle, portn); in nxge_10G_link_intr_start()
4681 uint8_t portn = nxgep->mac.portnum; in nxge_10G_link_intr_stop() local
4683 rs = npi_xmac_xpcs_link_intr_disable(nxgep->npi_handle, portn); in nxge_10G_link_intr_stop()
4697 uint8_t portn = nxgep->mac.portnum; in nxge_1G_fiber_link_intr_start() local
4699 rs = npi_mac_pcs_link_intr_enable(nxgep->npi_handle, portn); in nxge_1G_fiber_link_intr_start()
4712 uint8_t portn = nxgep->mac.portnum; in nxge_1G_fiber_link_intr_stop() local
4714 rs = npi_mac_pcs_link_intr_disable(nxgep->npi_handle, portn); in nxge_1G_fiber_link_intr_stop()
4728 uint8_t portn = nxgep->mac.portnum; in nxge_1G_copper_link_intr_start() local
4730 rs = npi_mac_mif_link_intr_enable(nxgep->npi_handle, portn, in nxge_1G_copper_link_intr_start()
4745 uint8_t portn = nxgep->mac.portnum; in nxge_1G_copper_link_intr_stop() local
4747 rs = npi_mac_mif_link_intr_disable(nxgep->npi_handle, portn); in nxge_1G_copper_link_intr_stop()
4760 uint8_t portn; in nxge_link_intr() local
4763 portn = nxgep->mac.portnum; in nxge_link_intr()
4765 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "==> nxge_link_intr: port<%d>", portn)); in nxge_link_intr()
4776 NXGE_DEBUG_MSG((nxgep, MAC_CTL, "<== nxge_link_intr: port<%d>", portn)); in nxge_link_intr()
4781 "nxge_link_intr: Failed to set port<%d> mif intr mode", portn)); in nxge_link_intr()
5703 nxge_pcs_check(p_nxge_t nxgep, uint8_t portn, nxge_link_state_t *link_up) in nxge_pcs_check() argument
5713 (void) npi_mac_get_link_status(nxgep->npi_handle, portn, &linkup); in nxge_pcs_check()
5922 uint8_t portn; in nxge_check_mii_link() local
5931 portn = nxgep->mac.portnum; in nxge_check_mii_link()
5934 portn)); in nxge_check_mii_link()
5956 portn, bmsr_data.value, nxgep->bmsr.value)); in nxge_check_mii_link()
6000 portn, nxgep->bmsr.value, bmsr_data.value)); in nxge_check_mii_link()
6008 portn, bmsr_data.value, bmsr_ints.value)); in nxge_check_mii_link()
6024 "==> nxge_check_mii_link port<%d> (SERDES)", portn)); in nxge_check_mii_link()
6025 nxge_pcs_check(nxgep, portn, &link_up); in nxge_check_mii_link()
6039 portn)); in nxge_check_mii_link()
6047 "nxge_check_mii_link: Failed to check link port<%d>", portn)); in nxge_check_mii_link()
6055 uint8_t portn; in nxge_check_10g_link() local
6067 portn = nxgep->mac.portnum; in nxge_check_10g_link()
6072 portn)); in nxge_check_10g_link()
6082 if (nxge_hswap_phy_present(nxgep, portn)) in nxge_check_10g_link()
6197 portn, val, link_up)); in nxge_check_10g_link()
6243 portn)); in nxge_check_10g_link()
6251 portn)); in nxge_check_10g_link()
6654 uint8_t phy_port_addr, portn; in nxge_tn1010_check() local
6659 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_tn1010_check()
6660 phy_port_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_tn1010_check()
6751 uint8_t portn; in nxge_mif_intr() local
6780 uint8_t portn; in nxge_mac_intr() local
6798 portn = nxgep->mac.portnum; in nxge_mac_intr()
6801 "==> nxge_mac_intr: reading mac stats: port<%d>", portn)); in nxge_mac_intr()
6804 rs = npi_xmac_tx_get_istatus(handle, portn, in nxge_mac_intr()
6811 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6823 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6828 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6841 rs = npi_xmac_rx_get_istatus(handle, portn, in nxge_mac_intr()
6850 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6929 rs = npi_xmac_ctl_get_istatus(handle, portn, in nxge_mac_intr()
6942 rs = npi_bmac_tx_get_istatus(handle, portn, in nxge_mac_intr()
6949 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6954 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6967 rs = npi_bmac_rx_get_istatus(handle, portn, in nxge_mac_intr()
6982 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6988 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
6994 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
7004 NXGE_FM_REPORT_ERROR(nxgep, portn, 0, in nxge_mac_intr()
7008 rs = npi_bmac_ctl_get_istatus(handle, portn, in nxge_mac_intr()
7363 nxge_hswap_phy_present(p_nxge_t nxgep, uint8_t portn) in nxge_hswap_phy_present() argument
7373 if (portn == 1) { in nxge_hswap_phy_present()
7380 if (nxge_is_phy_present(nxgep, GOA_CLAUSE45_PORT_ADDR_BASE + portn, in nxge_hswap_phy_present()
7382 nxgep->xcvr_addr = GOA_CLAUSE45_PORT_ADDR_BASE + portn; in nxge_hswap_phy_present()
7389 switch (portn) { in nxge_hswap_phy_present()
8338 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_bcm5464_link_led_off() local
8358 switch (portn) { in nxge_bcm5464_link_led_off()
8447 uint8_t portn; in nxge_mac_set_framesize() local
8453 portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_mac_set_framesize()
8459 portn, in nxge_mac_set_framesize()
8463 SET_MAC_ATTR2(handle, ap, portn, in nxge_mac_set_framesize()
8471 "max/min frame size port %d", portn)); in nxge_mac_set_framesize()
8477 "<== nxge_mac_set_framesize: port<%d>", portn)); in nxge_mac_set_framesize()
8533 uint8_t portn = NXGE_GET_PORT_NUM(nxgep->function_num); in nxge_get_tn1010_speed() local
8541 phy_port_addr = nxgep->nxge_hw_p->xcvr_addr[portn]; in nxge_get_tn1010_speed()