Skip to content

Commit 5117b93

Browse files
kattisrinivasanJames Bottomley
authored and
James Bottomley
committed
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 <[email protected]> Reviewed-by: Long Li <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 0147dab commit 5117b93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/scsi/storvsc_drv.c

+6
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ struct storvsc_device {
377377
unsigned char path_id;
378378
unsigned char target_id;
379379

380+
/*
381+
* Max I/O, the device can support.
382+
*/
383+
u32 max_transfer_bytes;
380384
/* Used for vsc/vsp channel reset process */
381385
struct storvsc_cmd_request init_request;
382386
struct storvsc_cmd_request reset_request;
@@ -974,6 +978,8 @@ static int storvsc_channel_init(struct hv_device *device)
974978
STORAGE_CHANNEL_SUPPORTS_MULTI_CHANNEL)
975979
process_sub_channels = true;
976980
}
981+
stor_device->max_transfer_bytes =
982+
vstor_packet->storage_channel_properties.max_transfer_bytes;
977983

978984
memset(vstor_packet, 0, sizeof(struct vstor_packet));
979985
vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION;

0 commit comments

Comments
 (0)