From patchwork Wed Sep 5 05:46:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viswas G X-Patchwork-Id: 10588265 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 DD03214E0 for ; Wed, 5 Sep 2018 05:47:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFB302997C for ; Wed, 5 Sep 2018 05:47:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B21A929984; Wed, 5 Sep 2018 05:47:03 +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 2AAA22997C for ; Wed, 5 Sep 2018 05:47:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726273AbeIEKPb (ORCPT ); Wed, 5 Sep 2018 06:15:31 -0400 Received: from mail-eopbgr700069.outbound.protection.outlook.com ([40.107.70.69]:27399 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726189AbeIEKPb (ORCPT ); Wed, 5 Sep 2018 06:15:31 -0400 Received: from CY4PR02CA0010.namprd02.prod.outlook.com (2603:10b6:903:18::20) by SN6PR02MB5310.namprd02.prod.outlook.com (2603:10b6:805:71::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.18; Wed, 5 Sep 2018 05:46:58 +0000 Received: from BY2FFO11FD012.protection.gbl (2a01:111:f400:7c0c::168) by CY4PR02CA0010.outlook.office365.com (2603:10b6:903:18::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.15 via Frontend Transport; Wed, 5 Sep 2018 05:46:58 +0000 Authentication-Results: spf=pass (sender IP is 208.19.99.222) smtp.mailfrom=microsemi.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.99.222 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.99.222; helo=AUSMBX2.microsemi.net; Received: from AUSMBX2.microsemi.net (208.19.99.222) by BY2FFO11FD012.mail.protection.outlook.com (10.1.14.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.1122.11 via Frontend Transport; Wed, 5 Sep 2018 05:46:57 +0000 Received: from AUSMBX3.microsemi.net (10.201.34.33) by AUSMBX2.microsemi.net (10.201.34.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Wed, 5 Sep 2018 00:46:52 -0500 Received: from localhost (10.187.72.82) by ausmbx3.microsemi.net (10.201.34.33) with Microsoft SMTP Server id 15.1.1531.3 via Frontend Transport; Wed, 5 Sep 2018 00:46:52 -0500 From: Viswas G To: CC: , , , , Subject: [PATCH 2/4] pm80xx : Corrected dma_unmap_sg() parameter. Date: Wed, 5 Sep 2018 11:16:43 +0530 Message-ID: <20180905054645.19224-3-Viswas.G@microsemi.com> X-Mailer: git-send-email 2.19.0-rc1 In-Reply-To: <20180905054645.19224-1-Viswas.G@microsemi.com> References: <20180905054645.19224-1-Viswas.G@microsemi.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.99.222;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(396003)(136003)(376002)(39860400002)(346002)(2980300002)(438002)(199004)(189003)(97736004)(48376002)(14444005)(446003)(486006)(126002)(2351001)(2616005)(50466002)(11346002)(476003)(57986006)(69596002)(336012)(478600001)(106466001)(76506005)(186003)(5660300001)(54906003)(106002)(51416003)(316002)(76176011)(53936002)(26005)(81166006)(8936002)(2906002)(50226002)(68736007)(6666003)(77096007)(2870700001)(6916009)(81156014)(1076002)(8676002)(4326008)(305945005)(86362001)(36756003)(356003)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR02MB5310;H:AUSMBX2.microsemi.net;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD012;1:q+X93P8sS9/PmKPRpsP4FxakbdTA/aXkXfX5L2Nz6qTRyFD+eRyGCPrnQxX2u50hsXFRA4bDU+b8aIPgJgYAXvP/VVGimKTM6fbe8rOvVQP5++5+4ZcXqaKpTqyo8MrB X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc28531d-9ce8-40f5-a866-08d612f2fe84 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:SN6PR02MB5310; X-Microsoft-Exchange-Diagnostics: 1;SN6PR02MB5310;3:IfaPrYTgAeTCFpRjMJyG3KhfmJEbB36EcptGrr+quZM1I3RkPphxnHZbVNe1NhwHfh0IjKUQaYMcTMIYfogfu7+FTT9Xu4YZy+nPjK4fYvmgw6alitMPZUAq56IxadaN7rFJzsxueHfsHktFhQ553sl8G4JfWDTmxTXWHt8+hLmzTpeYHejRwRBTbsLJhPPAgoYPiKkAhU3UVsuN/2GcvaEcC1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1p9s61ljyXj7YoW1Eic9ePvsQhxlYT+XTKXzRp9Z7G52zKgW9JbZCKn7H8yBMpjuYr9BkbymRHRTa4RnUCZUdAkaRq2wmPzAvyqKHrhvVvTjhT1e8NTGZS0HJYnO8e7MWVIR9mK7zrS1XbrnOaI7vncitHJysF75NTXZ9Ka8BJDOZ31YmpgJltcFe9wyJvKWJ2flMgi5lzqXRgabsdAD3p5045PiNvvnI6Fx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231311)(944501410)(52105095)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016);SRVR:SN6PR02MB5310;BCL:0;PCL:0;RULEID:;SRVR:SN6PR02MB5310; X-Microsoft-Exchange-Diagnostics: 1;SN6PR02MB5310;4:DPoUn68awG8JYlisv7kJqwTzvSRRfAAimQcPHcOSQ+Mm8CHnU0yOwC0G/yg8gl/eDL+3UmTzy9Gj+U0KY2gHP1AxBM3zrQvq6QuU63wsbjN5WVLeaM/7+GYP3kaejc1SI4F5iT5lgPqn1zb783Oov6X0NetmYTI89/RtWoiScWUhvMjLUIzou6I/BPBHox/0ynBmc5LClxZ9GK6+TkcN1i0L3RLF3fl2JQlPP9mmwgdZRQThdwB4UmaH7Uc0F2XNnSBxpWngM1RKXwnx0NXFk5JC/CYSuQOnVUslZT6ukU/ob7mZckpRHz2ouK4g3qX+ X-Forefront-PRVS: 078693968A X-Microsoft-Exchange-Diagnostics: 1;SN6PR02MB5310;23:4zcIQHV54mxIJr38qsuw0HPzPD0/1KYgrszM+PrbFLWK7CXSHl5Bb0GsJVI06LJNoKlKvLxhuSVMUICLe4jsbNWHmGqOBTT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LRye/BUoEhs5Q=;7:lIcjHwG1ZUHJ1Pb+3twvzF89YHFhggy/MeKM56wW7KUfnYwCo5YlpC18jomiUh487FvsvssO+Rky/z4bvSChjRD+g/0N5hLatB6CjrzdUtsrhIU8cgFnPV66QeZn/J+N7ZoZQ1ff6n0m6UnmgEUIPbBBhoby5Ol4/E2OMoopiqrVaUUNPcS7/S+LuBNFtLggcqPjeiGsgvkhhApgh9w8rOnqxCepRTLXKI4TxMIYi+U733enHTzxpqljkHl3N7UP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2018 05:46:57.9745 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc28531d-9ce8-40f5-a866-08d612f2fe84 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.222];Helo=[AUSMBX2.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB5310 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: Deepak Ukey For the function dma_unmap_sg(), the parameter should be number of elements in the scatter list prior to the mapping, not after the mapping. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 96b173f..719233c 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -476,7 +476,7 @@ static int pm8001_task_exec(struct sas_task *task, dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc); if (!sas_protocol_ata(t->task_proto)) if (n_elem) - dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem, + dma_unmap_sg(pm8001_ha->dev, t->scatter, t->num_scatter, t->data_dir); out_done: spin_unlock_irqrestore(&pm8001_ha->lock, flags);