/*
* 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-2011 Emulex. All rights reserved.
* Use is subject to license terms.
*/
#include <emlxs.h>
/* Required for EMLXS_CONTEXT in EMLXS_MSGF calls */
extern int32_t
{
if (!sbp) {
"cmd=0x%x iotag=0x%x status=0x%x perr=0x%x",
return (EIO);
}
return (0);
}
switch (cmd->ULPCOMMAND) {
/*
* Error: Abnormal BCAST command completion (Local error)
*/
case CMD_XMIT_BCAST_CN:
case CMD_XMIT_BCAST64_CN:
"XMIT BCAST completion error cmd=0x%x status=0x%x "
break;
/*
* Error: Abnormal XMIT SEQUENCE command completion
* (Local error)
*/
case CMD_XMIT_SEQUENCE_CR:
case CMD_XMIT_SEQUENCE64_CR:
"XMIT SEQUENCE CR completion error: cmd=%x status=0x%x "
break;
/*
* Normal BCAST completion
*/
case CMD_XMIT_BCAST_CX:
case CMD_XMIT_BCAST64_CX:
"XMIT BCAST CN completion: cmd=%x status=0x%x [%08x,%08x]",
break;
/*
* Normal XMIT SEQUENCE completion
*/
case CMD_XMIT_SEQUENCE_CX:
case CMD_XMIT_SEQUENCE64_CX:
"XMIT SEQUENCE CR completion: cmd=%x status=0x%x"
NLP_RPI_XRI)) {
}
}
} else {
}
break;
default:
break;
} /* switch(cmd->ULPCOMMAND) */
return (0);
} /* emlxs_ip_handle_event() */
extern int32_t
{
uint32_t i;
for (i = 0; i < MAX_VPORTS; i++) {
continue;
}
ubp =
FC_TYPE_IS8802_SNAP, 0);
if (!ubp) {
/* Theoretically we should never get here. */
/* There should be one DMA buffer for every ub */
/* buffer. If we are out of ub buffers */
/* then some how this matching has been corrupted */
"Buffer not found. paddr=%lx",
continue;
}
if (ndlp) {
}
}
/*
* If no node is found, then check if this is a
* broadcast frame
*/
}
else {
/* We have to drop this frame because we do not have */
/* the S_ID of the request */
"Node not found. mac=%02x%02x%02x%02x%02x%02x",
continue;
}
} else {
}
/*
* Setup frame header
*/
IpDropped = 0;
}
out:
if (IpDropped) {
}
if (IpBcastReceived) {
}
if (IpSeqReceived) {
}
return (0);
} /* emlxs_ip_handle_unsol_req() */
extern int32_t
{
/*
* No action required for now.
*/
"Receive sequence list: cmd=0x%x iotag=0x%x status=0x%x "
goto out;
}
} else {
}
} else {
/* Check for valid buffer */
bdeAddr =
}
}
out:
} else {
if (mp) {
}
}
return (0);
} /* emlxs_ip_handle_rcv_seq_list() */
/*
* Process a create_xri command completion.
*/
extern int32_t
{
if (!sbp) {
"create_xri: cmd=0x%x iotag=0x%x status=0x%x w4=0x%x. "
"NULL sbp found.",
return (EIO);
}
/* check for first xmit completion in sequence */
if (!ndlp) {
"create_xri: cmd=0x%x iotag=0x%x status=0x%x w4=0x%x. "
"NULL node found.",
goto done;
}
"create_xri: cmd=0x%x iotag=0x%x status=0x%x w4=0x%x. "
"Completion error.",
goto done;
}
"create_xri completed: DID=0x%x Xri=0x%x iotag=0x%x",
done:
if (pkt) {
}
return (rval);
} /* emlxs_handle_create_xri() */
/*
* Issue an iocb command to create an exchange with the remote Nport
* specified by the NODELIST entry.
*/
extern int32_t
{
/* Check if an XRI has already been requested */
return (0);
}
"create_xri failed: Unable to allocate pkt. did=0x%x",
goto fail;
}
/* Clear the PACKET_ULP_OWNED flag */
/* Get the iotag by registering the packet */
if (!iotag) {
/*
* No more command slots available, retry later
*/
"create_xri failed: Unable to allocate IOTAG. did=0x%x",
goto fail;
}
/* Initalize iocbq */
return (0);
fail:
/* Clear the XRI flag */
return (1);
} /* emlxs_create_xri() */