Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281030
b: refs/heads/master
c: a00e822
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent fbed535 commit acd9e55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 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: 59e00e744d2413430ebaa09a5fdb61e9ad02a492
refs/heads/master: a00e8224c19fa5ba3007da00d850865cbefcaabd
20 changes: 6 additions & 14 deletions trunk/drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ static int storvsc_host_reset(struct hv_device *device)

stor_device = get_out_stor_device(device);
if (!stor_device)
return -ENODEV;
return FAILED;

request = &stor_device->reset_request;
vstor_packet = &request->vstor_packet;
Expand All @@ -1036,22 +1036,19 @@ static int storvsc_host_reset(struct hv_device *device)
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0)
goto cleanup;
return FAILED;

t = wait_for_completion_timeout(&request->wait_event, 5*HZ);
if (t == 0) {
ret = -ETIMEDOUT;
goto cleanup;
}
if (t == 0)
return TIMEOUT_ERROR;


/*
* At this point, all outstanding requests in the adapter
* should have been flushed out and return to us
*/

cleanup:
return ret;
return SUCCESS;
}


Expand All @@ -1060,16 +1057,11 @@ static int storvsc_host_reset(struct hv_device *device)
*/
static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
{
int ret;
struct hv_host_device *host_dev =
(struct hv_host_device *)scmnd->device->host->hostdata;
struct hv_device *dev = host_dev->dev;

ret = storvsc_host_reset(dev);
if (ret != 0)
return ret;

return ret;
return storvsc_host_reset(dev);
}


Expand Down

0 comments on commit acd9e55

Please sign in to comment.