aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Lupori <luporl@FreeBSD.org>2020-03-09 19:01:17 +0000
committerLeandro Lupori <luporl@FreeBSD.org>2020-03-09 19:01:17 +0000
commiteb132ade4af4184cfa47b70e44b01db40e96a0d0 (patch)
tree145c711f1ef3cac9a2cfd2b9b63ba81526092ea0
parent91cd69ee2c7a88b6a6f5957606cedfef2dab9611 (diff)
downloadsrc-eb132ade4af4184cfa47b70e44b01db40e96a0d0.tar.gz
src-eb132ade4af4184cfa47b70e44b01db40e96a0d0.zip
[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
Notes
Notes: svn path=/head/; revision=358814
-rw-r--r--sys/dev/aacraid/aacraid.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c
index cd7d27558e8a..0847e15309c0 100644
--- a/sys/dev/aacraid/aacraid.c
+++ b/sys/dev/aacraid/aacraid.c
@@ -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) {
@@ -933,6 +936,9 @@ aacraid_new_intr_type1(void *arg)
}
}
+ if (sc->flags & AAC_FLAGS_SYNC_MODE)
+ mode = 0;
+
if (mode) {
/* handle async. status */
index = sc->aac_host_rrq_idx[vector_no];