aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-09-27 05:39:50 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-28 12:07:13 -0400
commite50362eccd8809a224cda5f71714a088ba37b2ab (patch)
tree762b753691ef8c4645efaa677b32c57fd33ecbc0 /drivers/scsi/libata-core.c
parent312f7da2824c82800ee78d6190f12854456957af (diff)
[PATCH] libata: interrupt driven pio for LLD
libata.h: libata-core: Add ATA_FLAG_PIO_POLLING flag for LLDs that expect interrupt for command completion only. sata_nv.c: sata_vsc.c: irq handler is wrapper around ata_host_intr(), can handle PIO interrupts. sata_promise.c: sata_sx4.c: sata_qstor.c: sata_mv.c: Private irq handler. Polling mode ATA_FLAG_PIO_POLLING used for compatibility. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index cc2d1308826e..f8a590e59f10 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -3356,6 +3356,25 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc)
3356{ 3356{
3357 struct ata_port *ap = qc->ap; 3357 struct ata_port *ap = qc->ap;
3358 3358
3359 /* Use polling pio if the LLD doesn't handle
3360 * interrupt driven pio and atapi CDB interrupt.
3361 */
3362 if (ap->flags & ATA_FLAG_PIO_POLLING) {
3363 switch (qc->tf.protocol) {
3364 case ATA_PROT_PIO:
3365 case ATA_PROT_ATAPI:
3366 case ATA_PROT_ATAPI_NODATA:
3367 qc->tf.flags |= ATA_TFLAG_POLLING;
3368 break;
3369 case ATA_PROT_ATAPI_DMA:
3370 if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
3371 BUG();
3372 break;
3373 default:
3374 break;
3375 }
3376 }
3377
3359 /* select the device */ 3378 /* select the device */
3360 ata_dev_select(ap, qc->dev->devno, 1, 0); 3379 ata_dev_select(ap, qc->dev->devno, 1, 0);
3361 3380