svn commit: r290795 - stable/10/sys/dev/isp
Alexander Motin
mav at FreeBSD.org
Fri Nov 13 19:54:59 UTC 2015
Author: mav
Date: Fri Nov 13 19:54:58 2015
New Revision: 290795
URL: https://svnweb.freebsd.org/changeset/base/290795
Log:
MFC r289933, r289939: Improve Port Database Changed handling and reporting.
Modified:
stable/10/sys/dev/isp/isp.c
stable/10/sys/dev/isp/isp_freebsd.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/isp/isp.c
==============================================================================
--- stable/10/sys/dev/isp/isp.c Fri Nov 13 19:53:31 2015 (r290794)
+++ stable/10/sys/dev/isp/isp.c Fri Nov 13 19:54:58 2015 (r290795)
@@ -6074,21 +6074,21 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
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) {
Modified: stable/10/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.c Fri Nov 13 19:53:31 2015 (r290794)
+++ stable/10/sys/dev/isp/isp_freebsd.c Fri Nov 13 19:54:58 2015 (r290795)
@@ -382,14 +382,16 @@ isp_freeze_loopdown(ispsoftc_t *isp, int
if (IS_FC(isp)) {
struct isp_fc *fc = ISP_FC_PC(isp, chan);
if (fc->simqfrozen == 0) {
- isp_prt(isp, ISP_LOGDEBUG0, "%s: freeze simq (loopdown) chan %d", msg, chan);
+ isp_prt(isp, ISP_LOGDEBUG0,
+ "Chan %d %s -- freeze simq (loopdown)", chan, msg);
fc->simqfrozen = SIMQFRZ_LOOPDOWN;
#if __FreeBSD_version >= 1000039
xpt_hold_boot();
#endif
xpt_freeze_simq(fc->sim, 1);
} else {
- isp_prt(isp, ISP_LOGDEBUG0, "%s: mark frozen (loopdown) chan %d", msg, chan);
+ isp_prt(isp, ISP_LOGDEBUG0,
+ "Chan %d %s -- mark frozen (loopdown)", chan, msg);
fc->simqfrozen |= SIMQFRZ_LOOPDOWN;
}
}
@@ -4988,11 +4990,11 @@ changed:
fc = ISP_FC_PC(isp, bus);
if (evt == ISPASYNC_CHANGE_PDB) {
- msg = "Chan %d Port Database Changed";
+ msg = "Port Database Changed";
} else if (evt == ISPASYNC_CHANGE_SNS) {
- msg = "Chan %d Name Server Database Changed";
+ msg = "Name Server Database Changed";
} else {
- msg = "Chan %d Other Change Notify";
+ msg = "Other Change Notify";
}
/*
@@ -5002,7 +5004,7 @@ changed:
isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Stopping Loop Down Timer @ %lu", (unsigned long) time_uptime);
callout_stop(&fc->ldt);
}
- isp_prt(isp, ISP_LOGINFO, msg, bus);
+ isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg);
if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) {
isp_freeze_loopdown(isp, bus, msg);
}
More information about the svn-src-stable-10
mailing list