aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2015-03-27 03:27:17 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 16:22:11 -0400
commit5117b93696fae092be92acf1b80ae19cb28f4ba3 (patch)
tree638ec500cf800b939fa911a31f8082b9f0d3d7e1
parent0147dabc4404b3c91d65a47151283d9aa478b666 (diff)
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: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r--drivers/scsi/storvsc_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 0ba7f2cbbbc3..cdf048ba4d2d 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -377,6 +377,10 @@ struct storvsc_device {
377 unsigned char path_id; 377 unsigned char path_id;
378 unsigned char target_id; 378 unsigned char target_id;
379 379
380 /*
381 * Max I/O, the device can support.
382 */
383 u32 max_transfer_bytes;
380 /* Used for vsc/vsp channel reset process */ 384 /* Used for vsc/vsp channel reset process */
381 struct storvsc_cmd_request init_request; 385 struct storvsc_cmd_request init_request;
382 struct storvsc_cmd_request reset_request; 386 struct storvsc_cmd_request reset_request;
@@ -974,6 +978,8 @@ static int storvsc_channel_init(struct hv_device *device)
974 STORAGE_CHANNEL_SUPPORTS_MULTI_CHANNEL) 978 STORAGE_CHANNEL_SUPPORTS_MULTI_CHANNEL)
975 process_sub_channels = true; 979 process_sub_channels = true;
976 } 980 }
981 stor_device->max_transfer_bytes =
982 vstor_packet->storage_channel_properties.max_transfer_bytes;
977 983
978 memset(vstor_packet, 0, sizeof(struct vstor_packet)); 984 memset(vstor_packet, 0, sizeof(struct vstor_packet));
979 vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION; 985 vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION;