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_sx4.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_sx4.c')
-rw-r--r-- | drivers/scsi/sata_sx4.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 3319f03b61a0..212cff4fe5f5 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -867,11 +867,6 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
867 | spin_lock_irqsave(&host_set->lock, flags); | 867 | spin_lock_irqsave(&host_set->lock, flags); |
868 | 868 | ||
869 | qc = ata_qc_from_tag(ap, ap->active_tag); | 869 | qc = ata_qc_from_tag(ap, ap->active_tag); |
870 | if (!qc) { | ||
871 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", | ||
872 | ap->id); | ||
873 | goto out; | ||
874 | } | ||
875 | 870 | ||
876 | switch (qc->tf.protocol) { | 871 | switch (qc->tf.protocol) { |
877 | case ATA_PROT_DMA: | 872 | case ATA_PROT_DMA: |
@@ -890,10 +885,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
890 | break; | 885 | break; |
891 | } | 886 | } |
892 | 887 | ||
893 | out: | ||
894 | spin_unlock_irqrestore(&host_set->lock, flags); | 888 | spin_unlock_irqrestore(&host_set->lock, flags); |
895 | if (qc) | 889 | ata_eh_qc_complete(qc); |
896 | ata_eh_qc_complete(qc); | ||
897 | DPRINTK("EXIT\n"); | 890 | DPRINTK("EXIT\n"); |
898 | } | 891 | } |
899 | 892 | ||