Lines Matching defs:nxgep

31 static void nxge_check_vpd_version(p_nxge_t nxgep);
57 nxge_espc_mac_addrs_get(p_nxge_t nxgep)
61 uint8_t port_num = nxgep->mac.portnum;
62 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep);
65 NXGE_DEBUG_MSG((nxgep, MAC_CTL,
71 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL,
76 nxge_espc_get_next_mac_addr(mac_addr, port_num, &nxgep->factaddr);
77 NXGE_DEBUG_MSG((nxgep, CFG_CTL,
83 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "<== nxge_espc_mac_addr_get, "
90 nxge_espc_num_macs_get(p_nxge_t nxgep, uint8_t *nmacs)
94 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep);
95 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "==> nxge_espc_num_macs_get"));
102 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "<== nxge_espc_num_macs_get, "
109 nxge_espc_num_ports_get(p_nxge_t nxgep)
113 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep);
115 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "==> nxge_espc_num_ports_get"));
121 nxgep->nports = nports;
122 NXGE_DEBUG_MSG((nxgep, CFG_CTL, " nxge_espc_num_ports_get "
125 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "<== nxge_espc_num_ports_get, "
132 nxge_espc_phy_type_get(p_nxge_t nxgep)
136 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep);
137 uint8_t port_num = nxgep->mac.portnum;
140 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "==> nxge_espc_phy_type_get, port[%d]",
151 nxgep->mac.portmode = PORT_10G_FIBER;
152 nxgep->statsp->mac_stats.xcvr_inuse = XPCS_XCVR;
155 nxgep->mac.portmode = PORT_10G_COPPER;
156 nxgep->statsp->mac_stats.xcvr_inuse = XPCS_XCVR;
159 nxgep->mac.portmode = PORT_1G_FIBER;
160 nxgep->statsp->mac_stats.xcvr_inuse = PCS_XCVR;
163 nxgep->mac.portmode = PORT_1G_COPPER;
164 nxgep->statsp->mac_stats.xcvr_inuse = INT_MII_XCVR;
168 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_espc_phy_type_get:"
173 NXGE_ERROR_MSG((nxgep, NXGE_ERR_CTL, "nxge_espc_phy_type_get: "
180 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "<== nxge_espc_phy_type_get, "
187 nxge_espc_max_frame_sz_get(p_nxge_t nxgep)
191 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep);
193 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "==> nxge_espc_max_frame_sz_get"));
195 npi_status = npi_espc_max_frame_get(handle, &nxgep->mac.maxframesize);
200 NXGE_DEBUG_MSG((nxgep, CFG_CTL, " nxge_espc_max_frame_sz_get, "
207 nxge_vpd_info_get(p_nxge_t nxgep)
210 npi_handle_t handle = NXGE_DEV_NPI_HANDLE(nxgep);
212 if ((nxgep->platform_type == P_NEPTUNE_NIU) ||
213 (nxgep->platform_type == P_NEPTUNE_MARAMBA_P0) ||
214 (nxgep->platform_type == P_NEPTUNE_MARAMBA_P1) ||
215 (nxgep->platform_type == P_NEPTUNE_ROCK)) {
216 nxgep->vpd_info.present = B_FALSE;
220 NXGE_DEBUG_MSG((nxgep, CFG_CTL, "nxge_vpd_info_get: "
221 "nxgep->platform_type[%d]...reading vpd", nxgep->platform_type));
223 nxgep->vpd_info.present = B_TRUE;
224 nxgep->vpd_info.ver_valid = B_FALSE;
226 MUTEX_ENTER(&nxgep->nxge_hw_p->nxge_cfg_lock);
228 status = npi_espc_vpd_info_get(handle, &nxgep->vpd_info,
231 MUTEX_EXIT(&nxgep->nxge_hw_p->nxge_cfg_lock);
236 nxge_check_vpd_version(nxgep);
237 if (!nxgep->vpd_info.ver_valid)
241 if ((strncmp(nxgep->vpd_info.bd_model, NXGE_QGC_LP_BM_STR,
243 (strncmp(nxgep->vpd_info.bd_model, NXGE_QGC_PEM_BM_STR,
245 nxgep->platform_type = P_NEPTUNE_ATLAS_4PORT;
246 } else if ((strncmp(nxgep->vpd_info.bd_model,
248 (strncmp(nxgep->vpd_info.bd_model, NXGE_2XGF_PEM_BM_STR,
250 nxgep->platform_type = P_NEPTUNE_ATLAS_2PORT;
251 } else if (strncmp(nxgep->vpd_info.bd_model,
253 nxgep->platform_type = P_NEPTUNE_ALONSO;
254 } else if (strncmp(nxgep->vpd_info.bd_model,
256 nxgep->hot_swappable_phy = B_TRUE;
257 nxgep->platform_type = P_NEPTUNE_GENERIC;
258 nxgep->niu_type = NEPTUNE_2_10GF;
262 if ((nxgep->platform_type == P_NEPTUNE_ALONSO) &&
263 ((nxgep->function_num == 2) || (nxgep->function_num == 3))) {
264 (void) strcpy(nxgep->vpd_info.phy_type, "mif");
268 if ((strncmp(nxgep->vpd_info.bd_model,
270 ((nxgep->function_num == 2) || (nxgep->function_num == 3))) {
271 NXGE_DEBUG_MSG((nxgep, NXGE_ERR_CTL,
273 (void) strcpy(nxgep->vpd_info.phy_type, "mif");
278 nxge_check_vpd_version(p_nxge_t nxgep)
291 nxgep->vpd_info.ver_valid = B_FALSE;
295 if (nxgep->vpd_info.ver[i] == fcode_str[0]) {
300 if (nxgep->vpd_info.ver[i] != fcode_str[j])
308 ver_num_str[j] = nxgep->vpd_info.ver[i];
338 nxgep->vpd_info.ver_valid = B_TRUE;