From patchwork Tue Sep 8 10:06:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 7139731 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 69DE99F380 for ; Tue, 8 Sep 2015 10:13:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84029206F5 for ; Tue, 8 Sep 2015 10:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55EF4206F4 for ; Tue, 8 Sep 2015 10:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754312AbbIHKM7 (ORCPT ); Tue, 8 Sep 2015 06:12:59 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.216]:45331 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553AbbIHKM7 (ORCPT ); Tue, 8 Sep 2015 06:12:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1441707177; l=1053; s=domk; d=aepfle.de; h=Date:Subject:Cc:To:From; bh=LcAsJBiL+3xsRbfEu3pNp+T4GQYI3jH5T7VKNWzyZHk=; b=KovMKFkJ/VQyRXdEP9CVsFI9Ne3KQ2QYx5FNcjvN8NA6I7y3bZqyIA20kW6GoTF/3Jk k/DWl1Pgp9JE1562jYTGiLlCLyFoIJNJwtI/SxoWsqn49CQL49PbU0z7NutoHHAbmRyFC 4mRg3riFIXQUyb2IFoxC+z9b+UuieVuMGoI= X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWi/zfN1cLnDYU0tRQWJl4Hh2o4ySGRMBlDHYMqccew1oDb73L4= X-RZG-CLASS-ID: mo00 Received: from probook.fritz.box ([2001:a62:46:a201:1ec1:deff:feb9:bb48]) by smtp.strato.de (RZmta 37.12 AUTH) with ESMTPSA id w06a6fr88A6mVSP (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 8 Sep 2015 12:06:48 +0200 (CEST) Received: by probook.fritz.box (Postfix, from userid 1000) id D66EF50898; Tue, 8 Sep 2015 12:06:47 +0200 (CEST) From: Olaf Hering To: kys@microsoft.com, haiyangz@microsoft.com, JBottomley@odin.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Olaf Hering Subject: [PATCH] storvsc: use small sg_tablesize on x86 Date: Tue, 8 Sep 2015 10:06:41 +0000 Message-Id: <1441706801-15300-1-git-send-email-olaf@aepfle.de> X-Mailer: git-send-email 2.5.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reducing the sg_tablesize allows booting of 32bit kernels in VMs, after commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set the tablesize based on the information given by the host") [ 5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20 Signed-off-by: Olaf Hering Reviewed-by: K. Y. Srinivasan --- drivers/scsi/storvsc_drv.c | 5 +++++ 1 file changed, 5 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 40c43ae..36bf183 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1907,6 +1907,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);