/*
* 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
* 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 (c) 2004-2012 Emulex. All rights reserved.
* Use is subject to license terms.
*/
#include <emlxs.h>
/* Required for EMLXS_CONTEXT in EMLXS_MSGF calls */
{MBX_SUCCESS, "SUCCESS"},
{MBX_FAILURE, "FAILURE"},
{MBXERR_NUM_IOCBS, "NUM_IOCBS"},
{MBXERR_IOCBS_EXCEEDED, "IOCBS_EXCEEDED"},
{MBXERR_BAD_RING_NUMBER, "BAD_RING_NUMBER"},
{MBXERR_MASK_ENTRIES_RANGE, "MASK_ENTRIES_RANGE"},
{MBXERR_MASKS_EXCEEDED, "MASKS_EXCEEDED"},
{MBXERR_BAD_PROFILE, "BAD_PROFILE"},
{MBXERR_BAD_DEF_CLASS, "BAD_DEF_CLASS"},
{MBXERR_BAD_MAX_RESPONDER, "BAD_MAX_RESPONDER"},
{MBXERR_BAD_MAX_ORIGINATOR, "BAD_MAX_ORIGINATOR"},
{MBXERR_RPI_REGISTERED, "RPI_REGISTERED"},
{MBXERR_RPI_FULL, "RPI_FULL"},
{MBXERR_NO_RESOURCES, "NO_RESOURCES"},
{MBXERR_BAD_RCV_LENGTH, "BAD_RCV_LENGTH"},
{MBXERR_DMA_ERROR, "DMA_ERROR"},
{MBXERR_NOT_SUPPORTED, "NOT_SUPPORTED"},
{MBXERR_UNSUPPORTED_FEATURE, "UNSUPPORTED_FEATURE"},
{MBXERR_UNKNOWN_COMMAND, "UNKNOWN_COMMAND"},
{MBXERR_BAD_IP_BIT, "BAD_IP_BIT"},
{MBXERR_BAD_PCB_ALIGN, "BAD_PCB_ALIGN"},
{MBXERR_BAD_HBQ_ID, "BAD_HBQ_ID"},
{MBXERR_BAD_HBQ_STATE, "BAD_HBQ_STATE"},
{MBXERR_BAD_HBQ_MASK_NUM, "BAD_HBQ_MASK_NUM"},
{MBXERR_BAD_HBQ_MASK_SUBSET, "BAD_HBQ_MASK_SUBSET"},
{MBXERR_HBQ_CREATE_FAIL, "HBQ_CREATE_FAIL"},
{MBXERR_HBQ_EXISTING, "HBQ_EXISTING"},
{MBXERR_HBQ_RSPRING_FULL, "HBQ_RSPRING_FULL"},
{MBXERR_HBQ_DUP_MASK, "HBQ_DUP_MASK"},
{MBXERR_HBQ_INVAL_GET_PTR, "HBQ_INVAL_GET_PTR"},
{MBXERR_BAD_HBQ_SIZE, "BAD_HBQ_SIZE"},
{MBXERR_BAD_HBQ_ORDER, "BAD_HBQ_ORDER"},
{MBXERR_INVALID_ID, "INVALID_ID"},
{MBXERR_INVALID_VFI, "INVALID_VFI"},
{MBXERR_FLASH_WRITE_FAILED, "FLASH_WRITE_FAILED"},
{MBXERR_INVALID_LINKSPEED, "INVALID_LINKSPEED"},
{MBXERR_BAD_REDIRECT, "BAD_REDIRECT"},
{MBXERR_RING_ALREADY_CONFIG, "RING_ALREADY_CONFIG"},
{MBXERR_RING_INACTIVE, "RING_INACTIVE"},
{MBXERR_RPI_INACTIVE, "RPI_INACTIVE"},
{MBXERR_NO_ACTIVE_XRI, "NO_ACTIVE_XRI"},
{MBXERR_XRI_NOT_ACTIVE, "XRI_NOT_ACTIVE"},
{MBXERR_RPI_INUSE, "RPI_INUSE"},
{MBXERR_NO_LINK_ATTENTION, "NO_LINK_ATTENTION"},
{MBXERR_INVALID_SLI_MODE, "INVALID_SLI_MODE"},
{MBXERR_INVALID_HOST_PTR, "INVALID_HOST_PTR"},
{MBXERR_CANT_CFG_SLI_MODE, "CANT_CFG_SLI_MODE"},
{MBXERR_BAD_OVERLAY, "BAD_OVERLAY"},
{MBXERR_INVALID_FEAT_REQ, "INVALID_FEAT_REQ"},
{MBXERR_CONFIG_CANT_COMPLETE, "CONFIG_CANT_COMPLETE"},
{MBXERR_DID_ALREADY_REGISTERED, "DID_ALREADY_REGISTERED"},
{MBXERR_DID_INCONSISTENT, "DID_INCONSISTENT"},
{MBXERR_VPI_TOO_LARGE, "VPI_TOO_LARGE"},
{MBXERR_STILL_ASSOCIATED, "STILL_ASSOCIATED"},
{MBXERR_INVALID_VF_STATE, "INVALID_VF_STATE"},
{MBXERR_VFI_ALREADY_REGISTERED, "VFI_ALREADY_REGISTERED"},
{MBXERR_VFI_TOO_LARGE, "VFI_TOO_LARGE"},
{MBXERR_LOAD_FW_FAILED, "LOAD_FW_FAILED"},
{MBXERR_FIND_FW_FAILED, "FIND_FW_FAILED"},
};
{MBX_SHUTDOWN, "SHUTDOWN"},
{MBX_LOAD_SM, "LOAD_SM"},
{MBX_READ_NV, "READ_NV"},
{MBX_WRITE_NV, "WRITE_NV"},
{MBX_RUN_BIU_DIAG, "RUN_BIU_DIAG"},
{MBX_INIT_LINK, "INIT_LINK"},
{MBX_DOWN_LINK, "DOWN_LINK"},
{MBX_CONFIG_LINK, "CONFIG_LINK"},
{MBX_PART_SLIM, "PART_SLIM"},
{MBX_CONFIG_RING, "CONFIG_RING"},
{MBX_RESET_RING, "RESET_RING"},
{MBX_READ_CONFIG, "READ_CONFIG"},
{MBX_READ_RCONFIG, "READ_RCONFIG"},
{MBX_READ_SPARM, "READ_SPARM"},
{MBX_READ_STATUS, "READ_STATUS"},
{MBX_READ_RPI, "READ_RPI"},
{MBX_READ_XRI, "READ_XRI"},
{MBX_READ_REV, "READ_REV"},
{MBX_READ_LNK_STAT, "READ_LNK_STAT"},
{MBX_REG_LOGIN, "REG_LOGIN"},
{MBX_UNREG_LOGIN, "UNREG_RPI"},
{MBX_READ_LA, "READ_LA"},
{MBX_CLEAR_LA, "CLEAR_LA"},
{MBX_DUMP_MEMORY, "DUMP_MEMORY"},
{MBX_DUMP_CONTEXT, "DUMP_CONTEXT"},
{MBX_RUN_DIAGS, "RUN_DIAGS"},
{MBX_RESTART, "RESTART"},
{MBX_UPDATE_CFG, "UPDATE_CFG"},
{MBX_DOWN_LOAD, "DOWN_LOAD"},
{MBX_DEL_LD_ENTRY, "DEL_LD_ENTRY"},
{MBX_RUN_PROGRAM, "RUN_PROGRAM"},
{MBX_SET_MASK, "SET_MASK"},
{MBX_SET_VARIABLE, "SET_VARIABLE"},
{MBX_UNREG_D_ID, "UNREG_D_ID"},
{MBX_KILL_BOARD, "KILL_BOARD"},
{MBX_CONFIG_FARP, "CONFIG_FARP"},
{MBX_LOAD_AREA, "LOAD_AREA"},
{MBX_RUN_BIU_DIAG64, "RUN_BIU_DIAG64"},
{MBX_CONFIG_PORT, "CONFIG_PORT"},
{MBX_READ_SPARM64, "READ_SPARM64"},
{MBX_READ_RPI64, "READ_RPI64"},
{MBX_CONFIG_MSI, "CONFIG_MSI"},
{MBX_CONFIG_MSIX, "CONFIG_MSIX"},
{MBX_REG_LOGIN64, "REG_RPI"},
{MBX_READ_LA64, "READ_LA64"},
{MBX_FLASH_WR_ULA, "FLASH_WR_ULA"},
{MBX_SET_DEBUG, "SET_DEBUG"},
{MBX_GET_DEBUG, "GET_DEBUG"},
{MBX_LOAD_EXP_ROM, "LOAD_EXP_ROM"},
{MBX_BEACON, "BEACON"},
{MBX_ASYNC_EVENT, "ASYNC_EVENT"},
{MBX_HEARTBEAT, "HEARTBEAT"},
{MBX_READ_EVENT_LOG_STATUS, "READ_EVENT_LOG_STATUS"},
{MBX_READ_EVENT_LOG, "READ_EVENT_LOG"},
{MBX_WRITE_EVENT_LOG, "WRITE_EVENT_LOG"},
{MBX_NV_LOG, "NV_LOG"},
{MBX_PORT_CAPABILITIES, "PORT_CAPABILITIES"},
{MBX_IOV_CONTROL, "IOV_CONTROL"},
{MBX_IOV_MBX, "IOV_MBX"},
{MBX_SLI_CONFIG, "SLI_CONFIG"},
{MBX_REQUEST_FEATURES, "REQUEST_FEATURES"},
{MBX_RESUME_RPI, "RESUME_RPI"},
{MBX_REG_VFI, "REG_VFI"},
{MBX_REG_FCFI, "REG_FCFI"},
{MBX_UNREG_VFI, "UNREG_VFI"},
{MBX_UNREG_FCFI, "UNREG_FCFI"},
{MBX_INIT_VFI, "INIT_VFI"},
{MBX_INIT_VPI, "INIT_VPI"},
{MBX_WRITE_VPARMS, "WRITE_VPARMS"},
{MBX_ACCESS_VDATA, "ACCESS_VDATA"}
}; /* emlxs_mb_cmd_table */
}; /* emlxs_request_feature_table */
extern char *
{
uint32_t i;
for (i = 0; i < count; i++) {
return (emlxs_mb_status_table[i].string);
}
}
return (buffer);
} /* emlxs_mb_xlate_status() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
/*
* Signifies an embedded command
*/
return;
} /* emlxs_mb_resetport() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
return;
} /* emlxs_mb_request_features() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
/*
* Signifies an embedded command
*/
sizeof (IOCTL_COMMON_NOP);
return;
} /* emlxs_mb_noop() */
/* SLI4 */
/*ARGSUSED*/
extern int
{
return (1);
}
/*
* Save address for completion
* Signifies a non-embedded command
*/
return (0);
} /* emlxs_mbext_noop() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
/*
* Signifies an embedded command
*/
sizeof (IOCTL_COMMON_EQ_CREATE) + IOCTL_HEADER_SZ;
sizeof (IOCTL_COMMON_EQ_CREATE);
/* 1024 * 4 bytes = 4K */
return;
} /* emlxs_mb_eq_create() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
uint32_t i;
/*
* Signifies an embedded command
*/
case 0:
sizeof (IOCTL_COMMON_CQ_CREATE) + IOCTL_HEADER_SZ;
sizeof (IOCTL_COMMON_CQ_CREATE);
qp = (IOCTL_COMMON_CQ_CREATE *)
/* 256 * 16 bytes = 4K */
break;
case 2:
default:
sizeof (IOCTL_COMMON_CQ_CREATE_V2) + IOCTL_HEADER_SZ;
sizeof (IOCTL_COMMON_CQ_CREATE_V2);
qp2 = (IOCTL_COMMON_CQ_CREATE_V2 *)
for (i = 0; i < EMLXS_NUM_CQ_PAGES_V2; i++) {
addr += 4096;
}
break;
}
return;
} /* emlxs_mb_cq_create() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
} else {
}
return;
} /* emlxs_mb_get_port_name() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
return;
} /* emlxs_mb_get_sli4_params() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
sizeof (IOCTL_COMMON_EXTENTS);
return;
} /* emlxs_mb_get_extents_info() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
sizeof (IOCTL_COMMON_EXTENTS);
return;
} /* emlxs_mb_get_extents() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
sizeof (IOCTL_COMMON_EXTENTS);
return;
} /* emlxs_mb_alloc_extents() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
sizeof (IOCTL_COMMON_EXTENTS);
return;
} /* emlxs_mb_dealloc_extents() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
int i;
/*
* Signifies an embedded command
*/
case 0:
sizeof (IOCTL_FCOE_WQ_CREATE) + IOCTL_HEADER_SZ;
sizeof (IOCTL_FCOE_WQ_CREATE);
for (i = 0; i < EMLXS_NUM_WQ_PAGES; i++) {
addr += 4096;
}
break;
case 1:
default:
sizeof (IOCTL_FCOE_WQ_CREATE_V1) + IOCTL_HEADER_SZ;
sizeof (IOCTL_FCOE_WQ_CREATE_V1);
for (i = 0; i < EMLXS_NUM_WQ_PAGES; i++) {
addr += 4096;
}
break;
}
return;
} /* emlxs_mb_wq_create() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
/*
* Signifies an embedded command
*/
case 0:
sizeof (IOCTL_FCOE_RQ_CREATE) + IOCTL_HEADER_SZ;
sizeof (IOCTL_FCOE_RQ_CREATE);
break;
case 1:
default:
sizeof (IOCTL_FCOE_RQ_CREATE_V1) + IOCTL_HEADER_SZ;
sizeof (IOCTL_FCOE_RQ_CREATE_V1);
break;
}
return;
} /* emlxs_mb_rq_create() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
/*
* Signifies an embedded command
*/
sizeof (IOCTL_COMMON_MQ_CREATE) + IOCTL_HEADER_SZ;
sizeof (IOCTL_COMMON_MQ_CREATE);
return;
} /* emlxs_mb_mq_create() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
/*
* Signifies an embedded command
*/
case 0:
sizeof (IOCTL_COMMON_MQ_CREATE_EXT) + IOCTL_HEADER_SZ;
sizeof (IOCTL_COMMON_MQ_CREATE_EXT);
qp = (IOCTL_COMMON_MQ_CREATE_EXT *)
break;
case 1:
default:
sizeof (IOCTL_COMMON_MQ_CREATE) + IOCTL_HEADER_SZ;
sizeof (IOCTL_COMMON_MQ_CREATE_EXT_V1);
break;
}
return;
} /* emlxs_mb_mq_create_ext() */
/*ARGSUSED*/
extern void
{
return;
} /* emlxs_mb_async_event() */
/*ARGSUSED*/
extern void
{
return;
} /* emlxs_mb_heartbeat() */
#ifdef MSI_SUPPORT
/*ARGSUSED*/
extern void
{
uint16_t i;
/* Set the default message id to zero */
for (i = 1; i < intr_count; i++) {
#ifdef EMLXS_BIG_ENDIAN
}
}
}
}
}
}
}
#endif /* EMLXS_BIG_ENDIAN */
#ifdef EMLXS_LITTLE_ENDIAN
/* Accounts for half word swap of LE architecture */
}
}
}
}
}
}
}
#endif /* EMLXS_LITTLE_ENDIAN */
}
return;
} /* emlxs_mb_config_msi() */
/*ARGSUSED*/
extern void
{
uint8_t i;
/* Set the default message id to zero */
for (i = 1; i < intr_count; i++) {
#ifdef EMLXS_BIG_ENDIAN
}
}
}
}
}
}
}
#endif /* EMLXS_BIG_ENDIAN */
#ifdef EMLXS_LITTLE_ENDIAN
/* Accounts for word swap of LE architecture */
}
}
}
}
}
}
}
#endif /* EMLXS_LITTLE_ENDIAN */
}
return;
} /* emlxs_mb_config_msix() */
#endif /* MSI_SUPPORT */
/*ARGSUSED*/
extern void
{
return;
} /* emlxs_mb_reset_ring() */
/*ARGSUSED*/
extern void
{
/* Clear the local dump_region */
} else {
/* limited by mailbox size */
}
} /* emlxs_mb_dump_vpd() */
/* SLI4 */
/*ARGSUSED*/
extern void
{
return;
}
/* Clear the local dump_region */
} /* emlxs_mb_dump_fcoe() */
/*ARGSUSED*/
extern void
{
/* Clear the local dump_region */
} else {
}
return;
} /* emlxs_mb_dump() */
/*
* emlxs_mb_read_nv Issue a READ NVPARAM mailbox command
*/
/*ARGSUSED*/
extern void
{
} /* emlxs_mb_read_nv() */
/*
* emlxs_mb_read_rev Issue a READ REV mailbox command
*/
/*ARGSUSED*/
extern void
{
} else {
if (v3) {
}
}
} /* emlxs_mb_read_rev() */
/*
* emlxs_mb_run_biu_diag Issue a RUN_BIU_DIAG mailbox command
*/
/*ARGSUSED*/
extern uint32_t
{
return (0);
} /* emlxs_mb_run_biu_diag() */
/* This should only be called with active MBX_NOWAIT mailboxes */
void
{
int rc;
if (!mbox) {
return;
}
} else {
}
hba->mbox_queue_flag = 0;
}
return;
} /* emlxs_mb_retry() */
/* SLI3 */
static uint32_t
{
int i;
if (control == 0) {
}
return (1);
}
/* Enable Link Attention interrupts */
#ifdef FMA_SUPPORT
/* Access handle validation */
#endif /* FMA_SUPPORT */
}
return (0);
}
if (mp) {
} else {
}
"tag=%d -> %d ALPA=%x",
} else {
"tag=%d -> %d ALPA=%x",
}
} else {
}
/* Make sure link is declared down */
}
/* If link not already up then declare it up now */
#ifdef MENLO_SUPPORT
la.granted_AL_PA = 0;
}
#endif /* MENLO_SUPPORT */
/* Save the linkspeed */
/* Check for old model adapters that only */
/* supported 1Gb */
}
} else {
}
if (i == 0) {
} else {
uint32_t j;
/* Check number of devices in map */
}
"alpa_map: %d device(s): "
"%02x %02x %02x %02x %02x %02x "
"alpa_map: "
"%02x %02x %02x %02x %02x "
"%02x %02x %02x",
alpa_map[j],
alpa_map[j + 1],
alpa_map[j + 2],
alpa_map[j + 3],
alpa_map[j + 4],
alpa_map[j + 5],
alpa_map[j + 6],
alpa_map[j + 7]);
}
}
}
#ifdef MENLO_SUPPORT
/* Check if Menlo maintenance mode is enabled */
"Maintenance Mode enabled.");
} else {
"Maintenance Mode disabled.");
}
/* Check FCoE attention bit */
0, 0);
}
}
#endif /* MENLO_SUPPORT */
MEM_MBOX))) {
/* This should turn on DELAYED ABTS for */
/* ELS timeouts */
}
MEM_MBOX))) {
/* If link not already down then */
/* declare it down now */
} else {
(void *)mbox);
}
}
MEM_MBOX))) {
}
/* Declare the linkup here */
}
/* If link not already down then declare it down now */
/* Make sure link is declared down */
}
/* Enable Link attention interrupt */
#ifdef FMA_SUPPORT
/* Access handle validation */
#endif /* FMA_SUPPORT */
}
return (0);
} /* emlxs_read_la_mbcmpl() */
extern uint32_t
{
return (1);
}
/*
* save address for completion
*/
return (0);
} /* emlxs_mb_read_la() */
/* SLI3 */
static uint32_t
{
int i, rc;
la_enable = 1;
/* Get a buffer which will be used for */
/* mailbox commands */
MEM_MBOX))) {
/* Get link attention message */
(rc != MBX_SUCCESS)) {
}
la_enable = 0;
} else {
(void *)mbox);
}
}
}
if (la_enable) {
/* Enable Link Attention interrupts */
#ifdef FMA_SUPPORT
/* Access handle validation */
#endif /* FMA_SUPPORT */
}
} else {
/* Disable Link Attention interrupts */
#ifdef FMA_SUPPORT
/* Access handle validation */
#endif /* FMA_SUPPORT */
}
}
return (0);
}
/* Enable on Link Attention interrupts */
#ifdef FMA_SUPPORT
/* Access handle validation */
#endif /* FMA_SUPPORT */
}
}
/* Adapter is now ready for FCP traffic */
/* Register vpi's for all ports that have did's */
for (i = 0; i < MAX_VPORTS; i++) {
continue;
}
}
/* Attempt to send any pending IO */
}
return (0);
} /* emlxs_clear_la_mbcmpl() */
/* SLI3 */
extern void
{
#ifdef FC_RPI_CHECK
#endif /* FC_RPI_CHECK */
return;
} /* emlxs_mb_clear_la() */
/*
* emlxs_mb_read_status Issue a READ STATUS mailbox command
*/
/*ARGSUSED*/
extern void
{
} /* fc_read_status() */
/*
* emlxs_mb_read_lnk_stat Issue a LINK STATUS mailbox command
*/
/*ARGSUSED*/
extern void
{
} /* emlxs_mb_read_lnk_stat() */
/*
* emlxs_mb_config_ring Issue a CONFIG RING mailbox command
*/
extern void
{
int32_t i;
int32_t j;
j = 0;
for (i = 0; i < ring; i++) {
}
if ((j + i) >= 6) {
break;
}
}
return;
} /* emlxs_mb_config_ring() */
/*
* emlxs_mb_config_link Issue a CONFIG LINK mailbox command
*/
extern void
{
/*
* NEW_FEATURE SLI-2, Coalescing Response Feature.
*/
}
}
return;
} /* emlxs_mb_config_link() */
static uint32_t
{
/* Retry only MBX_NOWAIT requests */
"Retrying. %s: status=%x. Auto-speed set.",
return (1);
}
}
}
return (0);
} /* emlxs_init_link_mbcmpl() */
/*
* emlxs_mb_init_link Issue an INIT LINK mailbox command
*/
extern void
{
(SLI4_FCOE_MODE)) {
return;
}
switch (topology) {
case FLAGS_LOCAL_LB:
break;
break;
break;
case FLAGS_TOPOLOGY_MODE_LOOP:
break;
break;
}
}
/*
* Setting up the link speed
*/
switch (linkspeed) {
case 0:
break;
case 1:
linkspeed = 0;
}
break;
case 2:
linkspeed = 0;
}
break;
case 4:
linkspeed = 0;
}
break;
case 8:
linkspeed = 0;
}
break;
case 10:
linkspeed = 0;
}
break;
case 16:
linkspeed = 0;
}
break;
default:
linkspeed = 0;
break;
}
}
return;
} /* emlxs_mb_init_link() */
/*
* emlxs_mb_down_link Issue a DOWN LINK mailbox command
*/
/*ARGSUSED*/
extern void
{
return;
} /* emlxs_mb_down_link() */
static uint32_t
{
int32_t i;
if (control == 0) {
}
return (1);
}
return (0);
}
if (!mp) {
return (0);
}
/* Initialize the node name and port name only once */
} else {
}
"SPARAM: EDTOV hba=%x mbox_csp=%x BBC=%x",
/* Initialize the physical port */
sizeof (SERV_PARM));
sizeof (NAME_TYPE));
sizeof (NAME_TYPE));
/* Initialize the virtual ports */
for (i = 1; i < MAX_VPORTS; i++) {
continue;
}
sizeof (SERV_PARM));
sizeof (NAME_TYPE));
sizeof (NAME_TYPE));
}
return (0);
} /* emlxs_read_sparam_mbcmpl() */
/*
* emlxs_mb_read_sparam Issue a READ SPARAM mailbox command
*/
extern uint32_t
{
return (1);
}
/*
* save address for completion
*/
return (0);
} /* emlxs_mb_read_sparam() */
/*
* emlxs_mb_read_rpi Issue a READ RPI mailbox command
*/
/*ARGSUSED*/
extern uint32_t
{
/*
* Set flag to issue action on cmpl
*/
return (0);
} /* emlxs_mb_read_rpi() */
/*
* emlxs_mb_read_xri Issue a READ XRI mailbox command
*/
/*ARGSUSED*/
extern uint32_t
{
/*
* Set flag to issue action on cmpl
*/
return (0);
} /* emlxs_mb_read_xri() */
/*ARGSUSED*/
extern int32_t
{
return (0);
}
/* Validate the service parameters */
return (1);
}
return (2);
}
/* If the receive data length is zero then set it to */
/* the CSP value */
if (!nsp_value) {
return (0);
}
}
/* If the receive data length is zero then set it to */
/* the CSP value */
if (!nsp_value) {
return (0);
}
}
return (0);
} /* emlxs_mb_check_sparm() */
/*
* emlxs_mb_set_var Issue a special debug mbox command to write slim
*/
/*ARGSUSED*/
extern void
{
/* addr = 0x090597 is AUTO ABTS disable for ELS commands */
/* addr = 0x052198 is DELAYED ABTS enable for ELS commands */
/* addr = 0x100506 is for setting PCI MAX READ value */
/*
* Always turn on DELAYED ABTS for ELS timeouts
*/
value = 1;
}
} /* emlxs_mb_set_var() */
/*
* Disable Traffic Cop
*/
/*ARGSUSED*/
extern void
{
} /* emlxs_disable_tc() */
extern void
{
int i;
/* Copy info for profiles 2,3,5. Other profiles this area is reserved */
}
/* Return if no rctl / type masks for this HBQ */
if (!hbq->HBQ_num_mask) {
return;
}
/* Otherwise we setup specific rctl / type masks for this HBQ */
for (i = 0; i < hbq->HBQ_num_mask; i++) {
}
return;
} /* emlxs_mb_config_hbq() */
/* SLI3 */
static uint32_t
{
"cmpl_reg_vpi:%d failed. status=%x",
return (0);
}
"cmpl_reg_vpi:%d ",
return (0);
} /* emlxs_reg_vpi_mbcmpl */
/* SLI3 */
extern uint32_t
{
int rval;
return (1);
}
"reg_vpi:%d failed. NPIV disabled.",
return (1);
}
"reg_vpi:%d failed. Already registered.",
return (0);
}
/* Can't reg vpi until ClearLA is sent */
"reg_vpi:%d failed. HBA state not READY",
return (1);
}
/* Must have port id */
"reg_vpi:%d failed. Port did=0",
return (1);
}
"reg_vpi:%d failed. Unable to allocate mbox.",
return (1);
}
"reg_vpi:%d failed. Unable to send request.",
return (1);
}
return (0);
} /* emlxs_mb_reg_vpi() */
/* SLI3 */
static uint32_t
{
"unreg_vpi_mbcmpl:%d failed. status=%x",
return (0);
}
return (0);
} /* emlxs_unreg_vpi_mbcmpl() */
/* SLI3 */
extern uint32_t
{
int rval;
return (1);
}
"unreg_vpi:%d failed. Not registered. flag=%x",
return (0);
}
"unreg_vpi:%d failed. Unable to allocate mbox.",
return (1);
}
"unreg_vpi:%d failed. Unable to send request.",
return (1);
}
return (0);
} /* emlxs_mb_unreg_vpi() */
/*
* emlxs_mb_config_farp Issue a CONFIG FARP mailbox command
*/
extern void
{
} /* emlxs_mb_config_farp() */
/*
* emlxs_mb_read_nv Issue a READ CONFIG mailbox command
*/
/*ARGSUSED*/
extern void
{
} else {
}
} /* emlxs_mb_read_config() */
/*
* NAME: emlxs_mb_put
*
* FUNCTION: put mailbox cmd onto the mailbox queue.
*
* EXECUTION ENVIRONMENT: process and interrupt level.
*
* NOTES:
*
* CALLED FROM: EMLXS_SLI_ISSUE_MBOX_CMD
*
* INPUT: hba - pointer to the device info area
* mbp - pointer to mailbox queue entry of mailbox cmd
*
* RETURNS: NULL - command queued
*/
extern void
{
/*
* queue command to end of list
*/
} else {
/*
* add command to empty list
*/
}
} /* emlxs_mb_put() */
/*
* NAME: emlxs_mb_get
*
* FUNCTION: get a mailbox command from mailbox command queue
*
* EXECUTION ENVIRONMENT: interrupt level.
*
* NOTES:
*
* CALLED FROM: emlxs_handle_mb_event
*
* INPUT: hba - pointer to the device info area
*
* RETURNS: NULL - no match found mb pointer - pointer to a mailbox command
*/
extern MAILBOXQ *
{
} else {
}
}
return (p_first);
} /* emlxs_mb_get() */
/* EMLXS_PORT_LOCK must be held when calling this */
void
{
/* Set the Mailbox timer */
if (hba->timer_tics) {
} else {
}
/* Initialize mailbox */
}
}
return;
} /* emlxs_mb_init() */
extern void
{
if (hba->mbox_queue_flag) {
if (mbxStatus != MBX_SUCCESS) {
} else {
}
}
if (mbox_mbq) {
} else {
mbox_iocbq = NULL;
}
hba->mbox_queue_flag = 0;
hba->mbox_timer = 0;
#ifdef SFCT_SUPPORT
"FCT mailbox: %s: status=%x",
}
#endif /* SFCT_SUPPORT */
if (mbox_queue_flag == MBX_NOWAIT) {
/* Check for deferred MBUF cleanup */
if (mbox_bp) {
}
if (mbox_nonembed) {
(void *)mbox_nonembed);
}
if (mbox_mbq) {
(void *)mbox_mbq);
}
} else { /* MBX_WAIT */
if (mbox_mbq) {
if (mb) {
/* Copy the local mailbox provided back into */
/* the original mailbox */
} else {
}
}
/* Mark mailbox complete */
}
/* Wake up the sleeping thread */
if (mbox_queue_flag == MBX_SLEEP) {
}
}
return;
} /* emlxs_mb_fini() */
extern void
{
#ifdef SFCT_SUPPORT
}
#endif /* SFCT_SUPPORT */
/* Check for deferred pkt completion */
if (sbp) {
if (mbxStatus != MBX_SUCCESS) {
/* Set error status */
IOERR_NO_RESOURCES, 1);
}
}
/* Check for deferred ub completion */
if (ubp) {
if (mbxStatus == MBX_SUCCESS) {
} else {
}
}
/* Special handling for restricted login */
}
/* Check for deferred iocb tx */
if (iocbq) {
/* Check for driver special codes */
/* These indicate the mailbox is being flushed */
if (mbxStatus >= MBX_DRIVER_RESERVED) {
/* Set the error status and return it */
iocbq);
} else {
iocbq);
}
}
return;
} /* emlxs_mb_deferred_cmpl() */
extern void
{
/* Flush out the active mbox command */
/* Flush out the queued mbox commands */
}
return;
} /* emlxs_mb_flush */
extern char *
{
uint32_t i;
for (i = 0; i < count; i++) {
return (emlxs_mb_cmd_table[i].string);
}
}
return (buffer);
} /* emlxs_mb_cmd_xlate() */
extern char *
{
uint32_t i;
for (i = 0; i < 12; i++) {
if (mask & (1<<i)) {
sizeof (buffer));
}
}
return (buffer);
}