Filter Port Database Changed notifications.

For some reason firmware sends Port Database Changed notifications in case
of explicit login requests from the driver when target port is unavailabe.
Those notifications don't give driver any new information, but only cause
infinite scan loop.
This commit is contained in:
Alexander Motin 2016-04-13 10:35:17 +00:00
parent 9853d10411
commit ace7039eaa
2 changed files with 10 additions and 2 deletions

View File

@ -2630,6 +2630,7 @@ isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid, int flags
isp_put_plogx(isp, &pl, (isp_plogx_t *)reqp);
if (isp->isp_dblev & ISP_LOGDEBUG1)
isp_print_bytes(isp, "IOCB LOGX", QENTRY_LEN, reqp);
FCPARAM(isp, chan)->isp_login_hdl = handle;
ISP_SYNC_REQUEST(isp);
if (msleep(resp, &isp->isp_lock, 0, "PLOGX", 3 * ICB_LOGIN_TOV * hz)
== EWOULDBLOCK) {
@ -2638,6 +2639,7 @@ isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid, int flags
isp_destroy_handle(isp, pl.plogx_handle);
return (-1);
}
FCPARAM(isp, chan)->isp_login_hdl = NIL_HANDLE;
if (isp->isp_dblev & ISP_LOGDEBUG1)
isp_print_bytes(isp, "IOCB LOGX response", QENTRY_LEN, resp);
isp_get_plogx(isp, (isp_plogx_t *)resp, &pl);
@ -6000,9 +6002,13 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox)
fcp = FCPARAM(isp, chan);
if (fcp->role == ISP_ROLE_NONE)
continue;
if (fcp->isp_loopstate > LOOP_LTEST_DONE)
if (fcp->isp_loopstate > LOOP_LTEST_DONE) {
if (nphdl != NIL_HANDLE &&
nphdl == fcp->isp_login_hdl &&
reason == PDB24XX_AE_OPN_2)
continue;
fcp->isp_loopstate = LOOP_LTEST_DONE;
else if (fcp->isp_loopstate < LOOP_HAVE_LINK)
} else if (fcp->isp_loopstate < LOOP_HAVE_LINK)
fcp->isp_loopstate = LOOP_HAVE_LINK;
isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan,
ISPASYNC_CHANGE_PDB, nphdl, nlstate, reason);
@ -7818,6 +7824,7 @@ isp_setdfltfcparm(ispsoftc_t *isp, int chan)
fcp->isp_xfwoptions = 0;
fcp->isp_zfwoptions = 0;
fcp->isp_lasthdl = NIL_HANDLE;
fcp->isp_login_hdl = NIL_HANDLE;
if (IS_24XX(isp)) {
fcp->isp_fwoptions |= ICB2400_OPT1_FAIRNESS;

View File

@ -449,6 +449,7 @@ typedef struct {
uint16_t isp_lasthdl; /* only valid for channel 0 */
uint16_t isp_maxalloc;
uint16_t isp_fabric_params;
uint16_t isp_login_hdl; /* Logging in handle */
uint8_t isp_retry_delay;
uint8_t isp_retry_count;