[Xenial][PATCH 1/1] UBUNTU: SAUCE: storvsc: use small sg_tablesize on x86

Joseph Salisbury joseph.salisbury at canonical.com
Fri Feb 12 21:01:36 UTC 2016


BugLink: http://bugs.launchpad.net/bugs/1495983

OriginalAuthor: Olaf Hering <olaf at aepfle.de>
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 3c6584f..8d9c504 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1849,6 +1849,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