aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_promise.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r--drivers/scsi/sata_promise.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index bac36d5b7c3e..77ef646b0f92 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -400,21 +400,12 @@ static void pdc_eng_timeout(struct ata_port *ap)
400 goto out; 400 goto out;
401 } 401 }
402 402
403 /* hack alert! We cannot use the supplied completion
404 * function from inside the ->eh_strategy_handler() thread.
405 * libata is the only user of ->eh_strategy_handler() in
406 * any kernel, so the default scsi_done() assumes it is
407 * not being called from the SCSI EH.
408 */
409 qc->scsidone = scsi_finish_command;
410
411 switch (qc->tf.protocol) { 403 switch (qc->tf.protocol) {
412 case ATA_PROT_DMA: 404 case ATA_PROT_DMA:
413 case ATA_PROT_NODATA: 405 case ATA_PROT_NODATA:
414 printk(KERN_ERR "ata%u: command timeout\n", ap->id); 406 printk(KERN_ERR "ata%u: command timeout\n", ap->id);
415 drv_stat = ata_wait_idle(ap); 407 drv_stat = ata_wait_idle(ap);
416 qc->err_mask |= __ac_err_mask(drv_stat); 408 qc->err_mask |= __ac_err_mask(drv_stat);
417 ata_qc_complete(qc);
418 break; 409 break;
419 410
420 default: 411 default:
@@ -424,12 +415,13 @@ static void pdc_eng_timeout(struct ata_port *ap)
424 ap->id, qc->tf.command, drv_stat); 415 ap->id, qc->tf.command, drv_stat);
425 416
426 qc->err_mask |= ac_err_mask(drv_stat); 417 qc->err_mask |= ac_err_mask(drv_stat);
427 ata_qc_complete(qc);
428 break; 418 break;
429 } 419 }
430 420
431out: 421out:
432 spin_unlock_irqrestore(&host_set->lock, flags); 422 spin_unlock_irqrestore(&host_set->lock, flags);
423 if (qc)
424 ata_eh_qc_complete(qc);
433 DPRINTK("EXIT\n"); 425 DPRINTK("EXIT\n");
434} 426}
435 427