diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2006-03-25 17:56:55 +0800 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:21:54 -0500 |
commit | c2bbc551615c21a4c280c797987dbb50f2701594 (patch) | |
tree | 8f23c49dceec2123663377c4750ea48fb46d8fea /drivers/scsi/libata-core.c | |
parent | 27cdadef6dfe0d0614653919a110fc75ab1650ce (diff) | |
download | lwn-c2bbc551615c21a4c280c797987dbb50f2701594.tar.gz lwn-c2bbc551615c21a4c280c797987dbb50f2701594.zip |
[PATCH] libata-dev: ata_check_atapi_dma() fix for ATA_FLAG_PIO_POLLING LLDDs
ata_check_atapi_dma() fix for LLDDs with the ATA_FLAG_PIO_POLLING flag.
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index ef0d0dd90e17..61c120dae74d 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2883,6 +2883,15 @@ int ata_check_atapi_dma(struct ata_queued_cmd *qc) if (ap->ops->check_atapi_dma) rc = ap->ops->check_atapi_dma(qc); + /* We don't support polling DMA. + * Use PIO if the LLDD handles only interrupts in + * the HSM_ST_LAST state and the ATAPI device + * generates CDB interrupts. + */ + if ((ap->flags & ATA_FLAG_PIO_POLLING) && + (qc->dev->flags & ATA_DFLAG_CDB_INTR)) + rc = 1; + return rc; } /** @@ -4038,6 +4047,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) break; case ATA_PROT_ATAPI_DMA: if (qc->dev->flags & ATA_DFLAG_CDB_INTR) + /* see ata_check_atapi_dma() */ BUG(); break; default: |