Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148039
b: refs/heads/master
c: 5c10e63
h: refs/heads/master
i:
  148037: c6eabf7
  148035: 13d6042
  148031: fb6db9f
v: v3
  • Loading branch information
Takahiro Yasui authored and James Bottomley committed May 23, 2009
1 parent 0de3011 commit 2ddf89d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: b0d428adebe9f1232c72bf4c686a6f0eed047cc2
refs/heads/master: 5c10e63c943b4c67561ddc6bf61e01d4141f881f
14 changes: 6 additions & 8 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2441,20 +2441,18 @@ int
scsi_internal_device_unblock(struct scsi_device *sdev)
{
struct request_queue *q = sdev->request_queue;
int err;
unsigned long flags;

/*
* Try to transition the scsi device to SDEV_RUNNING
* and goose the device queue if successful.
*/
err = scsi_device_set_state(sdev, SDEV_RUNNING);
if (err) {
err = scsi_device_set_state(sdev, SDEV_CREATED);

if (err)
return err;
}
if (sdev->sdev_state == SDEV_BLOCK)
sdev->sdev_state = SDEV_RUNNING;
else if (sdev->sdev_state == SDEV_CREATED_BLOCK)
sdev->sdev_state = SDEV_CREATED;
else
return -EINVAL;

spin_lock_irqsave(q->queue_lock, flags);
blk_start_queue(q);
Expand Down

0 comments on commit 2ddf89d

Please sign in to comment.