Skip to content

Commit

Permalink
[PATCH] libata: fix ata_port_detach() for old EH ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo committed Aug 4, 2006
1 parent f1d39b2 commit c3cf30a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5558,7 +5558,7 @@ void ata_port_detach(struct ata_port *ap)
int i;

if (!ap->ops->error_handler)
return;
goto skip_eh;

/* tell EH we're leaving & flush EH */
spin_lock_irqsave(ap->lock, flags);
Expand Down Expand Up @@ -5594,6 +5594,7 @@ void ata_port_detach(struct ata_port *ap)
cancel_delayed_work(&ap->hotplug_task);
flush_workqueue(ata_aux_wq);

skip_eh:
/* remove the associated SCSI host */
scsi_remove_host(ap->host);
}
Expand Down

0 comments on commit c3cf30a

Please sign in to comment.