Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249574
b: refs/heads/master
c: 01415ab
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 11, 2011
1 parent 9a41219 commit 2cab084
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 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: 9d41889fd6fecd106c68cc1062f6bce5bda5bdb4
refs/heads/master: 01415ab3d24e5e53b6b581869bc368f78e397ccb
30 changes: 15 additions & 15 deletions trunk/drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ static int storvsc_initialize(struct hv_driver *driver)
memcpy(&driver->dev_type, &gStorVscDeviceType,
sizeof(struct hv_guid));


/*
* Divide the ring buffer data size (which is 1 page less
* than the ring buffer size since that page is reserved for
* the ring buffer indices) by the max request size (which is
* vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
*/
stor_driver->max_outstanding_req_per_channel =
((stor_driver->ring_buffer_size - PAGE_SIZE) /
ALIGN(MAX_MULTIPAGE_BUFFER_PACKET +
sizeof(struct vstor_packet) + sizeof(u64),
sizeof(u64)));


return 0;
}

Expand Down Expand Up @@ -797,13 +783,27 @@ static int storvsc_drv_init(void)
int ret;
struct storvsc_driver *storvsc_drv_obj = &storvsc_drv;
struct hv_driver *drv = &storvsc_drv.base;
u32 max_outstanding_req_per_channel;

/*
* Divide the ring buffer data size (which is 1 page less
* than the ring buffer size since that page is reserved for
* the ring buffer indices) by the max request size (which is
* vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
*/

max_outstanding_req_per_channel =
((storvsc_ringbuffer_size - PAGE_SIZE) /
ALIGN(MAX_MULTIPAGE_BUFFER_PACKET +
sizeof(struct vstor_packet) + sizeof(u64),
sizeof(u64)));

storvsc_drv_obj->ring_buffer_size = storvsc_ringbuffer_size;

/* Callback to client driver to complete the initialization */
storvsc_initialize(&storvsc_drv_obj->base);

if (storvsc_drv_obj->max_outstanding_req_per_channel <
if (max_outstanding_req_per_channel <
STORVSC_MAX_IO_REQUESTS)
return -1;

Expand Down

0 comments on commit 2cab084

Please sign in to comment.