From patchwork Fri Dec 7 22:28:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 10718953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D1B9109C for ; Fri, 7 Dec 2018 22:28:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A9902D8A2 for ; Fri, 7 Dec 2018 22:28:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E0522DA76; Fri, 7 Dec 2018 22:28:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 931772D8A2 for ; Fri, 7 Dec 2018 22:28:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726076AbeLGW2o (ORCPT ); Fri, 7 Dec 2018 17:28:44 -0500 Received: from mail-eopbgr770071.outbound.protection.outlook.com ([40.107.77.71]:31455 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726008AbeLGW2o (ORCPT ); Fri, 7 Dec 2018 17:28:44 -0500 Received: from BN6PR19CA0073.namprd19.prod.outlook.com (2603:10b6:404:133::11) by DM5PR19MB0940.namprd19.prod.outlook.com (2603:10b6:3:32::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.17; Fri, 7 Dec 2018 22:28:25 +0000 Received: from BN1AFFO11FD015.protection.gbl (2a01:111:f400:7c10::136) by BN6PR19CA0073.outlook.office365.com (2603:10b6:404:133::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19 via Frontend Transport; Fri, 7 Dec 2018 22:28:25 +0000 Authentication-Results: spf=pass (sender IP is 208.19.99.221) smtp.mailfrom=microsemi.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.99.221 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.99.221; helo=AUSMBX1.microsemi.net; Received: from AUSMBX1.microsemi.net (208.19.99.221) by BN1AFFO11FD015.mail.protection.outlook.com (10.58.52.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.1404.13 via Frontend Transport; Fri, 7 Dec 2018 22:28:24 +0000 Received: from AUSMBX2.microsemi.net (10.201.34.32) by AUSMBX1.microsemi.net (10.201.34.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Fri, 7 Dec 2018 16:28:23 -0600 Received: from [127.0.1.1] (10.238.32.34) by ausmbx2.microsemi.net (10.201.34.32) with Microsoft SMTP Server id 15.1.1531.3 via Frontend Transport; Fri, 7 Dec 2018 16:28:23 -0600 Subject: [PATCH 03/20] smartpqi: add no_write_same for logical volumes From: Don Brace To: , , , , , , , , , , , CC: Date: Fri, 7 Dec 2018 16:28:23 -0600 Message-ID: <154422170303.1218.5869815246528180397.stgit@brunhilda> In-Reply-To: <154422079293.1218.12539829857034151457.stgit@brunhilda> References: <154422079293.1218.12539829857034151457.stgit@brunhilda> User-Agent: StGit/0.19-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.99.221;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(7916004)(136003)(346002)(396003)(39860400002)(376002)(2980300002)(189003)(199004)(86362001)(186003)(336012)(486006)(356004)(446003)(11346002)(26005)(476003)(77096007)(2201001)(126002)(230700001)(44832011)(305945005)(2906002)(478600001)(103116003)(16576012)(110136005)(58126008)(106002)(69596002)(47776003)(76176011)(5660300001)(33896004)(50466002)(14444005)(2486003)(23676004)(316002)(8676002)(33716001)(106466001)(4326008)(8936002)(81156014)(81166006)(53936002)(9686003)(68736007)(97736004)(921003)(83996005)(2101003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR19MB0940;H:AUSMBX1.microsemi.net;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD015;1:UPPA1dkPA7uTypuKQoyFy3JWbz0bKjyrA45RatkBCxFM3R2dT5+ABesjsFaMyGNRzEKUerRw/wVhdZuutd0eP6MhSpIjBsSWqBK7bLYkK73m/498DZeQWaW35+sqixVp X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d404dd67-82c8-42ae-d554-08d65c934d86 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:DM5PR19MB0940; X-Microsoft-Exchange-Diagnostics: 1;DM5PR19MB0940;3:gZv4iF72CRhtF3WAIeMicaCEZBnvOvlrokaoxrCP48ftqBiBThzuDThzzHRhh6BwEzag5qBLvi767gD/qaJYYKztMrY5wRiqXucRF6FbNMrgPdfDeVNmLX/G84VUd1GcZ/xt4wj1rqDmfyjZyuMpC1VFJ0vsuilt0q6mvmQysvF4zsM7gCuS+3P6X6cr50LH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M3a3wLgRoVCK/5Z58jvy8+yzSQtB2vJ3XtITP5o+hY7vAw1FLUx+vrnd8nOd9oP/4DPyrpsyP4w9DwUyqb5Ig73xjCAGyKhnRCPGVN052A2dzqodjBJfmKLlcQJyDwdCo9lMjrVT4YKvCcc7KGTwdUiki1nA6YnJyqmDSvKKTRGWND8R8KGCdR7NRGQ6SBJt/+Tfyk/ypGFb0ONzUAYGhgK4yxQl3y6XZEJNqWJXVbXdo24FrXkVu8g9PYOYlG3adAv2kgf0IlQxv8EveGLq X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93004095)(3231455)(999002)(944501520)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095);SRVR:DM5PR19MB0940;BCL:0;PCL:0;RULEID:;SRVR:DM5PR19MB0940; X-Microsoft-Exchange-Diagnostics: 1;DM5PR19MB0940;4:tzG0Rb9O++2tW2qIE65f/pXpRcPh1/qwqpKY4PA2tGHv6vUBayVq2BUSavRuzbX6+SEPw+ZnY+eGtWZeEPFc9yuUbt5EcZBfl25Rp1mj+6ib2wNa3+P/vD0Z+JxRknx21wkN3mCnf8HIestu4lihltcBOv8wi09q+1xnVu/9rY3L9dKRXgjeHTQ79g7PmAiYVm2MzdMt0uMASejUvb3+eMn6LwzBST0+8MteAQEpSd2lfSzeipFVeh9LkVJIGZdQbF5d2q7QvOIZw0V1rQc5Uw== X-Forefront-PRVS: 0879599414 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BDM5PR19MB0940=3B23=3A9Ugxl4t?= =?utf-8?q?GytLZnLGhs5pNMCnj7s8bLNDzQ4NyrJc/BE1pfJwcjdVUGBXmeuboM9T4Lam6UfpI?= =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SHnJQY3mBjtifCr/rDKTtC0+UFkBW6cnH43qHOxUuZSC4ZtxTdtCu6KzCiR+fZGQQ3So9ASe6cdKyCwpc2RmB4OPbZHHZV2d3yNtJN8l448n9qhyF4cIz4ik+q8tKKF2Q==;5:UbVpfYwCmhIbqPKI/U5pbEh1Q7Xhu0DkmyLsL48qWIcKnd07wu6NvIRbNI9Q0h4EuoOdl9rl/FoAlo+er6X6G62dor190SlgZbNRpiwvsNCRaKZNE7MwBscyTgJQRA+PPVWEYP3qHrRXlMg/dyt789ro4cE/Uj9btQIZlujukMw=;7:CSAsgDLAGb1HXKfDNHeVsNz0oNe1PP8ExwpHDvL1Zt94BzkEOqIlZmNo3MOSUusoqJU8rpEuty4Ju/f7dwH74/tWRERnzQmU1a8VFTOeaidESoqyUAz0EUtTCa3iVVJH8HVP0KRO0FJPEIVLnZdOzQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2018 22:28:24.9040 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d404dd67-82c8-42ae-d554-08d65c934d86 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad;Ip=[208.19.99.221];Helo=[AUSMBX1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR19MB0940 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dave Carroll During slave_alloc, for logical volumes include no_write_same into the scsi_device structure. This will insure that WRITE_SAME will not be used for LD's. Reviewed-by: Ajish Koshy Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Justin Lindley Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index db95b1cb6889..8e68dba1c789 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -176,6 +176,11 @@ static inline void pqi_scsi_done(struct scsi_cmnd *scmd) scmd->scsi_done(scmd); } +static inline void pqi_disable_write_same(struct scsi_device *sdev) +{ + sdev->no_write_same = 1; +} + static inline bool pqi_scsi3addr_equal(u8 *scsi3addr1, u8 *scsi3addr2) { return memcmp(scsi3addr1, scsi3addr2, 8) == 0; @@ -5326,6 +5331,8 @@ static int pqi_slave_alloc(struct scsi_device *sdev) scsi_change_queue_depth(sdev, device->advertised_queue_depth); } + if (pqi_is_logical_device(device)) + pqi_disable_write_same(sdev); } spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);