diff options
author | sos <sos@FreeBSD.org> | 1999-11-27 17:06:10 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1999-11-27 17:06:10 +0000 |
commit | d3243c4482eb7a852db554e8c0883150c2027df9 (patch) | |
tree | caa8cbef8ce925117b650865b23c974ae4dcbb2a /sys | |
parent | 1d8a1bacefc75efe8a785ad5987ce9891a2d00da (diff) | |
download | FreeBSD-src-d3243c4482eb7a852db554e8c0883150c2027df9.zip FreeBSD-src-d3243c4482eb7a852db554e8c0883150c2027df9.tar.gz |
call ata_reinit in addump trying to make sure the dump will succed,
also check for errors underways, and make it possible to abort the
dump by hitting a key.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata-disk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index b8a083a..3de8205 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -40,6 +40,7 @@ #include <sys/conf.h> #include <sys/disk.h> #include <sys/devicestat.h> +#include <sys/cons.h> #include <vm/vm.h> #include <vm/pmap.h> #include <vm/vm_page.h> @@ -327,6 +328,7 @@ addump(dev_t dev) if (!adp) return ENXIO; + ata_reinit(adp->controller); adp->flags &= ~AD_F_DMA_ENABLED; while (count > 0) { @@ -346,6 +348,8 @@ addump(dev_t dev) while (request.bytecount > 0) { ad_transfer(&request); + if (request.flags & AR_F_ERROR) + return EIO; request.donecount += request.currentsize; DELAY(20); } @@ -361,10 +365,12 @@ addump(dev_t dev) blkno += howmany(PAGE_SIZE, secsize); count -= howmany(PAGE_SIZE, secsize); addr += PAGE_SIZE; + if (cncheckc() != -1) + return EINTR; } if (ata_wait(adp->controller, adp->unit, ATA_S_READY | ATA_S_DSC) < 0) - printf("ad_dump: timeout waiting for final ready\n"); + printf("addump: timeout waiting for final ready\n"); return 0; } |