diff options
-rw-r--r-- | drivers/scsi/libata-core.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index cf5a138cdde5..02a7a9eb464d 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3407,24 +3407,24 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
3407 | 3407 | ||
3408 | ata_tf_to_host_nolock(ap, &qc->tf); | 3408 | ata_tf_to_host_nolock(ap, &qc->tf); |
3409 | 3409 | ||
3410 | if (qc->tf.flags & ATA_TFLAG_POLLING) { | 3410 | if (qc->tf.flags & ATA_TFLAG_WRITE) { |
3411 | /* polling PIO */ | 3411 | /* PIO data out protocol */ |
3412 | ap->hsm_task_state = HSM_ST; | 3412 | ap->hsm_task_state = HSM_ST_FIRST; |
3413 | queue_work(ata_wq, &ap->pio_task); | 3413 | queue_work(ata_wq, &ap->dataout_task); |
3414 | |||
3415 | /* always send first data block using | ||
3416 | * the ata_dataout_task() codepath. | ||
3417 | */ | ||
3414 | } else { | 3418 | } else { |
3415 | /* interrupt driven PIO */ | 3419 | /* PIO data in protocol */ |
3416 | if (qc->tf.flags & ATA_TFLAG_WRITE) { | 3420 | ap->hsm_task_state = HSM_ST; |
3417 | /* PIO data out protocol */ | 3421 | |
3418 | ap->hsm_task_state = HSM_ST_FIRST; | 3422 | if (qc->tf.flags & ATA_TFLAG_POLLING) |
3419 | queue_work(ata_wq, &ap->dataout_task); | 3423 | queue_work(ata_wq, &ap->pio_task); |
3420 | 3424 | ||
3421 | /* send first data block by polling */ | 3425 | /* if polling, ata_pio_task() handles the rest. |
3422 | } else { | 3426 | * otherwise, interrupt handler takes over from here. |
3423 | /* PIO data in protocol */ | 3427 | */ |
3424 | ap->hsm_task_state = HSM_ST; | ||
3425 | |||
3426 | /* interrupt handler takes over from here */ | ||
3427 | } | ||
3428 | } | 3428 | } |
3429 | 3429 | ||
3430 | break; | 3430 | break; |
@@ -4005,15 +4005,15 @@ static void ata_dataout_task(void *_data) | |||
4005 | ap->hsm_task_state = HSM_ST; | 4005 | ap->hsm_task_state = HSM_ST; |
4006 | ata_pio_sector(qc); | 4006 | ata_pio_sector(qc); |
4007 | ata_altstatus(ap); /* flush */ | 4007 | ata_altstatus(ap); /* flush */ |
4008 | 4008 | } else | |
4009 | /* interrupt handler takes over from here */ | ||
4010 | } else { | ||
4011 | /* send CDB */ | 4009 | /* send CDB */ |
4012 | atapi_send_cdb(ap, qc); | 4010 | atapi_send_cdb(ap, qc); |
4013 | 4011 | ||
4014 | if (qc->tf.flags & ATA_TFLAG_POLLING) | 4012 | /* if polling, ata_pio_task() handles the rest. |
4015 | queue_work(ata_wq, &ap->pio_task); | 4013 | * otherwise, interrupt handler takes over from here. |
4016 | } | 4014 | */ |
4015 | if (qc->tf.flags & ATA_TFLAG_POLLING) | ||
4016 | queue_work(ata_wq, &ap->pio_task); | ||
4017 | 4017 | ||
4018 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | 4018 | spin_unlock_irqrestore(&ap->host_set->lock, flags); |
4019 | 4019 | ||