diff options
author | alfred <alfred@FreeBSD.org> | 2003-02-14 13:10:40 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-02-14 13:10:40 +0000 |
commit | 268bc18ef22d1e8576dc27bfd457db03cc8f64a1 (patch) | |
tree | 3d097cb02213bb33ea65e44a51a5c671d8b7d12d | |
parent | 6c48c14c4929b75deeaa10e0726ebea8d04c85ef (diff) | |
download | FreeBSD-src-268bc18ef22d1e8576dc27bfd457db03cc8f64a1.zip FreeBSD-src-268bc18ef22d1e8576dc27bfd457db03cc8f64a1.tar.gz |
Fix crash dumps on ata and scsi.
To fix scsi, don't wait for ithreads if we're dumping, it makes the
debugger sad.
To fix ata, use what appears to be a polling method if we're dumping,
I stole this from tmm but added code to ensure that this change is
only in effect while dumping.
Tested by: des
-rw-r--r-- | sys/dev/ata/ata-all.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_intr.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index e9c020c..9fb6aa5 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -486,7 +486,8 @@ ata_getparam(struct ata_device *atadev, u_int8_t command) /* apparently some devices needs this repeated */ do { - if (ata_command(atadev, command, 0, 0, 0, ATA_WAIT_INTR)) { + if (ata_command(atadev, command, 0, 0, 0, + dumping ? ATA_WAIT_READY : ATA_WAIT_INTR)) { ata_prtdev(atadev, "%s identify failed\n", command == ATA_C_ATAPI_IDENTIFY ? "ATAPI" : "ATA"); free(ata_parm, M_ATA); diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 75b0627..bd3d531 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -30,6 +30,7 @@ #include <sys/param.h> #include <sys/bus.h> +#include <sys/conf.h> #include <sys/rtprio.h> #include <sys/systm.h> #include <sys/interrupt.h> @@ -461,7 +462,7 @@ swi_sched(void *cookie, int flags) */ atomic_store_rel_int(&ih->ih_need, 1); if (!(flags & SWI_DELAY)) { - error = ithread_schedule(it, !cold); + error = ithread_schedule(it, !cold && !dumping); KASSERT(error == 0, ("stray software interrupt")); } } |