]> err.no Git - linux-2.6/commitdiff
[PATCH] libata irq-pio: simplify if condition in ata_dataout_task()
authorAlbert Lee <albertcc@tw.ibm.com>
Fri, 30 Sep 2005 11:11:35 +0000 (19:11 +0800)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 30 Sep 2005 11:21:06 +0000 (07:21 -0400)
- Use if (qc->tf.protocol == ATA_PROT_PIO) instead of
if(is_atapi_taskfile()) in ata_dataout_task()

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/scsi/libata-core.c

index a63758da4892344644cab842f00aebb83a6ffe62..cf5a138cdde51dae4a81e4a04abfb75cf46a540f 100644 (file)
@@ -3994,13 +3994,7 @@ static void ata_dataout_task(void *_data)
         */
        spin_lock_irqsave(&ap->host_set->lock, flags);
 
-       if (is_atapi_taskfile(&qc->tf)) {
-               /* send CDB */
-               atapi_send_cdb(ap, qc);
-
-               if (qc->tf.flags & ATA_TFLAG_POLLING)
-                       queue_work(ata_wq, &ap->pio_task);
-       } else {
+       if (qc->tf.protocol == ATA_PROT_PIO) {
                /* PIO data out protocol.
                 * send first data block.
                 */
@@ -4013,6 +4007,12 @@ static void ata_dataout_task(void *_data)
                ata_altstatus(ap); /* flush */
 
                /* interrupt handler takes over from here */
+       } else {
+               /* send CDB */
+               atapi_send_cdb(ap, qc);
+
+               if (qc->tf.flags & ATA_TFLAG_POLLING)
+                       queue_work(ata_wq, &ap->pio_task);
        }
 
        spin_unlock_irqrestore(&ap->host_set->lock, flags);