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 010e08819886..760c56f71632 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -401,21 +401,12 @@ static void pdc_eng_timeout(struct ata_port *ap)
401 goto out; 401 goto out;
402 } 402 }
403 403
404 /* hack alert! We cannot use the supplied completion
405 * function from inside the ->eh_strategy_handler() thread.
406 * libata is the only user of ->eh_strategy_handler() in
407 * any kernel, so the default scsi_done() assumes it is
408 * not being called from the SCSI EH.
409 */
410 qc->scsidone = scsi_finish_command;
411
412 switch (qc->tf.protocol) { 404 switch (qc->tf.protocol) {
413 case ATA_PROT_DMA: 405 case ATA_PROT_DMA:
414 case ATA_PROT_NODATA: 406 case ATA_PROT_NODATA:
415 printk(KERN_ERR "ata%u: command timeout\n", ap->id); 407 printk(KERN_ERR "ata%u: command timeout\n", ap->id);
416 drv_stat = ata_wait_idle(ap); 408 drv_stat = ata_wait_idle(ap);
417 qc->err_mask |= __ac_err_mask(drv_stat); 409 qc->err_mask |= __ac_err_mask(drv_stat);
418 ata_qc_complete(qc);
419 break; 410 break;
420 411
421 default: 412 default:
@@ -425,12 +416,13 @@ static void pdc_eng_timeout(struct ata_port *ap)
425 ap->id, qc->tf.command, drv_stat); 416 ap->id, qc->tf.command, drv_stat);
426 417
427 qc->err_mask |= ac_err_mask(drv_stat); 418 qc->err_mask |= ac_err_mask(drv_stat);
428 ata_qc_complete(qc);
429 break; 419 break;
430 } 420 }
431 421
432out: 422out:
433 spin_unlock_irqrestore(&host_set->lock, flags); 423 spin_unlock_irqrestore(&host_set->lock, flags);
424 if (qc)
425 ata_eh_qc_complete(qc);
434 DPRINTK("EXIT\n"); 426 DPRINTK("EXIT\n");
435} 427}
436 428