svn commit: r358814 - head/sys/dev/aacraid
Leandro Lupori
luporl at FreeBSD.org
Mon Mar 9 19:01:18 UTC 2020
Author: luporl
Date: Mon Mar 9 19:01:17 2020
New Revision: 358814
URL: https://svnweb.freebsd.org/changeset/base/358814
Log:
[aacraid] Handle both AIF and SYNC interrupts
Without this change, if an AIF interrupt comes at the same time a SYNC
command is finished, the SYNC interrupt will be lost. This happens because
all interrupt bits (bellbits) are cleared, but only one of them is handled.
Debugging shows that, (at least) when !sc->msi_enabled and (sc->flags &
AAC_FLAGS_SYNC_MODE) is true (sync mode), both bits may be set at the same
time.
PR: 237463
Reviewed by: scottl
Sponsored by: Eldorado Research Institute (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D23859
Modified:
head/sys/dev/aacraid/aacraid.c
Modified: head/sys/dev/aacraid/aacraid.c
==============================================================================
--- head/sys/dev/aacraid/aacraid.c Mon Mar 9 16:02:54 2020 (r358813)
+++ head/sys/dev/aacraid/aacraid.c Mon Mar 9 19:01:17 2020 (r358814)
@@ -899,7 +899,7 @@ aacraid_new_intr_type1(void *arg)
AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, bellbits);
if (bellbits_shifted & AAC_DB_AIF_PENDING)
mode |= AAC_INT_MODE_AIF;
- else if (bellbits_shifted & AAC_DB_SYNC_COMMAND)
+ if (bellbits_shifted & AAC_DB_SYNC_COMMAND)
mode |= AAC_INT_MODE_SYNC;
}
/* ODR readback, Prep #238630 */
@@ -923,7 +923,10 @@ aacraid_new_intr_type1(void *arg)
sc->flags &= ~AAC_QUEUE_FRZN;
sc->aac_sync_cm = NULL;
}
- mode = 0;
+ if (mode & AAC_INT_MODE_INTX)
+ mode &= ~AAC_INT_MODE_SYNC;
+ else
+ mode = 0;
}
if (mode & AAC_INT_MODE_AIF) {
@@ -932,6 +935,9 @@ aacraid_new_intr_type1(void *arg)
mode = 0;
}
}
+
+ if (sc->flags & AAC_FLAGS_SYNC_MODE)
+ mode = 0;
if (mode) {
/* handle async. status */
More information about the svn-src-all
mailing list