Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/isp/isp.c
Context not available. | |||||
return; | return; | ||||
} | } | ||||
isp->isp_maxcmds = mbs.param[3]; | isp->isp_maxcmds = mbs.param[3]; | ||||
/* Limit to the maximum of our hardcoded handle format (16K now). */ | |||||
isp->isp_maxcmds = MIN(isp->isp_maxcmds, ISP_HANDLE_MAX - ISP_HANDLE_RESERVE); | |||||
isp_prt(isp, ISP_LOGCONFIG, "%d max I/O command limit set", isp->isp_maxcmds); | isp_prt(isp, ISP_LOGCONFIG, "%d max I/O command limit set", isp->isp_maxcmds); | ||||
/* | /* | ||||
Context not available. | |||||
icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN; | icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN; | ||||
} | } | ||||
if (!IS_26XX(isp)) | icbp->icb_execthrottle = DEFAULT_EXEC_THROTTLE(isp); | ||||
icbp->icb_execthrottle = 0xffff; | if (icbp->icb_execthrottle < 1 && !IS_26XX(isp)) { | ||||
isp_prt(isp, ISP_LOGERR, "bad execution throttle of %d- using %d", DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE); | |||||
icbp->icb_execthrottle = ICB_DFLT_THROTTLE; | |||||
} | |||||
#ifdef ISP_TARGET_MODE | |||||
/* | /* | ||||
* Set target exchange count. Take half if we are supporting both roles. | * Set target exchange count. Take half if we are supporting both roles. | ||||
*/ | */ | ||||
if (icbp->icb_fwoptions1 & ICB2400_OPT1_TGT_ENABLE) { | if (icbp->icb_fwoptions1 & ICB2400_OPT1_TGT_ENABLE) { | ||||
icbp->icb_xchgcnt = isp->isp_maxcmds; | |||||
if ((icbp->icb_fwoptions1 & ICB2400_OPT1_INI_DISABLE) == 0) | if ((icbp->icb_fwoptions1 & ICB2400_OPT1_INI_DISABLE) == 0) | ||||
icbp->icb_xchgcnt = MIN(isp->isp_maxcmds / 2, ATPDPSIZE); | icbp->icb_xchgcnt >>= 1; | ||||
else | |||||
icbp->icb_xchgcnt = isp->isp_maxcmds; | |||||
} | } | ||||
#endif | |||||
ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; | ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; | ||||
icbp->icb_hardaddr = fcp->isp_loopid; | icbp->icb_hardaddr = fcp->isp_loopid; | ||||
Context not available. | |||||
*/ | */ | ||||
if (topo == TOPO_NL_PORT || topo == TOPO_FL_PORT) { | if (topo == TOPO_NL_PORT || topo == TOPO_FL_PORT) { | ||||
int i, j; | int i, j; | ||||
for (i = j = 0; i < ISP_HANDLE_NUM(isp); i++) { | for (i = j = 0; i < isp->isp_maxcmds; i++) { | ||||
XS_T *xs; | XS_T *xs; | ||||
isp_hdl_t *hdp; | isp_hdl_t *hdp; | ||||
Context not available. | |||||
* Establish some default parameters. | * Establish some default parameters. | ||||
*/ | */ | ||||
fcp->role = DEFAULT_ROLE(isp, chan); | fcp->role = DEFAULT_ROLE(isp, chan); | ||||
fcp->isp_maxalloc = ICB_DFLT_ALLOC; | |||||
fcp->isp_retry_delay = ICB_DFLT_RDELAY; | fcp->isp_retry_delay = ICB_DFLT_RDELAY; | ||||
fcp->isp_retry_count = ICB_DFLT_RCOUNT; | fcp->isp_retry_count = ICB_DFLT_RCOUNT; | ||||
fcp->isp_loopid = DEFAULT_LOOPID(isp, chan); | fcp->isp_loopid = DEFAULT_LOOPID(isp, chan); | ||||
Context not available. | |||||
uint64_t wwn; | uint64_t wwn; | ||||
isp_prt(isp, ISP_LOGDEBUG0, | isp_prt(isp, ISP_LOGDEBUG0, | ||||
"NVRAM 0x%08x%08x 0x%08x%08x maxframelen %d", | "NVRAM 0x%08x%08x 0x%08x%08x exchg_cnt %d maxframelen %d", | ||||
(uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data) >> 32), | (uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data) >> 32), | ||||
(uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data)), | (uint32_t) (ISP2400_NVRAM_NODE_NAME(nvram_data)), | ||||
(uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data) >> 32), | (uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data) >> 32), | ||||
(uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data)), | (uint32_t) (ISP2400_NVRAM_PORT_NAME(nvram_data)), | ||||
ISP2400_NVRAM_EXCHANGE_COUNT(nvram_data), | |||||
ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data)); | ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data)); | ||||
isp_prt(isp, ISP_LOGDEBUG0, | isp_prt(isp, ISP_LOGDEBUG0, | ||||
"NVRAM loopid %d fwopt1 0x%x fwopt2 0x%x fwopt3 0x%x", | "NVRAM execthr %d loopid %d fwopt1 0x%x fwopt2 0x%x fwopt3 0x%x", | ||||
ISP2400_NVRAM_EXECUTION_THROTTLE(nvram_data), | |||||
ISP2400_NVRAM_HARDLOOPID(nvram_data), | ISP2400_NVRAM_HARDLOOPID(nvram_data), | ||||
ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data), | ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data), | ||||
ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data), | ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data), | ||||
Context not available. | |||||
} | } | ||||
fcp->isp_wwnn_nvram = wwn; | fcp->isp_wwnn_nvram = wwn; | ||||
if (ISP2400_NVRAM_EXCHANGE_COUNT(nvram_data)) { | |||||
fcp->isp_maxalloc = ISP2400_NVRAM_EXCHANGE_COUNT(nvram_data); | |||||
} | |||||
if ((isp->isp_confopts & ISP_CFG_OWNFSZ) == 0) { | if ((isp->isp_confopts & ISP_CFG_OWNFSZ) == 0) { | ||||
DEFAULT_FRAMESIZE(isp) = | DEFAULT_FRAMESIZE(isp) = | ||||
ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data); | ISP2400_NVRAM_MAXFRAMELENGTH(nvram_data); | ||||
Context not available. | |||||
if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) { | if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) { | ||||
fcp->isp_loopid = ISP2400_NVRAM_HARDLOOPID(nvram_data); | fcp->isp_loopid = ISP2400_NVRAM_HARDLOOPID(nvram_data); | ||||
} | } | ||||
if ((isp->isp_confopts & ISP_CFG_OWNEXCTHROTTLE) == 0) { | |||||
DEFAULT_EXEC_THROTTLE(isp) = | |||||
ISP2400_NVRAM_EXECUTION_THROTTLE(nvram_data); | |||||
} | |||||
fcp->isp_fwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data); | fcp->isp_fwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS1(nvram_data); | ||||
fcp->isp_xfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data); | fcp->isp_xfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS2(nvram_data); | ||||
fcp->isp_zfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data); | fcp->isp_zfwoptions = ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data); | ||||
Context not available. |