diff options
author | grehan <grehan@FreeBSD.org> | 2008-05-08 17:55:44 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2008-05-08 17:55:44 +0000 |
commit | 1bdc8efe1532fb47d452acdf221653403243b1f7 (patch) | |
tree | ed27c635766096baa0d73e6b8ea680292df61554 /sys/dev/ata/ata-lowlevel.c | |
parent | 494160ee656e9d1bbcc0fb4d77980e3fd1d85da7 (diff) | |
download | FreeBSD-src-1bdc8efe1532fb47d452acdf221653403243b1f7.zip FreeBSD-src-1bdc8efe1532fb47d452acdf221653403243b1f7.tar.gz |
Fix panic and breakage for non-DMA ATA devices e.g. powermac macio cells.
Handle cases where dma function pointers may be NULL, and where
the max_iosize can't be derived from a DMA data structure. For
the latter, revert to the prior behaviour of using DFLTPHYS for
the max i/o size when there is no other data.
Reviewed by: marcel
No objection by: sos
Diffstat (limited to 'sys/dev/ata/ata-lowlevel.c')
-rw-r--r-- | sys/dev/ata/ata-lowlevel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c index 6dd7662..c46caa6 100644 --- a/sys/dev/ata/ata-lowlevel.c +++ b/sys/dev/ata/ata-lowlevel.c @@ -213,7 +213,9 @@ ata_begin_transaction(struct ata_request *request) printf("ata_begin_transaction OOPS!!!\n"); begin_finished: - ch->dma.unload(request); + if (ch->dma.unload) { + ch->dma.unload(request); + } return ATA_OP_FINISHED; begin_continue: |