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
This commit is contained in:
alfred 2003-02-14 13:10:40 +00:00
parent 6c48c14c49
commit 268bc18ef2
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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"));
}
}