/*
* 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 2014 QLogic Corporation
* The contents of this file are subject to the terms of the
* QLogic End User 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.
*/
#include "bnxe.h"
{ \
return B_FALSE; \
} \
{ \
return B_FALSE; \
}
{
}
void * pData,
{
{
return B_FALSE;
}
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
(void **)&kcqe, 1);
/* XXX release mutex or decrement reference count */
return B_TRUE;
}
void * pData,
{
{
}
else
{
}
}
{
}
void * pData,
{
{
return;
}
{
}
{
}
return;
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
{
}
else
{
}
}
{
if (pFcoeState != NULL)
{
}
}
void * pData,
{
{
return;
}
KM_NOSLEEP)) == NULL)
{
}
&pFcoeState->lm_fcoe);
if (rc != LM_STATUS_SUCCESS)
{
}
if (rc == LM_STATUS_SUCCESS)
{
}
else if (rc == LM_STATUS_PENDING)
{
/*
* the cid is pending - its too soon to initialize the context, it will
* be initialized from the recycle cid callback and completed as well.
*/
}
else
{
}
return;
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
{
}
else
{
}
}
{
if (pFcoeState != NULL)
{
}
}
void * pData,
{
{
return;
}
if (pFcoeState == NULL)
{
}
&kwqe->conn_enable_disable) !=
{
}
return;
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
{
}
else
{
}
}
{
if (pFcoeState != NULL)
{
}
}
void * pData,
{
{
return;
}
if (pFcoeState == NULL)
{
}
&kwqe->conn_enable_disable) !=
{
}
return;
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
{
return;
}
{
}
else
{
}
}
{
if (pFcoeState != NULL)
{
}
}
void * pData,
{
{
return;
}
if (pFcoeState == NULL)
{
}
&pFcoeState->lm_fcoe) !=
{
}
return;
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
{
}
else
{
}
}
{
}
void * pData,
{
{
return;
}
{
return;
}
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
{
}
else
{
}
}
{
}
void * pData,
{
{
return;
}
{
return;
}
/* call here directly (for error case) */
/* XXX
* Need to add a mutex or reference count to ensure that bnxef isn't
* unloaded underneath this taskq dispatch routine.
*/
{
(void **)&pKcqe, 1);
}
/* XXX release mutex or decrement reference count */
}
{
}
void * pData,
{
int i;
{
return;
}
/* init the kcqe pointer array */
for (i = 0; i < num_kcqes; i++)
{
}
(void **)kcqes,
{
}
else
{
}
}
{
/* Send up KCQE_LIMIT kcqes at a time... */
{
{
kcqesLimit += KCQE_LIMIT;
}
else
{
}
(kcqesLimit % KCQE_LIMIT);
#if 0
{
return B_FALSE;
}
#else
#endif
}
return B_TRUE;
}
int cmd,
void * pData,
int dataLen)
{
int rc, i;
/* sanity check */
{
return B_FALSE;
}
switch (cmd)
{
case PRV_CTL_GET_MAC_ADDR:
if (dataLen < ETHERNET_ADDRESS_SIZE)
{
dataLen);
return B_FALSE;
}
if (!pData)
{
return B_FALSE;
}
return B_TRUE;
case PRV_CTL_SET_MAC_ADDR:
if (dataLen < ETHERNET_ADDRESS_SIZE)
{
dataLen);
return B_FALSE;
}
if (!pData)
{
return B_FALSE;
}
/* Validate MAC address */
if (IS_ETH_MULTICAST(pData))
{
return B_FALSE;
}
/* XXX wrong? (overwriting fcoe hw programmed address!) */
case PRV_CTL_QUERY_PARAMS:
if (dataLen != sizeof(BnxeFcoeInfo))
{
dataLen);
return B_FALSE;
}
if (!pData)
{
return B_FALSE;
}
/*
* Always set the FORCE_LOAD flags which tells bnxef to perform any
* necessary delays needed when bringing up targets. This allows ample
* time for bnxef to come up and finish for FCoE boot. If we don't
* force a delay then there is a race condition and the kernel won't
* find the root disk.
*/
{
case SINGLE_FUNCTION:
break;
case MULTI_FUNCTION_SD:
break;
case MULTI_FUNCTION_SI:
break;
case MULTI_FUNCTION_AFEX:
break;
default:
break;
}
return B_TRUE;
case PRV_CTL_DISABLE_INTR:
return B_TRUE;
case PRV_CTL_ENABLE_INTR:
return B_TRUE;
case PRV_CTL_MBA_BOOT:
{
dataLen);
return B_FALSE;
}
if (!pData)
{
return B_FALSE;
}
return B_TRUE;
case PRV_CTL_LINK_STATE:
{
dataLen);
return B_FALSE;
}
if (!pData)
{
return B_FALSE;
}
return B_TRUE;
case PRV_CTL_BOARD_TYPE:
{
return B_FALSE;
}
return B_TRUE;
case PRV_CTL_BOARD_SERNUM:
{
return B_FALSE;
}
"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
return B_TRUE;
case PRV_CTL_BOOTCODE_VERSION:
{
return B_FALSE;
}
return B_TRUE;
if (!pData ||
(dataLen !=
{
return B_FALSE;
}
sizeof(fcoe_stats_info_t));
return B_TRUE;
case PRV_CTL_SET_CAPS:
{
return B_FALSE;
}
return B_TRUE;
default:
return B_FALSE;
}
}
{
int txCount = 0;
int rc;
/* sanity check */
{
return pMblk;
}
while (pMblk)
{
txCount++;
if (rc == BNXE_TX_GOODXMIT)
{
continue;
}
else if (rc == BNXE_TX_DEFERPKT)
{
}
else
{
}
break;
}
return pMblk;
}
{
/* sanity check */
{
return B_FALSE;
}
{
return NULL;
}
return B_TRUE;
}
void * wqes[],
int wqeCnt)
{
int kwqeCnt = 0;
/* sanity check */
{
return B_FALSE;
}
{
return B_FALSE;
}
{
{
case FCOE_KWQE_OPCODE_INIT1:
{
return B_FALSE;
}
{
return B_FALSE;
}
kwqeCnt += 3;
break;
{
return B_FALSE;
}
{
return B_FALSE;
}
kwqeCnt += 4;
break;
{
return B_FALSE;
}
kwqeCnt += 1;
break;
{
return B_FALSE;
}
kwqeCnt += 1;
break;
{
return B_FALSE;
}
kwqeCnt += 1;
break;
case FCOE_KWQE_OPCODE_DESTROY:
{
return B_FALSE;
}
kwqeCnt += 1;
break;
case FCOE_KWQE_OPCODE_STAT:
{
return B_FALSE;
}
kwqeCnt += 1;
break;
default:
return B_FALSE;
}
}
return B_TRUE;
}
void ** ppMap,
{
/* sanity check */
{
return B_FALSE;
}
/* get the right offset from the mapped bar */
*ppMap = (void *)((u8_t *)pUM->lm_dev.context_info->array[SW_CID(cid)].cid_resc.mapped_cid_bar_addr + DPM_TRIGER_TYPE);
if (!(*ppMap) || !(*pAccHandle))
{
return B_FALSE;
}
return B_TRUE;
}
void * pMap,
{
void * pTmp;
/* sanity check */
{
return B_FALSE;
}
/* verify the mapped bar address */
pTmp = (void *)((u8_t *)pUM->lm_dev.context_info->array[SW_CID(cid)].cid_resc.mapped_cid_bar_addr + DPM_TRIGER_TYPE);
{
return B_FALSE;
}
return B_TRUE;
}
{
int rc;
{
return ENOTSUP;
}
//if (CLIENT_DEVI(pUM, LM_CLI_IDX_FCOE))
{
return EEXIST;
}
{
return ENOMEM;
}
"name",
1) != DDI_PROP_SUCCESS)
{
/* XXX see other call to ndi_devi_free below */
//ndi_devi_free(pUM->fcoe.pDev);
return ENOENT;
}
/*
* here in so they will be passed to bnxef during BINDING.
* Ideally custom wwn's will be set via the driver .conf
* file and via a private driver property.
*/
{
/* XXX
* ndi_devi_free will cause a panic. Don't know why and we've
* verified that Sun's FCoE driver does not free it either.
*/
//ndi_devi_free(pUM->fcoe.pDev);
return ECHILD;
}
#if 0
/* bring bnxef online and attach it */
{
}
#endif
return 0;
}
{
int rc = 0;
{
return ENOTSUP;
}
{
{
return ENOENT;
}
{
return ENOENT;
}
NULL,
0) == B_FALSE)
{
return ENOMSG; /* no graceful unload with bnxef */
}
}
else
{
}
/*
* There are times when delete-port doesn't fully work and bnxef is unable
* to detach and never calls UNBIND. So here we'll just make sure that
* the child dev node is not NULL which semi-gaurantees the UNBIND hasn't
* been called yet. Multiple offline calls will hopefully kick bnxef...
*/
//if (CLIENT_DEVI(pUM, LM_CLI_IDX_FCOE))
{
#if 1
{
return EBUSY;
}
#else
#endif
}
return rc;
}
{
int rc;
{
return;
}
{
}
else
{
}
}