]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.1.1/staging-hv-add-support-for-2-tb-lun-in-storage-driver.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / staging-hv-add-support-for-2-tb-lun-in-storage-driver.patch
1 From cf55f4a8b6243b42fb91c56d1421db0d36d60f96 Mon Sep 17 00:00:00 2001
2 From: Mike Sterling <mike.sterling@microsoft.com>
3 Date: Tue, 6 Sep 2011 16:10:55 -0700
4 Subject: Staging: hv: Add support for >2 TB LUN in storage driver.
5
6 From: Mike Sterling <mike.sterling@microsoft.com>
7
8 commit cf55f4a8b6243b42fb91c56d1421db0d36d60f96 upstream.
9
10 If a LUN larger than 2 TB is attached to a Linux VM on Hyper-V, we currently
11 report a maximum size of 2 TB. This patch resolves the issue in hv_storvsc.
12 Thanks to Robert Scheck <robert.scheck@etes.de> for reporting the issue.
13
14 Reported-by: Robert Scheck <robert.scheck@etes.de>
15 Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
16 Signed-off-by: K.Y. Srinivasan <kys@microsoft.com>
17 Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 drivers/staging/hv/hyperv_storage.h | 1 +
22 drivers/staging/hv/storvsc_drv.c | 2 ++
23 2 files changed, 3 insertions(+)
24
25 --- a/drivers/staging/hv/hyperv_storage.h
26 +++ b/drivers/staging/hv/hyperv_storage.h
27 @@ -218,6 +218,7 @@ struct vstor_packet {
28 #define STORVSC_MAX_LUNS_PER_TARGET 64
29 #define STORVSC_MAX_TARGETS 1
30 #define STORVSC_MAX_CHANNELS 1
31 +#define STORVSC_MAX_CMD_LEN 16
32
33 struct hv_storvsc_request;
34
35 --- a/drivers/staging/hv/storvsc_drv.c
36 +++ b/drivers/staging/hv/storvsc_drv.c
37 @@ -701,6 +701,8 @@ static int storvsc_probe(struct hv_devic
38 host->max_id = STORVSC_MAX_TARGETS;
39 /* max # of channels */
40 host->max_channel = STORVSC_MAX_CHANNELS - 1;
41 + /* max cmd length */
42 + host->max_cmd_len = STORVSC_MAX_CMD_LEN;
43
44 /* Register the HBA and start the scsi bus scan */
45 ret = scsi_add_host(host, &device->device);