From 103a6c1ce53ed7897db376eb0600bfe76f166cc7 Mon Sep 17 00:00:00 2001 From: mav Date: Fri, 13 Nov 2015 19:54:58 +0000 Subject: MFC r289933, r289939: Improve Port Database Changed handling and reporting. --- sys/dev/isp/isp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/dev/isp/isp.c') diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index f8da1c9..01cea1a 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -6074,21 +6074,21 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox) case ASYNC_PDB_CHANGED: { - int nphdl, nlstate, reason; - /* - * We *should* get a channel out of the 24XX, but we don't seem - * to get more than a PDB CHANGED on channel 0, so turn it into - * a broadcast event. - */ + int echan, nphdl, nlstate, reason; + if (IS_24XX(isp)) { nphdl = ISP_READ(isp, OUTMAILBOX1); nlstate = ISP_READ(isp, OUTMAILBOX2); reason = ISP_READ(isp, OUTMAILBOX3) >> 8; + GET_24XX_BUS(isp, chan, "ASYNC_CHANGE_NOTIFY"); + echan = (nphdl == NIL_HANDLE) ? + isp->isp_nchan - 1 : chan; } else { nphdl = NIL_HANDLE; nlstate = reason = 0; + chan = echan = 0; } - for (chan = 0; chan < isp->isp_nchan; chan++) { + for (; chan <= echan; chan++) { fcparam *fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) { -- cgit v1.1