Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7647
b: refs/heads/master
c: d2c9d9e
h: refs/heads/master
i:
  7645: 84bc879
  7643: 5a2b036
  7639: 50841c0
  7631: e54e6bf
  7615: 7d956d5
v: v3
  • Loading branch information
Mike Anderson authored and James Bottomley committed Jul 30, 2005
1 parent a90f452 commit 6cc12fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3301874083874f8a0ac88aa1bb7da6b62df34d2
refs/heads/master: d2c9d9eafa03dbd08a8a439e6c5addb8b1f03b9b
18 changes: 1 addition & 17 deletions trunk/drivers/scsi/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,30 +127,14 @@ 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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
spin_lock_irqsave(host->host_lock, flags);
scsi_cmd_get_serial(host, cmd);

if (unlikely(host->shost_state == SHOST_CANCEL)) {
if (unlikely(host->shost_state == SHOST_DEL)) {
cmd->result = (DID_NO_CONNECT << 16);
scsi_done(cmd);
} else {
Expand Down

0 comments on commit 6cc12fc

Please sign in to comment.