/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NPI_MAC_H
#define _NPI_MAC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <npi.h>
#include <nxge_mac_hw.h>
#include <nxge_mii.h>
typedef struct _npi_mac_addr {
typedef enum npi_mac_attr {
MAC_PORT_MODE = 0,
/* MAC Mode options */
typedef enum npi_mac_mode_e {
MAC_MII_MODE = 0,
typedef enum npi_mac_reset_e {
typedef enum xmac_tx_iconfig_e {
typedef enum xmac_rx_iconfig_e {
typedef enum xmac_ctl_iconfig_e {
typedef enum bmac_tx_iconfig_e {
typedef enum bmac_rx_iconfig_e {
typedef enum bmac_ctl_iconfig_e {
typedef enum xmac_tx_config_e {
typedef enum xmac_rx_config_e {
typedef enum xmac_xif_config_e {
typedef enum bmac_tx_config_e {
typedef enum bmac_rx_config_e {
typedef enum bmac_xif_config_e {
typedef enum xmac_ipg_e {
XGMII_IPG_12_15 = 0,
} xmac_ipg_t;
typedef enum xpcs_reg_e {
} xpcs_reg_t;
/*
* When MIF_REG_RD is called inside a poll loop and if the poll takes
* very long time to complete, then each poll will print a rt_show_reg
* result on the screen and the rtrace "register show" result may
* become too messy to read. The solution is to call MIF_REG_RD_NO_SHOW
* instead of MIF_REG_RD in a polling loop. When COSIM or REG_SHOW is
* not defined, this macro is the same as MIF_REG_RD. When both COSIM
* and REG_SHOW are defined, this macro calls NXGE_REG_RD64_NO_SHOW
* which does not call rt_show_reg.
*/
#else
/* If not COSIM or REG_SHOW, still show */
#endif
}
}
}
}
(npi_attr_t *)&p)) == NPI_SUCCESS) {\
}\
}
(npi_attr_t *)&p)) == NPI_SUCCESS) {\
}\
}
(npi_attr_t *)&p)) == NPI_SUCCESS) {\
}\
}
(npi_attr_t *)&p)) == NPI_SUCCESS) {\
}\
}
/* MAC specific errors */
/* MAC error return macros */
((MAC_BLK_ID << NPI_BLOCK_ID_SHIFT) |\
((MAC_BLK_ID << NPI_BLOCK_ID_SHIFT) |\
((MAC_BLK_ID << NPI_BLOCK_ID_SHIFT) |\
((MAC_BLK_ID << NPI_BLOCK_ID_SHIFT) |\
((MAC_BLK_ID << NPI_BLOCK_ID_SHIFT) |\
/* library functions prototypes */
/* general mac functions */
hostinfo_t *);
uint8_t);
uint8_t);
npi_mac_addr_t *);
npi_attr_t *);
boolean_t *);
boolean_t *);
uint16_t *);
uint16_t);
/* xmac functions */
uint8_t);
/* bmac functions */
uint16_t);
/* MIF common functions */
#ifdef __cplusplus
}
#endif
#endif /* _NPI_MAC_H */