Skip to content

Commit

Permalink
[PATCH] libata irq-pio: simplify if condition in ata_dataout_task()
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Sep 30, 2005
1 parent f9997be commit 86a7397
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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);
Expand Down

0 comments on commit 86a7397

Please sign in to comment.