]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/scsi/storvsc_drv.c
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / drivers / scsi / storvsc_drv.c
index 3cc8d67783a1d1ab53d1acfdc2a25caa9baa6a47..b9f64823dd7a5b1417c7fe25a1227460639c6178 100644 (file)
@@ -1640,6 +1640,8 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
        put_cpu();
 
        if (ret == -EAGAIN) {
+               if (payload_sz > sizeof(cmd_request->mpb))
+                       kfree(payload);
                /* no more space */
                return SCSI_MLQUEUE_DEVICE_BUSY;
        }
@@ -1795,6 +1797,12 @@ 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
+
        /*
         * Set the number of HW queues we are supporting.
         */