emlxs_ip.c revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 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 (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 (Local error)
*/
case CMD_XMIT_SEQUENCE_CR:
case CMD_XMIT_SEQUENCE64_CR:
"XMIT SEQUENCE CR completion error: "
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;
uint32_t IpBcastReceived = 0;
uint32_t IpSeqReceived = 0;
for (i = 0; i < MAX_VPORTS; i++) {
continue;
}
ubp = (fc_unsol_buf_t *)
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
{
#ifdef SLI3_SUPPORT
#endif /* SLI3_SUPPORT */
/*
* No action required for now.
*/
"Receive sequence list: cmd=0x%x iotag=0x%x status=0x%x "
goto out;
}
#ifdef SLI3_SUPPORT
} else {
}
} else
#endif /* SLI3_SUPPORT */
{
/* Check for valid buffer */
}
}
out:
#ifdef SLI3_SUPPORT
} else
#endif /* SLI3_SUPPORT */
{
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",
return (EIO);
}
/* check for first xmit completion in sequence */
"create_xri: cmd=0x%x iotag=0x%x status=0x%x w4=0x%x",
return (EIO);
}
"create_xri completed: DID=0x%x Xri=0x%x iotag=0x%x",
return (0);
} /* 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;
}
/* 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 */
"create_xri sent: DID=0x%x Xri=0x%x iotag=0x%x",
return (0);
fail:
/* Clear the XRI flag */
return (1);
} /* emlxs_create_xri() */