Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7959
b: refs/heads/master
c: 26186ba
h: refs/heads/master
i:
  7957: b66e508
  7955: 5e5c294
  7951: 4dc28e0
v: v3
  • Loading branch information
Matthew Dharm authored and Greg Kroah-Hartman committed Sep 8, 2005
1 parent 0521dde commit a739fc5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77f46328fb83b64befd889ebce6d7fb959932509
refs/heads/master: 26186ba77b493204ae0fadc3c88a67b14f22168f
13 changes: 13 additions & 0 deletions trunk/drivers/usb/storage/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,19 @@ static void quiesce_and_remove_host(struct us_data *us)
/* Wait for the current command to finish, then remove the host */
down(&us->dev_semaphore);
up(&us->dev_semaphore);

/* queuecommand won't accept any new commands and the control
* thread won't execute a previously-queued command. If there
* is such a command pending, complete it with an error. */
if (us->srb) {
us->srb->result = DID_NO_CONNECT << 16;
scsi_lock(us_to_host(us));
us->srb->scsi_done(us->srb);
us->srb = NULL;
scsi_unlock(us_to_host(us));
}

/* Now we own no commands so it's safe to remove the SCSI host */
scsi_remove_host(us_to_host(us));
}

Expand Down

0 comments on commit a739fc5

Please sign in to comment.