From d4e9952a49981e70344692494fd33e254e4eebf5 Mon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <email address hidden>
Date: Mon, 15 Dec 2014 16:49:26 -0800
Subject: [PATCH 3/4] Drivers: scsi: storvsc: Fix a bug in storvsc limits
Commit 4cd83ecdac20d30725b4f96e5d7814a1e290bc7e changed the limits to
reflect the values on the host. It turns out that WS2008R2 cannot
correctly handle these new limits. Fix this bug by setting the limits
based on the host.
Signed-off-by: K. Y. Srinivasan <email address hidden>
---
drivers/scsi/storvsc_drv.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index a7163c6..fdc5164 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1782,6 +1782,9 @@ static int storvsc_probe(struct hv_device *device,
bool dev_is_ide = ((dev_id->driver_data == IDE_GUID) ? true : false);
int target = 0;
struct storvsc_device *stor_device;
+ int max_luns_per_target;
+ int max_targets;
+ int max_channels;
/*
* Based on the windows host we are running on,
@@ -1795,12 +1798,18 @@ static int storvsc_probe(struct hv_device *device, vmscsi_size_delta = sizeof(struct vmscsi_win8_extension); vmstor_current_major = VMSTOR_WIN7_MAJOR; vmstor_current_minor = VMSTOR_WIN7_MINOR;
+ max_luns_per_target = STORVSC_IDE_MAX_LUNS_PER_TARGET;
+ max_targets = STORVSC_IDE_MAX_TARGETS;
+ max_channels = STORVSC_IDE_MAX_CHANNELS; break;
default: sense_buffer_size = POST_WIN7_STORVSC_SENSE_BUFFER_SIZE; vmscsi_size_delta = 0; vmstor_current_major = VMSTOR_WIN8_MAJOR; vmstor_current_minor = VMSTOR_WIN8_MINOR;
+ max_luns_per_target = STORVSC_MAX_LUNS_PER_TARGET;
+ max_targets = STORVSC_MAX_TARGETS;
+ max_channels = STORVSC_MAX_CHANNELS; break;
}
@@ -1848,9 +1857,9 @@ static int storvsc_probe(struct hv_device *device, break;
The patch has been sent out.
From d4e9952a49981e7 0344692494fd33e 254e4eebf5 Mon Sep 17 00:00:00 2001
From: K. Y. Srinivasan <email address hidden>
Date: Mon, 15 Dec 2014 16:49:26 -0800
Subject: [PATCH 3/4] Drivers: scsi: storvsc: Fix a bug in storvsc limits
Commit 4cd83ecdac20d30 725b4f96e5d7814 a1e290bc7e changed the limits to
reflect the values on the host. It turns out that WS2008R2 cannot
correctly handle these new limits. Fix this bug by setting the limits
based on the host.
Signed-off-by: K. Y. Srinivasan <email address hidden> scsi/storvsc_ drv.c | 15 ++++++++++++---
---
drivers/
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/ scsi/storvsc_ drv.c b/drivers/ scsi/storvsc_ drv.c scsi/storvsc_ drv.c scsi/storvsc_ drv.c probe(struct hv_device *device, >driver_ data == IDE_GUID) ? true : false); per_target;
index a7163c6..fdc5164 100644
--- a/drivers/
+++ b/drivers/
@@ -1782,6 +1782,9 @@ static int storvsc_
bool dev_is_ide = ((dev_id-
int target = 0;
struct storvsc_device *stor_device;
+ int max_luns_
+ int max_targets;
+ int max_channels;
/* probe(struct hv_device *device,
vmscsi_ size_delta = sizeof(struct vmscsi_ win8_extension) ;
vmstor_ current_ major = VMSTOR_WIN7_MAJOR;
vmstor_ current_ minor = VMSTOR_WIN7_MINOR; IDE_MAX_ LUNS_PER_ TARGET; IDE_MAX_ TARGETS; IDE_MAX_ CHANNELS;
break;
sense_ buffer_ size = POST_WIN7_ STORVSC_ SENSE_BUFFER_ SIZE;
vmscsi_ size_delta = 0;
vmstor_ current_ major = VMSTOR_WIN8_MAJOR;
vmstor_ current_ minor = VMSTOR_WIN8_MINOR; MAX_LUNS_ PER_TARGET; MAX_TARGETS; MAX_CHANNELS;
break;
* Based on the windows host we are running on,
@@ -1795,12 +1798,18 @@ static int storvsc_
+ max_luns_per_target = STORVSC_
+ max_targets = STORVSC_
+ max_channels = STORVSC_
default:
+ max_luns_per_target = STORVSC_
+ max_targets = STORVSC_
+ max_channels = STORVSC_
}
@@ -1848,9 +1857,9 @@ static int storvsc_ probe(struct hv_device *device,
break;
case SCSI_GUID: MAX_LUNS_ PER_TARGET; MAX_TARGETS; MAX_CHANNELS - 1; per_target;
break;
- host->max_lun = STORVSC_
- host->max_id = STORVSC_
- host->max_channel = STORVSC_
+ host->max_lun = max_luns_
+ host->max_id = max_targets;
+ host->max_channel = max_channels - 1;
default:
--