Commit 5117b936 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by James Bottomley

scsi: storvsc: Retrieve information about the capability of the target

The storage protocol informs the guest of the I/O capabilities of the storage
stack. Retrieve this information and use it in the guest.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: default avatarLong Li <longli@microsoft.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 0147dabc
...@@ -377,6 +377,10 @@ struct storvsc_device { ...@@ -377,6 +377,10 @@ struct storvsc_device {
unsigned char path_id; unsigned char path_id;
unsigned char target_id; unsigned char target_id;
/*
* Max I/O, the device can support.
*/
u32 max_transfer_bytes;
/* Used for vsc/vsp channel reset process */ /* Used for vsc/vsp channel reset process */
struct storvsc_cmd_request init_request; struct storvsc_cmd_request init_request;
struct storvsc_cmd_request reset_request; struct storvsc_cmd_request reset_request;
...@@ -974,6 +978,8 @@ static int storvsc_channel_init(struct hv_device *device) ...@@ -974,6 +978,8 @@ static int storvsc_channel_init(struct hv_device *device)
STORAGE_CHANNEL_SUPPORTS_MULTI_CHANNEL) STORAGE_CHANNEL_SUPPORTS_MULTI_CHANNEL)
process_sub_channels = true; process_sub_channels = true;
} }
stor_device->max_transfer_bytes =
vstor_packet->storage_channel_properties.max_transfer_bytes;
memset(vstor_packet, 0, sizeof(struct vstor_packet)); memset(vstor_packet, 0, sizeof(struct vstor_packet));
vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION; vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment