[Trusty][SRU][PATCH 2/2] UBUNTU: SAUCE: storvsc: use small sg_tablesize on x86

Joseph Salisbury joseph.salisbury at canonical.com
Mon Oct 26 19:28:36 UTC 2015


This patch is still under discussion upstream:
https://lkml.org/lkml/2015/10/2/550

However, this bug is a regression and preventing 32 bit guests
from booting on Hyper-V, so it probably worth discussing before it lands
in mainline.

OriginalAuthor: Olaf Hering <olaf at aepfle.de>
BugLink: http://bugs.launchpad.net/bugs/1495983

Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.com>
---
 drivers/scsi/storvsc_drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index f10c7f8..292bc93 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1838,6 +1838,11 @@ static int storvsc_probe(struct hv_device *device,
 	 * from the host.
 	 */
 	host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT);
+#if defined(CONFIG_X86_32)
+	dev_warn(&device->device, "adjusting sg_tablesize 0x%x -> 0x%x",
+			host->sg_tablesize, MAX_MULTIPAGE_BUFFER_COUNT);
+	host->sg_tablesize = MAX_MULTIPAGE_BUFFER_COUNT;
+#endif
 
 	/* Register the HBA and start the scsi bus scan */
 	ret = scsi_add_host(host, &device->device);
-- 
2.1.0





More information about the kernel-team mailing list