/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <nxge_impl.h>
#include <nxge_mac.h>
#include <npi_espc.h>
#include <nxge_espc.h>
void
struct ether_addr *final_mac)
{
int i, j;
}
}
{
"==> nxge_espc_mac_addr_get, port[%d]", port_num));
if (npi_status != NPI_SUCCESS) {
"nxge_espc_mac_addr_get, port[%d] failed", port_num));
goto exit;
}
"Got MAC Addr: %2x:%2x:%2x:%2x:%2x%:%2x%c \n",
exit:
"status [0x%x]", status));
return (status);
}
{
if (npi_status != NPI_SUCCESS) {
}
"status [0x%x]", status));
return (status);
}
{
if (npi_status != NPI_SUCCESS) {
}
"ports [0x%x]", nports));
"status [0x%x]", status));
return (status);
}
{
port_num));
if (npi_status != NPI_SUCCESS) {
goto exit;
}
switch (phy_type) {
case ESC_PHY_10G_FIBER:
break;
case ESC_PHY_10G_COPPER:
break;
case ESC_PHY_1G_FIBER:
break;
case ESC_PHY_1G_COPPER:
break;
case ESC_PHY_NONE:
status = NXGE_ERROR;
"No phy type set"));
break;
default:
status = NXGE_ERROR;
"Unknown phy type [%d]", phy_type));
break;
}
exit:
"status [0x%x]", status));
return (status);
}
{
if (npi_status != NPI_SUCCESS) {
}
"status [0x%x]", status));
return (status);
}
void
{
return;
}
(void) npi_espc_pio_enable(handle);
(void) npi_espc_pio_disable(handle);
if (status != NPI_SUCCESS)
return;
return;
/* Determine the platform type */
strlen(NXGE_QGC_LP_BM_STR)) == 0) ||
strlen(NXGE_QGC_PEM_BM_STR)) == 0)) {
strlen(NXGE_2XGF_PEM_BM_STR)) == 0)) {
}
/* If Alonso platform, replace "mif" for the last 2 ports phy-type */
}
/* If ARTM card, replace "mif" for the last 2 ports phy-type */
"Replaced phy type as mif"));
}
}
static void
{
int i, j;
char *ver_num_w;
char *ver_num_f;
int ver_num_w_len = 0;
int ver_num_f_len = 0;
int ver_w = 0;
int ver_f = 0;
ver_num_str[0] = '\0';
for (i = 0; i < NXGE_VPD_VER_LEN; i++) {
if ((i + fcode_str_len + NXGE_FCODE_VER_STR_LEN) >
break;
for (j = 0; j < fcode_str_len; j++, i++) {
break;
}
if (j < fcode_str_len)
continue;
/* found the Fcode version string */
for (j = 0; j < NXGE_FCODE_VER_STR_LEN; j++, i++) {
if (ver_num_str[j] == ' ')
break;
}
if (j < NXGE_FCODE_VER_STR_LEN)
ver_num_str[j] = '\0';
break;
}
}
for (i = 0; i < strlen(ver_num_str); i++) {
if (ver_num_str[i] == '.') {
ver_num_w_len = i;
break;
}
}
for (i = 0; i < ver_num_w_len; i++) {
}
for (i = 0; i < ver_num_f_len; i++) {
}
if ((ver_w > NXGE_VPD_VALID_VER_W) ||
}