diff options
author | Tejun Heo <htejun@gmail.com> | 2006-08-04 14:59:11 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-08-04 14:59:11 -0400 |
commit | c3cf30a989efec8144225517e0b2f82c955e3966 (patch) | |
tree | 0f4a134253a6e6d306509d617201dbea346b9536 /drivers/scsi | |
parent | f1d39b291e2263f5e2f2ec5d4061802f76d8ae67 (diff) |
[PATCH] libata: fix ata_port_detach() for old EH ports
ata_prot_detach() did nothing for old EH ports and thus SCSI hosts
associated with those ports are left dangling after they are detached
leaving stale devices and causing oops eventually. Make
ata_port_detach() remove SCSI hosts for old EH ports.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 386e5f21e191..bca92dd3a454 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -5558,7 +5558,7 @@ void ata_port_detach(struct ata_port *ap) | |||
5558 | int i; | 5558 | int i; |
5559 | 5559 | ||
5560 | if (!ap->ops->error_handler) | 5560 | if (!ap->ops->error_handler) |
5561 | return; | 5561 | goto skip_eh; |
5562 | 5562 | ||
5563 | /* tell EH we're leaving & flush EH */ | 5563 | /* tell EH we're leaving & flush EH */ |
5564 | spin_lock_irqsave(ap->lock, flags); | 5564 | spin_lock_irqsave(ap->lock, flags); |
@@ -5594,6 +5594,7 @@ void ata_port_detach(struct ata_port *ap) | |||
5594 | cancel_delayed_work(&ap->hotplug_task); | 5594 | cancel_delayed_work(&ap->hotplug_task); |
5595 | flush_workqueue(ata_aux_wq); | 5595 | flush_workqueue(ata_aux_wq); |
5596 | 5596 | ||
5597 | skip_eh: | ||
5597 | /* remove the associated SCSI host */ | 5598 | /* remove the associated SCSI host */ |
5598 | scsi_remove_host(ap->host); | 5599 | scsi_remove_host(ap->host); |
5599 | } | 5600 | } |