]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: hv: Add support for >2 TB LUN in storage driver.
authorMike Sterling <mike.sterling@microsoft.com>
Tue, 6 Sep 2011 23:10:55 +0000 (16:10 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:42:15 +0000 (09:42 -0800)
commit cf55f4a8b6243b42fb91c56d1421db0d36d60f96 upstream.

If a LUN larger than 2 TB is attached to a Linux VM on Hyper-V, we currently
report a maximum size of 2 TB. This patch resolves the issue in hv_storvsc.
Thanks to Robert Scheck <robert.scheck@etes.de> for reporting the issue.

Reported-by: Robert Scheck <robert.scheck@etes.de>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: K.Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hyperv_storage.h
drivers/staging/hv/storvsc_drv.c

index a01f9a07c988961c0389eb60ffb794a0ce87743f..5af82f4235bdddce71a4c56960cdfdecbc16f3bd 100644 (file)
@@ -218,6 +218,7 @@ struct vstor_packet {
 #define STORVSC_MAX_LUNS_PER_TARGET                    64
 #define STORVSC_MAX_TARGETS                            1
 #define STORVSC_MAX_CHANNELS                           1
+#define STORVSC_MAX_CMD_LEN                            16
 
 struct hv_storvsc_request;
 
index 7effaf32e25f531a0787ca2dfbdb56d6d638f8f5..26983ac1ae429f054342439a5a18ce3652a62846 100644 (file)
@@ -701,6 +701,8 @@ static int storvsc_probe(struct hv_device *device)
        host->max_id = STORVSC_MAX_TARGETS;
        /* max # of channels */
        host->max_channel = STORVSC_MAX_CHANNELS - 1;
+       /* max cmd length */
+       host->max_cmd_len = STORVSC_MAX_CMD_LEN;
 
        /* Register the HBA and start the scsi bus scan */
        ret = scsi_add_host(host, &device->device);