diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-10 01:10:48 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-10 06:50:47 -0500 |
commit | f63790201521ccadb63673ff121dac46ab300cf0 (patch) | |
tree | 86781b4efc31f9005c17de63df2606c35ae3b0c0 /drivers/scsi/sata_promise.c | |
parent | 35daeb8f9b41fd13180e8a6f8bec9fc5268938f9 (diff) |
[PATCH] libata: kill NULL qc handling from ->eng_timeout callbacks
->eng_timeout cannot be invoked with NULL qc anymore. Add an
assertion in ata_scsi_error() and kill NULL qc handling from all
->eng_timeout callbacks.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r-- | drivers/scsi/sata_promise.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 5d4ed54d9452..c9dfd9370919 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -432,11 +432,6 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
432 | spin_lock_irqsave(&host_set->lock, flags); | 432 | spin_lock_irqsave(&host_set->lock, flags); |
433 | 433 | ||
434 | qc = ata_qc_from_tag(ap, ap->active_tag); | 434 | qc = ata_qc_from_tag(ap, ap->active_tag); |
435 | if (!qc) { | ||
436 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", | ||
437 | ap->id); | ||
438 | goto out; | ||
439 | } | ||
440 | 435 | ||
441 | switch (qc->tf.protocol) { | 436 | switch (qc->tf.protocol) { |
442 | case ATA_PROT_DMA: | 437 | case ATA_PROT_DMA: |
@@ -456,10 +451,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
456 | break; | 451 | break; |
457 | } | 452 | } |
458 | 453 | ||
459 | out: | ||
460 | spin_unlock_irqrestore(&host_set->lock, flags); | 454 | spin_unlock_irqrestore(&host_set->lock, flags); |
461 | if (qc) | 455 | ata_eh_qc_complete(qc); |
462 | ata_eh_qc_complete(qc); | ||
463 | DPRINTK("EXIT\n"); | 456 | DPRINTK("EXIT\n"); |
464 | } | 457 | } |
465 | 458 | ||