summaryrefslogtreecommitdiffstats
path: root/sys/dev/amr
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-07-01 06:56:10 +0000
committerps <ps@FreeBSD.org>2004-07-01 06:56:10 +0000
commit1b4f57448edee538b415203962e034ed794c1bee (patch)
treef23f3bf5e5560274b4ab8c9dc6ee8b01b137a21e /sys/dev/amr
parent268ac8d0b8eff12d0d1ee8ca0a3b88b80ee6221e (diff)
downloadFreeBSD-src-1b4f57448edee538b415203962e034ed794c1bee.zip
FreeBSD-src-1b4f57448edee538b415203962e034ed794c1bee.tar.gz
Use a separate flag when doing a kernel coredump when polling for
completion instead of abusing the interrupt enable flag.
Diffstat (limited to 'sys/dev/amr')
-rw-r--r--sys/dev/amr/amr.c6
-rw-r--r--sys/dev/amr/amrvar.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index f206b02..f1060ff 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -976,7 +976,7 @@ amr_quartz_poll_command(struct amr_command *ac)
s = splbio();
- if (sc->amr_state & AMR_STATE_INTEN) {
+ if ((sc->amr_state & AMR_STATE_CRASHDUMP) == 0) {
count=0;
while (sc->amr_busyslots) {
tsleep(sc, PRIBIO | PCATCH, "amrpoll", hz);
@@ -1788,7 +1788,7 @@ amr_dump_blocks(struct amr_softc *sc, int unit, u_int32_t lba, void *data, int b
debug_called(1);
- sc->amr_state &= ~AMR_STATE_INTEN;
+ sc->amr_state |= AMR_STATE_CRASHDUMP;
/* get ourselves a command buffer */
if ((ac = amr_alloccmd(sc)) == NULL)
@@ -1815,7 +1815,7 @@ amr_dump_blocks(struct amr_softc *sc, int unit, u_int32_t lba, void *data, int b
if (ac != NULL)
amr_releasecmd(ac);
- sc->amr_state |= AMR_STATE_INTEN;
+ sc->amr_state &= ~AMR_STATE_CRASHDUMP;
return (error);
}
diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h
index fcfb397..224ae44 100644
--- a/sys/dev/amr/amrvar.h
+++ b/sys/dev/amr/amrvar.h
@@ -187,6 +187,7 @@ struct amr_softc
#define AMR_STATE_SUSPEND (1<<1)
#define AMR_STATE_INTEN (1<<2)
#define AMR_STATE_SHUTDOWN (1<<3)
+#define AMR_STATE_CRASHDUMP (1<<4)
/* per-controller queues */
struct bio_queue_head amr_bioq; /* pending I/O with no commands */
OpenPOWER on IntegriCloud