diff options
author | mav <mav@FreeBSD.org> | 2016-05-03 08:04:34 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-05-03 08:04:34 +0000 |
commit | 25b28f1fd9fac3619db5b7212935abbc3cbb1b14 (patch) | |
tree | f9e7363bb0919790e1e8816a2c18775fff95c6d7 /sys/dev/isp/isp.c | |
parent | ff8ad51170fa62937c0a19cd90bbd284343dcaed (diff) | |
download | FreeBSD-src-25b28f1fd9fac3619db5b7212935abbc3cbb1b14.zip FreeBSD-src-25b28f1fd9fac3619db5b7212935abbc3cbb1b14.tar.gz |
MFC r297915: 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.
Diffstat (limited to 'sys/dev/isp/isp.c')
-rw-r--r-- | sys/dev/isp/isp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 567b0a5..dd8112f 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -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; |