aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorMike Anderson <andmike@us.ibm.com>2005-06-16 11:13:42 -0700
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-30 11:11:37 -0500
commitd2c9d9eafa03dbd08a8a439e6c5addb8b1f03b9b (patch)
tree2af0c85e0ffddf593821c961f0a5e729de8c6ccc /drivers/scsi/hosts.c
parentd3301874083874f8a0ac88aa1bb7da6b62df34d2 (diff)
[SCSI] host state model update: reimplement scsi_host_cancel
Remove the old scsi_host_cancel function as it has not been working for sometime do to the device list possibly being empty when it is called and possible race issues. Add setting of SHOST_CANCEL at the state of beginning of scsi_remove_host. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 6828ca305c2..67c4c0c3aa5 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -128,29 +128,13 @@ int scsi_host_set_state(struct Scsi_Host *shost, enum scsi_host_state state)
EXPORT_SYMBOL(scsi_host_set_state);
/**
- * scsi_host_cancel - cancel outstanding IO to this host
- * @shost: pointer to struct Scsi_Host
- * recovery: recovery requested to run.
- **/
-static void scsi_host_cancel(struct Scsi_Host *shost, int recovery)
-{
- struct scsi_device *sdev;
-
- scsi_host_set_state(shost, SHOST_CANCEL);
- shost_for_each_device(sdev, shost) {
- scsi_device_cancel(sdev, recovery);
- }
- wait_event(shost->host_wait, (shost->shost_state != SHOST_RECOVERY));
-}
-
-/**
* scsi_remove_host - remove a scsi host
* @shost: a pointer to a scsi host to remove
**/
void scsi_remove_host(struct Scsi_Host *shost)
{
+ scsi_host_set_state(shost, SHOST_CANCEL);
scsi_forget_host(shost);
- scsi_host_cancel(shost, 0);
scsi_proc_host_rm(shost);
scsi_host_set_state(shost, SHOST_DEL);