From patchwork Fri Oct 8 03:28:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83062C433F5 for ; Fri, 8 Oct 2021 03:31:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D0C260F58 for ; Fri, 8 Oct 2021 03:31:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234904AbhJHDd2 (ORCPT ); Thu, 7 Oct 2021 23:33:28 -0400 Received: from mail-eopbgr1310098.outbound.protection.outlook.com ([40.107.131.98]:23230 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229501AbhJHDd1 (ORCPT ); Thu, 7 Oct 2021 23:33:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dTQdrlvrjxTMMkPS3Q58NqD78xy+g2wHXP7zBPRJ+xMlncwLwcbhLKdQziJYwHcoCcj70k6M6P0M+5CUjf/XNzX7rQHyu81HB0BhBthwfT7Y9x8ZUHi8F0D1/20CgAOXhURCoJDu2z40bCyJ9Vo0XT9KBwglxp8EykWL2jzxx5RK1/Mj1oz5hio+wsGwONg7QJbpZawlyC38hj9KpB2MY8cXjgZlFPBoT17o0GXY9m4wqt+O4k+DrSULh2HUAXcHzHHgRZ1dD9xuVmf5KyK3zXJ65Z6CIRlXjJb5I8sbb/Ahxyxn8S9BScwZOY+yT3KJ35vU6XuvR2fZAiSbBBzNBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/W8DejXV0lPTAlVmWbNikoZL5cUs5fjl+7gC/Ce2+bU=; b=AA2rZzTMASgFPFS2BvM0w5NcYneN8V49kvOsiNEDGIH7Zu/VAjJ01PH3vF7Ys/WLDIzqkRTHB7FlCNOcmX+FZcaICkipTpBmIenWTdAA+x76hf1VObUZiZyULb74I6BzWF0oF1e8vKnC/zirHWk/fsIIw456Jnj2OyXeTHPLxO0eCCEpGD8qhpsTy+2REd9oYkAvpgBBtKg/hglSEfPohlTSuTQv2uUAw88z5UMqmgzS8s72n6NduZz/jUL1YgPD5z//zBgwzCEy+dfT9T9ztMIMeW5x+pcPFntf4IuFMo8W+mPvCg0c6Oz2DlTm9faR2bUkjwhzXkM78Uk0rEoCIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/W8DejXV0lPTAlVmWbNikoZL5cUs5fjl+7gC/Ce2+bU=; b=pOfya57310dV4/WieiLDKwdAbas0/EvQGKt7g8hpgcrs952vHpPHBVLjauJaAA6zza4vO/0taI6lcRMtRLtRFN96hWilYecBpAuvVAkbM+hPgfh2EX6sFTk4X3VKYHQZ85DqG1Drh1hdJDYLlLruoySsWin8WKbUalG0jY5sBi0= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3210.apcprd06.prod.outlook.com (2603:1096:100:30::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Fri, 8 Oct 2021 03:31:29 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:31:29 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 1/7] dma: dw-edma-pcie: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:27 -0700 Message-Id: <1633663733-47199-2-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:31:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f33b911-d8d7-49c4-4ea5-08d98a0c1de8 X-MS-TrafficTypeDiagnostic: SL2PR06MB3210: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oILFAQUYHM596XJcfmsUhnegkQi1f6/ZCmMjjU5alqXr0zLtoLWvI6E227gsVQGOkg6akrFBkifGY5yxi78OKEED6atCwlKDD7vQXa/kWzIJT8LWSzczfg5tmBzYcMOadG5LdArBUuBCLuRtcfEgtikOc/6K/xiKtpRjjSvdNi8d9sEFGONRvHBUhkwn/Dzz7eqbQuY0yauaz7as0PmBE3GZOQzUC4Ez8Sgi9Wuhsn6OOg8ySw0+QgJ3fHBWNbSeGP/jw8hTHdYAc9VbnQ8qbv3V5PSMFl/Y9PRQVJitj+bIlwT46elMzyELURHhDlfZPzKdFZw/2xd4j77pPq9SYTkyCEuqDq10+p+F+sdIZjA6PUy4hRwbw4CMvI+ZyM7zrZvx2qqrJ2YXCaoQZOajLYqjynhBlVnoMGBVlXFsyvuv7GtIgT5AsGJE68jbWWBixc588/aYQyZ0ks371L59zb8gv1x/5H6KBt8EwSWMrf705uyulKc/hcbSdv3fix9vrYHOPrtzYh3LSuCx6g9A7W2AhIeXVKUzLK6qzD5I4DwwBcAhCFP3m02/sTnknJUya/SWVwFK2U/DVw1yQHADlnwiH7FtIdxDMWI87hXvPOyGl+UhlwrEGdb1gaTPpz+qrvptUyEE/nbtuc0Yrfp/MPWmo2vr+pj6nycPUCNFbnFUvqZM6CsPKxKE85+jWqMH/TLyL9e54k7jnpwPoAZ2eAT5i8QThZDhAw4YJqOlo0U= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(316002)(6486002)(110136005)(8936002)(2616005)(26005)(5660300002)(6512007)(186003)(86362001)(4326008)(2906002)(66946007)(107886003)(66476007)(66556008)(52116002)(508600001)(36756003)(6506007)(7416002)(38100700002)(38350700002)(956004)(83380400001)(8676002)(921005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GE0M01zx/ik7Av9EKh2z0CgLpyQroSNdDW2RRIybWWtiqjQ0J57+FzYQ6WlxrGFJPDuApodIo2z4/viN5Xp4/ul9ytTt0LMc05KPgt1oR6LdfKm7SZdlmUIuiJUvVbyghG0n7VWfKE8fuMp/FpgYuH2lAx5ngv9oySeBnqAaZKI2iKddHp0GE1uIMSvZdyVfLB6kgMaxN94AaY4OcYOaIhpb3c3TxCga2j65Rrxzf7KAXhho6A9SO7vJKcF/rRBWwu13Un7RqAG8KyDWEIphPSg5SVDR+oh6jVZEM2ylj06/njqY4Ly5QtfkJ+2xHFSZE9go/WsnKB8KgoNh4Rwb+RwsDo5zJulpFzGCWdz8i8SUTW526QTz2/1IbUQmzO8FAa4fbA5y/SNzLh52UM8bqiOs/qgHUg1QOKFBF1rmFSxbtrVCs0NW0X8rgmeuvHeBckn2EYg4vTNnkvTrIVBbX678syPnkiMnOIvTrlpxURs7S4sF63fK1xdJl3+Yk+qi+VvpOyrZaB9FpCVMmDPsJg02KZPiZ8PlO6MI7astZPGvPNRSnQp1qwkUKZ0SjyY1xv71Gb0Cs+lepYJWQajeqhKfoACNBjajqoR+3MGnHxuz9U2YbFYI/255UPw700DC+jbaUz7GT41ueKhNli2LYAPeXHL3g1ONskj7CR3IKnp5gzJNF1dtuXfQZ04hbMRi9Y940PUp2CmxOv3cndK9GMzN7w6SN59P5jRuWJHdPLjBKVOYFmC5ExHUmUn6lVe+0k3fAP40F6QCC7TUKrHYCl5DcsHBaCPROjkAnpk04kekt3+hZnTIGEYwnu3XBlOggT7a3SW0/f6O5I6DwAIe9E6i2n8ivrkjW8ZMcfJTW8gBVbx2B9qqPGorfawoERq9aQ4e0/5FOA0XHeoaITknjuCQd0m84dDh+UQRblWoCGVZltScdyOl80UQgccHXZbjdNUhGKPuQ7S9TTSA5/725ylqRQNEKvJ/tocA10HuTIKOXDuzy/yQERxdG4V8mnjvuPR5Hxko3cA7X1vJVsPhMpSP4atXGvs3CajX2leRsLkdLD5kEDXY0q8ii2wIaTFdvsKTHy6FNaoz5PHysuQSGA/6H5TQrLwt7lJ4tptXlPtPS8HyaZUtFjZ/zBsiochRtF4tHdU6ojSW/l+e+GWu+giyby+rRtiaXSokCWy+lmZ6P9hTS2jluvj842Ll9nI7zixwDPGoQ369CQBu45dEnLM/zaieStP1C9QAvgdveqRHxOXF+EdQsTTX4aFuTykgtqL6e9w5ie5WN4vTVz2l2H7Mba5eXDPT7kMnvOetk/0+P16fuzFkW1RjSZsj9HaZ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f33b911-d8d7-49c4-4ea5-08d98a0c1de8 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:31:29.6589 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8ZK44ZfECUNyxYvwjcaAVWIOH+crvIFibGztZmMvUCt6pzj4ReLMkY8Yc7S3BpbDbjvUN8CJvyl6y3wXwXfi0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3210 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Wang Qing The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Wang Qing --- drivers/dma/dw-edma/dw-edma-pcie.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c index 44f6e09..198f6cd --- a/drivers/dma/dw-edma/dw-edma-pcie.c +++ b/drivers/dma/dw-edma/dw-edma-pcie.c @@ -186,27 +186,18 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev, pci_set_master(pdev); /* DMA configuration */ - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (!err) { - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (err) { - pci_err(pdev, "consistent DMA mask 64 set failed\n"); - return err; - } + pci_err(pdev, "DMA mask 64 set failed\n"); + return err; } else { pci_err(pdev, "DMA mask 64 set failed\n"); - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) { pci_err(pdev, "DMA mask 32 set failed\n"); return err; } - - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); - if (err) { - pci_err(pdev, "consistent DMA mask 32 set failed\n"); - return err; - } } /* Data structure allocation */ From patchwork Fri Oct 8 03:28:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DEA9C433F5 for ; Fri, 8 Oct 2021 03:33:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 271E260F4F for ; Fri, 8 Oct 2021 03:33:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240622AbhJHDfK (ORCPT ); Thu, 7 Oct 2021 23:35:10 -0400 Received: from mail-eopbgr1310094.outbound.protection.outlook.com ([40.107.131.94]:64336 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230477AbhJHDfJ (ORCPT ); Thu, 7 Oct 2021 23:35:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MBiw4GHEA/R1g4GV5ZSS775oto6bkkOYsVhuOuxAgbhaapuXeAN72YjiiprfzqvQcyhLGoRPJfG3Hfl5xVOIzRKeqeGUVDgRW42wKvYNlx+8/VVxt3rtklLfjdyiisUk4eY1h8/qVDOT87RDvvQCtmV3dQy8HmHE05gxfNCcOAFFwL9+2/x5wZ+LyP3CUz/Spj34J6E09yUZYJaa+7QcnQ1YAfgZEgs/f7vEULV76m0Nh41VoFO0uKCebsVbJXShg7x8IW9rESxZ8e/G6w6uteQlGrGAOiAecDxS5IViVGfUX3b808PjEuLwLxh3y2JNwODVu9KpCVbE8EnXfRWy1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=029/jm95S78LNSwOZlQt68KUOnMC+fqeFdSj6kUvYNw=; b=DTd1BhYSKa/mmopyn2zoWpJjDZU6xxIcErS3WCz5CgGXzg0uNkw+r21tLUM9OMa+zVK31JhR8cXwgihEsThLjsPoM/ynpA0tloyFbzpXGCap9cFTogBrnlbAWk8epELAGfsGx0d4vO97+Jc/aNsXThraIVQnJ7mgy13UsaKBgpflfIHL4UKAIF/VXbeHC2zikd7C5Tt9TAMC/IBGKIfShxDzGh8DLPuOy+xOTLT24+KrbiYsaGojveFALep2FkQzJglI4COB8YmYa748pJZIZevZUuB1OQhq5+98mqiBPzwJ/7+njE8BDNIcE3UifucQwBZTOLWyAk+ddPWzsyza6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=029/jm95S78LNSwOZlQt68KUOnMC+fqeFdSj6kUvYNw=; b=TKjzIyG7zoxgQOnGj90or2PJSwOoIb8dG845E6cZs3H4m68f3MdL/M3Ln8POAlbjWjYM2bkvj1tIkXOgGv5GcjjxQ9jb64AfZPjmLV99gcw2qlmKICqjeT1i1ZlXJSwlphc/lHqjI0k1/x5jfK1PHIYn03edumisVJg6AcuZgRI= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3385.apcprd06.prod.outlook.com (2603:1096:100:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 03:33:12 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:33:12 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 2/7] dma: dw: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:31 -0700 Message-Id: <1633663733-47199-6-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:33:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88c421ad-fc53-4e3c-991e-08d98a0c5b21 X-MS-TrafficTypeDiagnostic: SL2PR06MB3385: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ryBsn7ALlyCeYbkloTzIP/KJwq6mPpcbUmgkBIc9jHzXWrQojeyGHx8VSrzP/76QlfLAe8nl9qTzuUZ60bKS4PV4e8vf0nOnSaxoQgNaTWAWGiqpOj+B9LDJQ0ucs3naghO4PDLpFHkbfDuu9saaDT8WgIEZEHofYuMb4vJjQ6bTCjFzmtF+eDJRp9yM1yt0Cryu8q4ZsZHnZ4BLlOVyglyaWsqaaXqZbHO98SMOzG3dEaH1ATfJ/yaDZCe/L2FKwbEqHS/ldPYTiCsdLT4YeOkz4b2M7TvVpCXUWm3Onf/xJUJbE6LJfq49nWPmVRepEE6Y5WTBwUspNeISfbwZoWtatoJ6Gj2HYSrXnb3HvwB4hqqoTgLC1/Ea2h5bUkh1YjQnbuhMj+1K2Nbi5mAzc2qg0DgAMNQFvcZeZ9qBGwF4yrYXCF7TKQa9Fri9FQPuCn4zvrTnCUNx61y8NLINyxSSjMdE5mjI4xJNGBEUkZFsQdrmYskFDXSC/DTySI9TDoelcFMNJyzVe5tkZB95YsHGU4XkDFIhV0npaAahX6uW1ia0uXzhxLiWgJi74XxU4M98Z0//Oc3EpqwPc8znZPii/ptHOL1H16QvzZxczJMZKhKkgK/RIAUWZ7YsafhY93rlxkIrYd38WtfeKcE3YcajBcoOnqt2YGzdq1PwtRX4hK75gC54H2a6Md8QWmFarcxiOb6DItbq75Xe1VkoQg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(7416002)(4744005)(2906002)(4326008)(38100700002)(52116002)(36756003)(38350700002)(66946007)(66476007)(66556008)(6506007)(8676002)(186003)(508600001)(86362001)(6486002)(110136005)(107886003)(2616005)(8936002)(83380400001)(956004)(316002)(921005)(5660300002)(6512007)(26005)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fXTiZnFJQTvXp0Vr0tHJmh751o5AKuUxRgVl1oz1+TuDJRyN1vu+PBPYBgg7m4F5vkkbVpQCttcyx8xicb8MZ9v+pIWg3iNMKyoVQvea+c4EsDPV4EMTKt9WDeqpvA0fP3g08Wrb1RTlIeOew2ticatDlB/7M/IyTog/4JU9CD5BWE3wdeXx29ZvQceiRarGcOG/Lt5M625BmzJgEVYuOmwrzpBMW3gNUtTSrBZjWXLeqj+dH+B3EntwSFYgu0lo1E+s46o8wPTTbYWH8rd2zBt4yVCX68VwLFT5rCExUeWa9G9CljFKi2OVKYNmK5t8S2R+N4Ar2rvFZFNaypc0DnC/RTjftuMmaRTlP5dIpHDUClB0mLTpPYuJ46PAPxnew4gFzJadsr4lkVdvUEAzcJnX9PZahAWODEgT6//5uIb935UR0Ac6CGtTweSl66uMEOW/U6ZBDPqMVVG8lTc7wkFEcF7txzPiOlVL9LNvFYvezVUwOgsgifj3Ul9aXjGtJmGRmyDoFTlFiphGQg6SoVoTNLzDFpwBmjo1hRkolAh9hrUSyp7efxOQXhV561AsdN92shacTUFHDX3M3PmwyVwBx90xr8SABMDLYzo4wZlwaKxVScwx47CxPCjpZt6iLEQv1Ylcs4tvzmbAnsuAfi6KrojRKnc8DCT5clzYMapfktnvYshCdaB30G19YMRpe2afqVboDxsBgL9hZFzO9gAkSIgB0vbqcv26faaohXEhnpIb8/uiN3Ea6zUda76GFfqll+hy1Rc+8+CQV3cPgEokBvuAR3Kj9tz3caFGWYkAU1+S6/Zo8kH9LGXnFPPd4X3wHH3XoRVSUc3o3nRaO1OE5n0OE+/BU3fz1ZzeVVFsp8uQDWPU0iM+V0hcxt55uXGeZ5/0R5PFjhQxHtyF4IcX5cXyaOMxdOTKMV+cikv4VtxVTdk6/zaIBAx6SQ3SAhHvX2hin+r3Wy/FoveWBVgklJ4A9xEoyKG0vDs47bH3wzxOw6BT0j4C5ZT6207vYZgYcaqqA4SRUSgJGdB21FgO8XXA2CqwijbKyEIh/4pjS37c2RQpJim/PkALQQHJuAtbFpPeoO0/9DUT7goP6AGd9qS1A8IbIzIgpHB8+H9T9WmlB14T0QReobHsjYL5/iigPndPKxQhS1L/ymUys/Gi53Xc05pWkG0ztos7h9c0exdPDafn7lC3UrG2rZlw08INyEw+5KvpDJI9fDHgo9j4h3l9lIGQTXurkgvzUHhIJyU3gCByqfEEGkrh/OtY4rTYP4gt5Tdb/lNFLu9CHhQr0/IVyECNa45i8yEc9j7RNTfFfu9ystLsh1NApzDa X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88c421ad-fc53-4e3c-991e-08d98a0c5b21 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:33:12.4494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NgOg+j/GzkW0VYb8BiUxysn03eQfPtVnedaJogPa3nSNYtW17phsU47NzUfuyOJGHEiW1c7MxjSv2Fd/VOu3sA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3385 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang Reviewed-by: Andy Shevchenko --- drivers/dma/dw/pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/dw/pci.c b/drivers/dma/dw/pci.c index 1142aa6..1dec1ae --- a/drivers/dma/dw/pci.c +++ b/drivers/dma/dw/pci.c @@ -32,11 +32,7 @@ static int dw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid) pci_set_master(pdev); pci_try_set_mwi(pdev); - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (ret) - return ret; - - ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) return ret; From patchwork Fri Oct 8 03:28:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544123 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34A40C433F5 for ; Fri, 8 Oct 2021 03:33:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CC3660F4F for ; Fri, 8 Oct 2021 03:33:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238989AbhJHDe5 (ORCPT ); Thu, 7 Oct 2021 23:34:57 -0400 Received: from mail-eopbgr1310093.outbound.protection.outlook.com ([40.107.131.93]:54058 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230477AbhJHDex (ORCPT ); Thu, 7 Oct 2021 23:34:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dKZZLPwqUN2onv166381LVPwF4R4iH6aSr21ETste+5ttQG7iLyf9rWsnxctxg6fbvuSM7jcg8G0x9BA9Ja+lqJqvUjfmC+P3pR1j5kO8m+kCd1MTNUu+g4Fl9COTB5JuFSf74QaDZ0+OXNZ2NRfRopr3NV46S7SN5S8C1R80UVoBrCTXbSqmOSRTYuyIsPljkq/2lWmgPLdOT15med61hKWUoHZXdWdrQNBlSp7D7YN4V0Z5rKnJacbKd5WDQgcN5Oo4bddIchwu6gHT26gTumxcp2bxn6xppV7Y3SRZZfdz+ndIzvwHWKjQ9NNkwDm5zEBRbjVchUajHrVjHqbqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TvhIDhdBJHDnNYk4XPU+b7EwUpmk4gey0acCTXNlf40=; b=WSxsMMx/Qm9Bp2VK4yCN+PUWMS7QiZygcxuPsftTzH12NkA+zmYHepBDRa3PPJGn25cqR5VOT2HR/DpfJXJvu9rUAkYYEY0zb2XvGncfH8QI41M62x5JwZrouwUPoKO1O5gYX1fyD1jNOWQWzRwzSBpRdm7iaKvHE+E3BRWo3tobypi42jPoCnUdc4ZwC5YEnW89qZyDv97ytIfDb/yMtU4qFmi1yTDk+kAOKYwtO1HZzMPYpUmTnqkM5bIQuzLV/CI/DcYou0Cz/3hSUDrcuQX8XBBpkR25nVmD2TGdmsqVinuPh9+qSPwG/h3X8bHVCAfPxju8xRbAafm1XkpShg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TvhIDhdBJHDnNYk4XPU+b7EwUpmk4gey0acCTXNlf40=; b=n6DOztohONrLm7/kXE7e66gguPMw8YQSIWIjMXowpSwSj470G9D+1pZgPPDQpkIIptC2gmmEx6bAdBWnyc/lvva2eovLLu4iYoppgcJZKImpHEAwbMXklF/qpqWo5vfZIhAe4eh4Uomfb6qZ6kCoxKH8FqsogsJxHCFwHlu4J2U= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3385.apcprd06.prod.outlook.com (2603:1096:100:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 03:32:56 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:32:56 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 3/7] dma: hisi_dma: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:30 -0700 Message-Id: <1633663733-47199-5-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:32:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ab4b2c8-de68-48f0-e7e0-08d98a0c517a X-MS-TrafficTypeDiagnostic: SL2PR06MB3385: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: biwPgfypLK4zWmgr1YZal9V480EjH3/vNJcWq9JG6cUe+xsBr10BlClUww7AH+nJVUa3AL6ztWqKEpHzBFa7VsnDyo/c4vv0CHm7i92OxvUuhmtT92WHSeFiT6nCuakl2DHxztMk5YxkSpc2PJiWxwHWuik7swRM7mUZaUvdchuVZtJrQ4nIlZPRxAfnMX40DsM3Xwtn4COs3pOem9zXUsVBCAfzMrfsvZP0kM4SlFhJLAwY26AnJZ5hBJDxmJ46G+8P43J9Y4kzM7otl37hjbQ5e2y8TlHUXZoJn73Tnxk5I2Jg4/ADisCbE9ydMf83OHA/CI0GlFU+m7BKDJXB3doMHVSzMbgJvDJW3Mj1xX3pxKfJu3CxP0nXOJoDfgsKo2IiL3smbkYentgs1r0b1iZ9dt1EkvpnEkSYay82ZC9vk8L/VHtk1yvbMRvj1yRTNd3PGa4C5kPCCWSJK9kCt8mcluMazBZhIXHmOH8B+FW0NBRuc3ikVe1LO5hBIgPoTfm8Vp/KY59abDG1FJP/xOYNDRwM+P4ePLfZ96KN52M/Higc4Q0nTl4aYZAiSOr9qm5JsP5D1EzYa/JjBUldrlnxM5SHhhP8CGkNDDdD9RRdWtWvS3bNJLcQNKHtBOtC83OfxkqBCss698S4NZtfP2Il0OGc6PKu8iSn+/ehT7vAYqdgftnrDHnxj7c9v3dqfl/N5duTqA5kWw+9cQXoog== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(7416002)(4744005)(2906002)(4326008)(38100700002)(52116002)(36756003)(38350700002)(66946007)(66476007)(66556008)(6506007)(8676002)(186003)(508600001)(86362001)(6486002)(110136005)(107886003)(2616005)(8936002)(83380400001)(956004)(316002)(921005)(5660300002)(6512007)(26005)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wJuoADK/fOeN47XkbmEual1xN7109qOwoD+GRGxKlUlaXX4t3AoKPLcNAgZMJWp0FMxINpoP25fzLXMS4BTrGPwO4dM649BkMgbt9ar1QmjHZCia1uU3mVTgIPwKsRz6SWqtb8LX22Ogt06YoPElkUOE08JjXhVBko3mBHnYPHfnjKg3u0ZYk+mNHVKOz/dO1d71z2k3MVXH6EKQEglyxh8TPNfU9y/f1ZjmjznEqAI5oRiXAVB4T9WBjR14LzeOghr3VUjKtSonqQrC28RkU5vVViU/tlaAWqFCsPYEiwI42ZNbKJjctlS6+MxcDjX345aiNyZDujcAeliSnD3EwNMY4U3U1urQkmvM69IbzaGoUCN5AN6YWESzraygVeLQ3XvLPBfas6moCbZcTCetB6MBoLNJF0l5L4GOEEF+rMUXLWttn/hX8k286ZQIiNro6Cjf66qMVzwJUauLHmzNE+kPgGdtssav6wLMIIFMJVlXz5LwMe5WTkVcmtubE7Dit1iP6EuYW4bYlmQADXVBbk4P9f65JUEAErMcA02bo82dTQh8R+vLSLb2e+j0cY9JxueM5Ejcj70qnlfCKClIzfF4/XQwb2we/vC2rOotHjvTlfUu36b8OP1ZO8IwVanlH0qOIVpKyFEevaveQfVC2nWdwb+ElDzfVxy49RE89GEg5jI7Eg7GtZZ3ucAUpv4dmZQGjXgBKgnDzACJeoz8arunmP4WyqpVgTlxemSk+reMdSyg8P4ftM6QvVaYS67WFmkSZgNIUvMyq4IRmQPO4+bLtR28QjFcQyUYvtRyNLBcRHbFhuWIba0GcAH/YIBxQCtFSLtTZ2vztE4U7dXyuMYlVclQiTNLjuPoHBPFPEmwm8vNOKoVi3etdzBsLyRwEWH+mWhB+mh5h0RB+7ie0CF0uov63UgOewtFtpwF/o101p+AVBvw584o6yVwSMcCbGrP088pCAWnMjPaTRI3m0cGqK0Az3b4T1AV+Iovl8JQQxEKVNso2ZI42K45Jg64jxLLnE1DmFxw6pEwZXSV4PJqqUUFlLxsx9jTQ/CDs+4lzs4is1abi8KMuDFZ72PEWevfdZGg1U/Z4rxBD3nQ7HXI5N4zQPQpqqxALGMyrsGXXEukmYfp2G1+QXtf+MAu8hmf6rVikiW/b7nZ43MWobPqLDPaJgH+AKVBChM+zZXVy+La1DlCMJzmaMtj/CeK1WqNeuVka3tIUYuWGtQA12Z4cWjZbF5AXys18fTpf9KOYoDDqAMMU/7pCPaVTF6xA7tsy9M5UFTbnqcroJ2ZWErGEz4Txmi84iCojCqstzGlMNarJexn5OnYSfvdPTBJ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ab4b2c8-de68-48f0-e7e0-08d98a0c517a X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:32:56.2664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OYbziVER229BmH6ulHbx76dinRTB2OinWLsjcKlBKIFnRnK3l98vsL9Ld3e+DxQnOxHJpAFiNCcx80dFsVy3dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3385 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang --- drivers/dma/hisi_dma.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/hisi_dma.c b/drivers/dma/hisi_dma.c index a259ee0..b86f856 --- a/drivers/dma/hisi_dma.c +++ b/drivers/dma/hisi_dma.c @@ -524,11 +524,7 @@ static int hisi_dma_probe(struct pci_dev *pdev, const struct pci_device_id *id) return ret; } - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); - if (ret) - return ret; - - ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (ret) return ret; From patchwork Fri Oct 8 03:28:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B4C1C433EF for ; Fri, 8 Oct 2021 03:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 693FB60FE3 for ; Fri, 8 Oct 2021 03:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233567AbhJHDee (ORCPT ); Thu, 7 Oct 2021 23:34:34 -0400 Received: from mail-eopbgr1310127.outbound.protection.outlook.com ([40.107.131.127]:3200 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230477AbhJHDed (ORCPT ); Thu, 7 Oct 2021 23:34:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XgGTR0AMushPtXUy3WYjYlqcgLI59txVYL/x61C7TRj8rcOFpp+h+Ujo2MgAFpvBrNh29DDWaZ9D3xNqGTQujsWWYex3H34zHp5EHea4RUOhKRCoGvKjQqd4h5dY452muurilZwlOUsxaIHWV1vLvaUPkdx/26nqqvndve9drBepANekpJ6bC87R7SG8PeA4lPHUQwAyn0JD2Zi6idfmyoZhdATB228ydSGin5JKmft7lTFjGmgIN1yjxtNB35+3Q/ld5SK3nmSliIx6hzd/DfvOc14W4xkOYOC7Rj33FH4tb1TkWFhk9ba7JY6zz7vBVx6BJbwESUaIc3dqYfxEnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MUioWZgj2o/OdSpMnMKqYg9ZwE1wWxylkGVJk2z6JIc=; b=CLZaXIvBeJ9g0KSQDwUp/scn1q6EY50acAV4CXk/pGMZPO851Kj5blW+I4AqxcaSSlrhs68ku6mQbt35aYd2azAz6FADPuZwK+s2yIkbjQEueGS3gl/sa3YoOGoZ1eWG+FGGQ/QYO8NXXAu3XYJXGkdmb3uyz4h8lQaSr0usDDvqi1/OUe6TKiCpq+8CPkVDP219g/eb67M3N+FnmyD91xBkev5zLeI8f+k4+pKVzzDSMtJ/9b3vPkerkDcTjmZcnilrYUbqh8nBXbSvXetUIWwxvO/scQNPP6uSNskGTzo5pdpgxdDBVu9Xet/bLKrIBQFTa7ZCq1CX4NPYHMwBPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MUioWZgj2o/OdSpMnMKqYg9ZwE1wWxylkGVJk2z6JIc=; b=Q6S532VPjOq9KbeHy5eVuLm0YY4q+fqXqF2UavGUt+6w9uff0RyEfdf8bZfW+2TK4AvjpyLUXbDxyGj+PQIQd6+HXNYdpsryGmMJnv/Lap1Ls1QxAVufRkll8lwTsjxTg4AqYqwOXkCPg/9h6x4NASNpe6chKD4CO44hU3WBYUQ= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3385.apcprd06.prod.outlook.com (2603:1096:100:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 03:32:37 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:32:37 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 4/7] dma: hsu: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:29 -0700 Message-Id: <1633663733-47199-4-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:32:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9ded3f6-76b9-496b-6011-08d98a0c45ea X-MS-TrafficTypeDiagnostic: SL2PR06MB3385: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O4pag+RJByIydXEqQDI+gmgiInUeUxrAZewt3cDEHAO29U5CrcM2ck0D4T/K+dw2OlsDTHkzp/JJ0dmGSE6c9kZ/hSTvAeMJKizLrpYqzjyG9HIm2m/7Nr4tvjk/hkrLnQoBJLWR5fOsslVQ8lIlG/6tV95YNdXsttRw+ZQ1M3rYlKWFMBECBte5cjz5MCepaPNNPmvz/E+gZSNUcbWAhIkTm/yzipJYAJcKNmhr15czjtxSD+dtk9tHC9iGnOVTbydXFE143ImGOPhFnVFjMMTeJyXZT8zoBHGIjCPvv2H4d54UajRsXRGzpBNSbq9LMvTKeijGHRFIBOkbVuCKcAOm+JcNaoJMIUDNdIpQ6FObyLQBe7B8laDnC5AyEa3OugWUJzvpjgkTT2aAZw0/gbS4bkVw4L8d8E3FdQSxu+gqO1vrcCPrLX/m/F1KSIXGuxqV0P/jBVq6nliOqUOpE78CPx2SMYKnUSrp/jlOxnNlkA1QHSBwFyQTmaFcuV3Iy2P/MhIkHCnGDC2kC34Z7cBtKS8hh6xRxClgNKHnqNXQinLji4z3esehxAz8OlVrIodxVBTkPNG2vuu0qlvypmkBJg7PpyxiUGeNLvw4rSCWBPDuTqkZOms5SRoDonIDUCLPUWgM9kZQjpt7B7agcoVJdDKWjKFEvV8HLV7lBnz4PPzFJzbGipSRcriEAxKabf+66GI6i2fAKrwRfsh/KA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(7416002)(4744005)(2906002)(4326008)(38100700002)(52116002)(36756003)(38350700002)(66946007)(66476007)(66556008)(6506007)(8676002)(186003)(508600001)(86362001)(6486002)(110136005)(107886003)(2616005)(8936002)(83380400001)(956004)(316002)(921005)(5660300002)(6512007)(26005)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uzjew0gh34OWTzLw2kb81RI+VIXNfklUP2rZG3tIYc9UCBylSdNbg384R44+bcHH5d7GKJ+mG/5CPiI7V4ZzrcTrLh63D8SUta1CmcflIMtrIB/q9uOOR0bEFw72Oh6gPG9rDf9KCeRQilhC9RJl1FODsJDR8SwvT4PGzmpgDANDeLE3NGmz+oUpQAqMTQG+i9md3404BUvR5uK2FxpX0m7TRNpXtq7pYQW0p+Q68MZX3Zs0jJLDgrVxkIx4o7TgHYfIwLMZlptccDHaaloD7aPVvCshmIHMd5it1/SuNElfwIJMhuHcUw04ADp8SK0SNwjWH3ebYZRYcq/9uY5hmJ5yn6H2O8ZD3gyW3aFCFgJ5pq4GSiEpELQjH/gji/pNN92A7lw2hF7vKDSdHc/zBIjVkbygkYFkpSCak4XknHOoC6QZ+P512aRdAZj0hNPX5/BR7/6zybhb8V6egpHnK5B6DGQ4MNB/3g/b81hyzkPyqph9NpRMQgz/Wiew/CDJVmn/9luqDr9/5XKlC3Cv/0L/44sWykMg3qe4Y4b5G6QJyOu3mTBYvJI5QCoT+ANBPLtYjVnWeCL8OXOAyGbvIxWWhH/a7IK2JdHwjUooPA5C5C15PLa5q4MkOs7tdW53A8VIANUhYbFOXz7DxDmUxKcAWzVcu+rc0NBjmR8z/oDCPwRLD0XS2UgBktSoQ5XZ/wklmVxaHuZIU4SRTIcB9Ng4VEwPNAWUIzT73N+8fUQ3CM3AxV0QMlgsrtW+8o/cuPA+Tlg47GWXO8cWUiKNyxCiCg8Z499fGtfr3aEFxHMygL5rk9a5x3dCyJ3ZfiOieyTFbX8ZczMKsxdrfncvWh1a3+jP9aOknu60lY5rnR++g79JhFSHJcBTs46Va209qx27er/Ytjfgj8AjbC3pF9KE5bSRpLfwjoT9HR6HFqyWqtNOSYNHUqCgLqv0G5qg5ZumoX4TUZ2Habq0TyIvEVFcOZ5cUEqFzY01kLeLQBKcM+1aVIi4eelfLymcJNIExg70U0vewiKA4OZv2SXJDlkKZaBquSWuFnPQZqhflCAzaplYGQKjZn+EBT84l0X/FHyuWTKfb46A9kYT+9k0p1qnPWyjVyMO59PH3J3/cnqF+nydP+spVQPGvtxJ8fGqFh0R+jlIhJdBOWiyLmkln1bbGc54hmpdMgzGymNl7hPmqtMCKQRUZLfptcJ0QdbphnE+AtOXgXkEFF0ilIIp2yVWOrdfz0F4T3sHEpVpDksv2wpLhTJAB7X7dH49FAmFOSFUh74tO/zkageo2yiiFRIpmKvHtGg5ena4m9X+a1m6Xp6oEDE2ZipzNgZJfbyL X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9ded3f6-76b9-496b-6011-08d98a0c45ea X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:32:36.8693 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R8qs2WNx0UgWvvIZuRKwdhKX7YY5aHDHn7i99i9FpGklMXJwqD6Q6wVFo8x6bcj5KCIxuRzs9TWUuihGU3D6pQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3385 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang --- drivers/dma/hsu/pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/hsu/pci.c b/drivers/dma/hsu/pci.c index 9045a6f..6a2df3d --- a/drivers/dma/hsu/pci.c +++ b/drivers/dma/hsu/pci.c @@ -65,11 +65,7 @@ static int hsu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_master(pdev); pci_try_set_mwi(pdev); - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (ret) - return ret; - - ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) return ret; From patchwork Fri Oct 8 03:28:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6795EC433F5 for ; Fri, 8 Oct 2021 03:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52B0560F58 for ; Fri, 8 Oct 2021 03:32:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236805AbhJHDdx (ORCPT ); Thu, 7 Oct 2021 23:33:53 -0400 Received: from mail-eopbgr1310090.outbound.protection.outlook.com ([40.107.131.90]:18336 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236610AbhJHDdw (ORCPT ); Thu, 7 Oct 2021 23:33:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Afct9weluOm2QxcHp3VedABro8bSE1dikPv350gq4AZO9nrZokSOadDDwjL8FzPRWw07J1ZtVW522+Kvqpev3Xi8IS3uKdOq/VikTv/+Fd0SHQZm7PLGMTguEtnGIpXnfsMh6C/F6TvHzJwYy3lPWI6aEm56vQ9WdoofRwTEZZ64aRUdYf+2/KBilJCmy0GkPGAFeNy6XZq3cCHzzaToRC/q451r/o4ROHp6kQF6e8kPrYuMExTS1X+jtXxyfEgVPkNYx2BuzTRNIb5tDRdV9rqVv5LKjzH2j8RLnptvzwE0cAvNbkdftd+2VMh8NDUrm0mTrAlysdfoOIn+lG7GNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dZttETy33AyCw9rFq8Q28YuRLGez4P/p/jDAegGd5QA=; b=XYhTHk9ceQTUUzufKOhYn6Y3C/EwoZ/UfqV/OzFcLocFfQ5aH3hcMXNwYYK25VbOibbbyZJ56/7UYwEnDxGWwB0EihFaV0zfmQfShu5oPn09pL8R7r+7eFBJYvOJFGjEjKh90WLc9hvD/EHbUyHLBVdKnHhfyikcFzWnUnIronYe0V9xt6aL9CKepsko2FSvcay47r1WykD0U8ffEZmQPDL4xxYxwLBy6OsVvFDpgvUb/glUrt8GFsS4zfH2NUMl7ZEK3dIGp4B9mL066NmIrsTZBQ1IxGbRFwyQK23jk36TSzNBkibIXX5+iGqoHad0plMbDqXvUHRrZFPVeA3HLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dZttETy33AyCw9rFq8Q28YuRLGez4P/p/jDAegGd5QA=; b=hf3NA5m1A3Hk3qM4kADI7Vj0ZNyXbPA852qheAKV8nmg3Cy2/tqx6XiPZ+VjjFA1B4M8n5KDppISJBd92JAvV07EJ3yRdx/g3fQq4VukUrpGSrCe0NErmujX+a1eL+4+2aaVrx5Lwz4M88vvaf+z2v9DGZwqsHsYMCkDf13fokk= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3385.apcprd06.prod.outlook.com (2603:1096:100:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 03:31:55 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:31:55 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 5/7] dma: ioat: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:28 -0700 Message-Id: <1633663733-47199-3-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:31:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 134d82d3-51eb-4292-96e1-08d98a0c2d32 X-MS-TrafficTypeDiagnostic: SL2PR06MB3385: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P1EZivlUlRq30pglCc1VF8ZqRsxkN00xIzxabep4+rE74E2yxSSmDxHsjgJ7nfhCVfTBHyGq2qYNmolHjLRYNSA8F2vrinv/QeM6eD4zv/QTidJdlifKbXvzTuOphqogRCiy4FkSA/2ft9OyvEMxdQ95rSyZeeRIOhZk4qU7CVlHEKLELn8CThIGzwM+CaS66bnmVEoafI8iOSMSuV0KnMZ0g784zW2YZvd1gLRaUcMuTVxvaXvrXh+sAo3Yo0wDpb7sZ6rH5BUgntWTsyAQJi+9WrNOGo6Qyy4LzIkV+t7TIe9FZlTCD044BNkCuQqO+Nh+CV6x/dH5s6U5yHS9OWbJ5tgznEaZRijK+06xGHgFahrGZqOG7/j3tNx6bf40+ZCp7T/GmvNprga5sE8CiJTihyIo9B76tdpJj1loHpYFb+0MPTL0IpFKExgMP6mpMpraMkRenDEfom+7vRhEruGSe5EBzFg0Bu5jifU18yf3xiBlTwlxQz3Pp2XAHV1lTleUtMWKEoabh/6xsLqMoAL5ehFZknQ7rBsCSluDVpxlMEqN1V1ZpKX/U5/gofrtUNs5Qlb+/Z7b7ILehx7pC1OH8YMgaCfJZqwozYbnd6WlS1XjQKubAJDT/N2i6Xl7Z6QZiQwyWI+GDA5ETlaMubUmT2e0DVS90HIgRJjQAmcodyFnNI7VH2pdE8Grhw6D6dsxcxnu7JSYTQBxyKaOxA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(7416002)(2906002)(4326008)(38100700002)(52116002)(36756003)(38350700002)(66946007)(66476007)(66556008)(6506007)(8676002)(186003)(508600001)(86362001)(6486002)(110136005)(107886003)(2616005)(8936002)(83380400001)(956004)(316002)(921005)(5660300002)(6512007)(26005)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lhdLzn5mo0aVDDRT2Jm5YGXYNOehObTBSaoRp0UrB/vJNlIxGKS77+v1v5vVyt3RlprVrem3qtZvUG5mXa2DWslVeMH9PnY9WPLsyPCoEBheeCty0z8Ye8fLjJHUsbHENK3P0fW5AhSgAGkwyPSBmdeZtaMK38xrCwhZNGSTnmd9njFNvXxP6LGhNsMP7sCEyxXUVl6yo91+8PBuoBYP+fHSkSlIlaU/NK1AlHDeHxFWl6zVO8f9eIxy2QX9Bpq/Ko8NnwF62pkbI5qp0SuesPCjBRWdKkK3oy9/s4Uburctume9jKGtruTUG1TgiTHq1EiFbOuKVt9LJeiMMMzCH2LsMMDrnnXTGKmMoIR/JfiKFtwVCdnwWTmJ6c6+oP51FPk7Z4+ki1eqjAuWForO58YNNM5Y8h6+5CovvXpF5w65ancRK+eftLr92kvMaH6v6VDw/lnRiPT8fiK5WBHDvwgtRMZ7t4jOyst6s98b+xivQZiK4RUc+M6DM/qqGI0MV7JK336yHH6r9M22sXw9K5ll+cwVK1F/EhOCa46Nh5p3BOUBvBL/L0QVeFsLytVZ9FbasFZdwS26U6fhSLTr46HRQHKsBQPqsdPQ3Fpt0XSoaXzm6PwCYQfLidZKuWByW3HbruLmaMzdlstY0I5GnpX+4lLcKNfeVmVlv+A8LUlX8bQwNnrLqAJbO592HhE4iZpqBu8WYwnNUiYT+JZL9Rg3evWdg/bk0kvvx9Dvv8KGAb+lcUDWRg2W/n9WW444mRmcmiqPTXZFUpvvJB+R4GCdwecguAb4VtVwSDfMJI4lNMWhBSFsB5laFxxI26NAQRGUMnvjaVCh6AZMD1ghSz4NsBAaie9pVJQItSA3A+Xx77drs/UspwwM1sKDmVFFINg2rIzgeOLEtwW6Ec5MXYlrzcdPeJZnqSIzCFFrFJwtcyLr8gyglfcbrcU0/oyx7wKCStGq/pnp0L2uxRg5Z9KWhJE8QsFKfz7aG8LBlaGMBMsliWFRmXWuvwakPLFYzft0p4/S3QSWSbglEdp2Dm6mnATPb2wGFIrCbBOL/tNucUHFNQFAQXgB9x7duhvLWk4ttcLm/5S+kN04HD4ILAFsthglZQs1Z21jbQfQgIfPUp9T9ZDd9JKs4TttimvrlvMa7JMNo9knzuLEpXAhINUSC69c0r0ArsYJTmdr9Y5Q+/TRhktPQmLp55nsmcD4B23xLKfjYHRdVG3bz1SBF7VdSho4QTxifVolOKVNdy1PfszPztKgmkwUnhWxVpuct6VbCDoKdH/tC3Gg4v/DdBMtjp//MEz06Pu43eJ2ASyj6OoeE6stLhmVp4GQVpwb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 134d82d3-51eb-4292-96e1-08d98a0c2d32 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:31:55.3835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9FKjAlggb8KUnkvlPokHBpy68cbnlw+0ONuuiF0uOdCHGU4KC9BBBrC0n3HdGIhXm+uCK+FgrHTJNwN1AU19GQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3385 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang --- drivers/dma/ioat/init.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c index 191b592..373b8da --- a/drivers/dma/ioat/init.c +++ b/drivers/dma/ioat/init.c @@ -1363,15 +1363,9 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (!iomap) return -ENOMEM; - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (err) - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (err) - return err; - - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (err) - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) return err; From patchwork Fri Oct 8 03:28:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFA90C433FE for ; Fri, 8 Oct 2021 03:33:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A95A260FE3 for ; Fri, 8 Oct 2021 03:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241270AbhJHDf1 (ORCPT ); Thu, 7 Oct 2021 23:35:27 -0400 Received: from mail-eopbgr1320111.outbound.protection.outlook.com ([40.107.132.111]:7275 "EHLO APC01-PU1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240622AbhJHDf0 (ORCPT ); Thu, 7 Oct 2021 23:35:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gtQhRC0eD2Nf1WPUssDHeC2vEyiYeT3b9FpIIrDnCndWOuuv0/Js+rhIi5InJchFZwgMmsdVgOG708jqeoaVI3JgyHKFWK2azxgPZwP9mqm2atoT91sq6uJWhUlaPGJbTt9ncU+ybr5MAFErUYS0TssnaiZ2BbJd5HCObQiRz2vYiSEYtFLZSRul/0zFR879uAiZpF8ZT0/WOV80NvkQTpLXZSojHubBh6RAzTFgl+1W095rW4CZBCPc2qCeZi/uu/Q2rYII3nPnJRk89fOwo8TKpp+TChmW7Yf2SUYZ6oYFyRx5a+IV90qn5x+bXtLBexJVxx2qYBvCx5IWC5WWRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iUX4tIqjvrCqn8oNAd572nlHD7cCfamaFccMMWNEKxQ=; b=Yvo3NEtAluvqg1jbXKSFYsYnBZI1JIDB1gGk1TpQ4avz01PAbPSW34uS5ySXPMwUvSW/8UfpOTxv5yFCWb0uSCTlwoQcFbfteU2YPbcwn+0JcMSB4xnR+18l98a0tTw7QzLhfm5m5GIQnwUD9Mr28Fq7yetS2ccPzs9sQB6LwprFISEg2wJPhxcHrUHgP+K8v+mcalIU0JQOD5K5wJah2ZCSHODDQPqCFl8eGrFXXsP3mhrPkrBtWekYp3ClK4mEPitX0fywx2S69GCTqP6Kux+AqSYh1mMglK3ftu7OMR3+/fHVo2/TtiY0Siy1BHKQIIjO60wlZJRrTAajihS8Ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iUX4tIqjvrCqn8oNAd572nlHD7cCfamaFccMMWNEKxQ=; b=X0zFUA7uyB57rvVCgTK3aQmOZxTR1GGcBbJIGFEvci8QXwHI5k030ay0xHrIXcjQV1vIyi0AQi15xLUC6CIcKVGPEYxpX16bgRqE22bhPkuhmpMSGPsav84cAW+WQ97vYg3elm7SOfe75q+pfvKABbANkZUtAa3iZwXdv8fR3GI= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3115.apcprd06.prod.outlook.com (2603:1096:100:33::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 03:33:27 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:33:27 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 6/7] dma: dmaengine: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:32 -0700 Message-Id: <1633663733-47199-7-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:33:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0643f18c-43e8-4a97-0a5f-08d98a0c6436 X-MS-TrafficTypeDiagnostic: SL2PR06MB3115: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uuK+LERqeWMcnH+iYHngq0LZyuVUrDCnrR8jgWD4UEZwXwgaRLpI33kAC+uWVKvOjwyxK8ktg3SrDBkwxf2P/1g2DAfA6JFa6qkTXBX/qXUEhmu0IaxSB5WTbm/jChRwRt+MIIg+qZVg0ihjbxFijQwTtyp+yhBoU6DXVepWgtuxyXDAO56YZpIBKf9HuNGWuXNwT4EUwkXcCWxqZ4bwm6x+zrf1R4nfii+t0aLMYIstgQRMqxx9bTYgd1yfkDlrMmkW7CQgPEKN8PFivTQ2vZcEzrU5mQljHtJXrbUky6kpwSuoFBO2nqFlB2gMi6xnfNEYCILd2lyIodXSbesNAzCUzh8vD+rIQQCCPYcKE3SCVaw4jtvmXUiPq2s27EhyY30rZuo5JtOeitS0M/9cL3YBXz/EGNLSLPCqmC3P+U2p5e6hTfrmeE9w6QE5tDIK/Ipe2t3iv0WPjk4MF35nvLE1h6Urrb9Xp1qPrpcrzPpiQYFthTvsnqC4Sd7yze5PgHmEK/9FC1BJ9+yk8Yt7aTYZ4/uUyj6BFLgyoN121RDOARcJG2Wzc7lBz9cu+tGIvU6Ir0TA6NeSCx2z/vL+EsaHMfik9xiNuZyG6b6l918VYwty54aQhj/DoNfQ8Lpwwvtr75EspUSEPaDBNgUOnrW6B7ahGKmPtR5rDzzIefYov1fXwxzVfoyXEPGUZ8GZa37ThxVw+RcG6V7b+h4T+g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(5660300002)(8936002)(38350700002)(8676002)(38100700002)(110136005)(921005)(83380400001)(107886003)(86362001)(956004)(2616005)(7416002)(6666004)(316002)(4326008)(2906002)(36756003)(66946007)(6486002)(66476007)(508600001)(6506007)(52116002)(66556008)(26005)(186003)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BmmiBXLrLwijWLjazzfE+67KZnP9M9nHEr5QOo9rOlWxhNcPZI5U2gIU6AIIgpIlJc13a3jprSdR4BjEnJOvEhbK/N2jgWRF/vkSokWXn8hlquRqBBQUi3BeuUe7/pMJqup8yqChLWH395/QIvrzjhhy/hshnuvzQ29QVMHZ5OGfwGUiLVZl6AxdZNM2bAi45AKVU43q50j1IGSoAf/cqdAxZeBvQVoHCgHHJx8ZfWJOpTvgr+GUIVRUTOdQUu3MlkP+bEj1BqRcFMsXFCiDnF2snWlHldQlwdwzj1YenafsJj7PpuerBk1yLECb3jo4oRwqkdybCnhA7gIr7/IOY2r8UbYOd06Pm38BOEMPGXbnMFfTza25xWRg+WaMiFYK6hOUXNEuMkADzcdJnQ/BCq5WAdeW78udSU9DeGF3oVhIk3TXjeJuSlAdkg/0cwaGv8dPHMfyhSWGA55bMT3YsKS6rF4vxm//gouR5sx1v9kfD5svQc9mM5kXZB2tJk4GaFx7h59wWfOsc2lAOi30sz8qIxroJgBIkb2MakVV6ZiU7obe+iWF6P6yElDZh8aPh+1P8qgTVc2MPIZo3OSB5KDE8a4o7DvZBgq39lkVDQVMTmgkzCDOupYk/iP2hkSr589u7Yb+D+ShtDGoKIKyctE0lbA1h/7ep660Jh9i0dDa2/zbcTJeD8xmqR2hEKeEdJ1H+2vnvBnC/JDfWHKXG4VrDAP5eUw73ClRiVF5+csgxBUlY++5rSMoA+965jB/04Ht10joorbyt8w2gP4ogFwdU5uzVzvgdwn8V0KycgXDaWDx8/hhL7Y0AxscZXWxV8Ok8/6SUddLU+IM1HNCX78f2ifujC3P6reuTx9j/8zJxY6fVnrn4y70JwKZ0398qDFfOnZhu51qsAc4ax0c6bHGl8xdoT2935nVt931BJA+n2gZjTQsnYAss8mI4SraB2eYhUcf6uS3GYKZzaIH5mvscxNlZ2JxM49vRKgkqpt5OBNn43fztSxhFfhhT5ZCxKs+rEqmGPlDDfcf1ZGf8M9y1UUnfFTT+EbQLqdjUeA+yokIJQUpVFxj8NBUDwYw62QBwALLi5NcPHu2RTemJWITVyaEKlz7MTvGZWRud87cskKRyvGbSN0OMuEXbsVwe2NBCnx2RXHDEPdHZ4MiS6B66dXoi1gBiYZxAb1CfpJ/fJU5RmMUTL8XEDAfHNZhrMm3wyte9k4zpCZmkxPZ/k0Bd1V1iHVa5cZ8scuZwR9+B7ASS3O803gCZupmtfBIaAP8VDVUq7oQkbXQODdfj4b65v7t5c3UpPa/yp0zmA8YIck40ixDJZoN2VRbOThu X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0643f18c-43e8-4a97-0a5f-08d98a0c6436 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:33:27.7098 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CZ9K8LObCoOrxHF5eTZw+qmoq6vsT0j5b7A3vbrVosLmrNI1Aam+ydOZve4PCOTVY+DS0U68V2F70w69CSNZHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3115 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang Reviewed-by: Logan Gunthorpe --- drivers/dma/plx_dma.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c index 1669345..1ffcb5c --- a/drivers/dma/plx_dma.c +++ b/drivers/dma/plx_dma.c @@ -563,15 +563,9 @@ static int plx_dma_probe(struct pci_dev *pdev, if (rc) return rc; - rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(48)); + rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48)); if (rc) - rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (rc) - return rc; - - rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48)); - if (rc) - rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (rc) return rc; From patchwork Fri Oct 8 03:28:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12544129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC136C433EF for ; Fri, 8 Oct 2021 03:34:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC87860FC3 for ; Fri, 8 Oct 2021 03:34:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241270AbhJHDgA (ORCPT ); Thu, 7 Oct 2021 23:36:00 -0400 Received: from mail-eopbgr1320099.outbound.protection.outlook.com ([40.107.132.99]:38816 "EHLO APC01-PU1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229634AbhJHDf7 (ORCPT ); Thu, 7 Oct 2021 23:35:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lCJE2uP3ZgWsdHexX6WLnZqguuccF8IjAcVsG0W+ypl7QQ+06VwCwGdtlOqvJKh9o//fvttsLKj3PXlJ8Hl7ACmCUSI2CRxN1dFSc26fyPhfHcqpHtSHL83Cts1qdqi4jJH/NvEo8Nv9VLalwoSppn3lkEgX2aFuzYk4YSM2eEtj6v8MMUzdnaKPOPfWLAA8ksEFKxE10ohi5T+2STBDAaxN25N1MxKkN9O7ctOQnhMyjJgB7EXy2P/TBRjTVqHTHssY/zobhXyIfwOMi/SRSm3chihr1iCHAfdOEv03yklXBt2I/U/UYf/fN3+m4SOMECPAV3wyHzWbQTd8JVdcMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1BqDuETXubrgrVWn5JxjfU9r6IQhgCl3M5H4w5mbj44=; b=PXn6WCCsbyr+jlEcJkddpwDJJ/+jTxO0tIH5Unf+ytn2YMsmiHMuczGaosS7GikgerdS7pqn4uH/oHXJwxUjyEuZytnXjvHHpigtk77jcunE1hAstj+cSmt/J1+jedVZHR7ZXk3EH8lIdl3Ig4NEL73G7gHwZWQv61RkHu2mnim2iBmm8im05RWI38hVkKhGDtmdWzCaVBgWyIQF1lZg4DwXQRBIC3f1GmVGwna+rIzfJmkAtfrvVvBETZ3zlC+pGk7zMGBS+64ABZI+5y/hB5Lj7EIOFd9qE2VzJIYSjNi6hmoJqsdlC9wPkFw7Klk4+O4mOuCVmaIEKeIq8G+qSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1BqDuETXubrgrVWn5JxjfU9r6IQhgCl3M5H4w5mbj44=; b=np7tGxVWcm+AgcZiYni4YuMwVP/2YfF6TigSsaY9MPYKloRxIcRqjmPk73eOmON2J2wgvWsl4QIvTG/bFbtG6HMEC/dCxNYt1t+lNRJNPN35wvyVYkeZI4K2OSZwnw1ZDNwqPLJ7ezDVvgCaQr/UBiv/3p8t+ihbcY1UV+xyN3Q= Authentication-Results: synopsys.com; dkim=none (message not signed) header.d=none;synopsys.com; dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by SL2PR06MB3115.apcprd06.prod.outlook.com (2603:1096:100:33::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 03:34:02 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::4c9b:b71f:fb67:6414%6]) with mapi id 15.20.4587.019; Fri, 8 Oct 2021 03:34:02 +0000 From: Qing Wang To: Gustavo Pimentel , Vinod Koul , Viresh Kumar , Andy Shevchenko , Zhou Wang , Logan Gunthorpe , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Cc: Qing Wang Subject: [PATCH V3 7/7] message: fusion: switch from 'pci_' to 'dma_' API Date: Thu, 7 Oct 2021 20:28:33 -0700 Message-Id: <1633663733-47199-8-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633663733-47199-1-git-send-email-wangqing@vivo.com> References: <1633663733-47199-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 Received: from ubuntu.localdomain (103.220.76.181) by HK2PR02CA0209.apcprd02.prod.outlook.com (2603:1096:201:20::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 03:34:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 943ca56f-132f-4d9c-5603-08d98a0c7916 X-MS-TrafficTypeDiagnostic: SL2PR06MB3115: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gOmaNS971rwUTGp46OIQUYXdSQUmgYmW27yD+L8T77D5HWGz6uA/kildnODQDz+cC9mcUkassEJZ7CE2qrBEPugJGFGQJoF2FZe+yifOTCza3okrfQR4ODa7wZdtotYl3GCwgbRCoaapNukbh0kpIKt0Rg+vKdbZ+ohG54oDQAHec8/vck8qLMQXHze2hkjNNsKCLGOzXFzvfoY4nXQzoDC3E8uqF2CQXLQmLwQ9vTI7ZuzInudBPnyb96xnKE8DiI4+0wvuHX1J410BSYodd6ZZbYTmEgh0XMIBkVYRmFN3v4FfVYTIkJJdHBtSL6TRA71lJCy5LZk2zH/1faMzbAKZzApuF3FH3yJp3IH+l/a+BkarggveqHQnM05FMPeApQerB3Qb+l8qcY/pkRJk5Yocetk/RmbqWuy03+zWNEUJr68ddZvf7Nl/qju7oaAAKuDf/BNsEM/KL9NnoBNKFwhYqNBi6jaljZq74A4klvj6wSHtomaV4S194N+LEuRzEvZp0Il/piG8fSCKLSUwagR2zGt+ERDLGVp/GZbV/99kasmicntM/VeWZu/aGDplErai+bNDAxA2lzJid0mPbIxoU8eMA/kazdssNQXo9WNwS0uwG+abHJPTVYa2E+3Z51g5yc+qqAJ3z/QCztGUalgfwIJpWLAhxpDRUbBUBtwU2lEA6NTCIcCmfmUHLpQE/wdfsQQ0GhyJouTGYRXjdA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(5660300002)(8936002)(38350700002)(8676002)(38100700002)(110136005)(921005)(83380400001)(107886003)(86362001)(956004)(2616005)(7416002)(6666004)(316002)(4326008)(15650500001)(2906002)(36756003)(66946007)(6486002)(66476007)(508600001)(6506007)(52116002)(66556008)(26005)(186003)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EIWogR6CKto7uBL8CY9zO4DiTYI95Wwk4y5DdVod3l+9wAUWTDTpbRQsvX+54N+CSXdj5+sXOnqPjtfGqbHH1Q+o9jHWP6OvAeSoy9UWnmnMkfVgUFFCPRnDEu0IzIcyX3WJrKEJSLX2QYC7TN7qtEo1AeV+/1vo+6YxqM2jqVbCULnpkYPcrbQDfY1gtATfKmIhIFm1X1qy/TrIVlY9bqmwYVonJgmwMS3Q6Bw6QDyZB6AU/a+uMfJENHx9LcJCcFyS/aVPfSJQyiLNTsIHRri5sWEuromdElBOpGVIS4zNcAkM7KPC+eqZ/gCMnZunTOWhzhg+dL65cFoU7eY80WnEcO472H4GMKIq6EvFj9dOTGBwFJw2pszLvocqQSBL5/mXszWDUN2Zmfh5kNXcgRTWMa2pEDkLLjR1BP6disnrtkDH4oFFYWjgoz24TxhNF3I5Y9hLA5wu/3wJ1RdfpBYFopKf6KnVyRKgp5E76wyZqqf5QMUOfRCPrwGizY/UsCP4F5v2Mk3pgjT4UVrGDcyzeTrtqm1Ro4sdb2MTa/YnkCueYZMYnH7fLEwwSQohG+80HJuUXus5vDfPKyfRf9kfvvjlIVMM9LgZXZik7g77vReq7Ji9YSkVDgeKoG+CGN3OO3RSSmsX4OJ0t2mYwv2h/wQtIpDkfkkEJIzv3vJNISKmtWJ4FA/I2HUPbfSQsaFcz5k4Zm5Ms9bkPTGuDMorSK7+D04HRMNzQWzRyLZpuHBTyt22NE2XYNlMmKH7SQFi6wY4Okd0Lumy/ne+o8E5gBgOuA/SRvlMmbmQ4mLAFh/hw6EWtSEC+wlHsfNiuzmJnKRLpmD6DOlrOxT5YoDtCOoNFK/JNKd6+1FszcLnES25lM/iizFy8R49qUWLSsaRf/5nrbmxgnCUWtAEssdiA0HvH84c4jLkVVE/+qNDagBWs0Z7FRNU7/2Iikqe8fjFW+BGvq9OZ3kmspaucVARut/gOwP6wHKlHYvkdp+6pyFeVXkYx0EqBLc0K3UAxnPoB9E48USgbe5jpg4smi5QMtuTZFoRINOWXLG4WeMJVFKrF9w3PngSGRzJlq7Dw5c1WR/KJESb+ochXwE7+4DpMhAqbazoNEKx7i4Ka2YKUb5PA3vo2WEFRFW7U8+WAFAHQTz2a/KkXmYFUDg3ZsvdvbnREQcfTbZjHWOeVzEa1BNeyp42FvM5rF9CSpkU7gK0C/DyBPEpH5YK3/v6iOIk8714x+gK90YKeFTEqYJjc2LR4yM0l9sP9HloJr+hGJN1L1Ymg/sI9lHHYHgxRWqO8FrHmPKpPnbcwPJ73gORF2Yj6+weOV+ltOn0AFAv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 943ca56f-132f-4d9c-5603-08d98a0c7916 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 03:34:02.6722 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vHLD09XPvIjQ+WaIdoOSsjADthtUoq0j/cFjdn9EGhs2ELuqPNQNMEJ8/2HQF//b8UZ/306sZkC8WCfuEzFONg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SL2PR06MB3115 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang --- drivers/message/fusion/mptbase.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 7f7abc9..c255d8a --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -1666,16 +1666,12 @@ mpt_mapresources(MPT_ADAPTER *ioc) const uint64_t required_mask = dma_get_required_mask (&pdev->dev); if (required_mask > DMA_BIT_MASK(32) - && !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) - && !pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(64))) { + && dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { ioc->dma_mask = DMA_BIT_MASK(64); dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n", ioc->name)); - } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) - && !pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(32))) { + } else if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) { ioc->dma_mask = DMA_BIT_MASK(32); dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n", @@ -1686,9 +1682,7 @@ mpt_mapresources(MPT_ADAPTER *ioc) goto out_pci_release_region; } } else { - if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) - && !pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(32))) { + if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) { ioc->dma_mask = DMA_BIT_MASK(32); dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n", @@ -4452,9 +4446,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc) */ if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078 && ioc->dma_mask > DMA_BIT_MASK(35)) { - if (!pci_set_dma_mask(ioc->pcidev, DMA_BIT_MASK(32)) - && !pci_set_consistent_dma_mask(ioc->pcidev, - DMA_BIT_MASK(32))) { + if (!dma_set_mask_and_coherent(&ioc->pcidev, DMA_BIT_MASK(32))) { dma_mask = DMA_BIT_MASK(35); d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT "setting 35 bit addressing for " @@ -4462,10 +4454,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc) ioc->name)); } else { /*Reseting DMA mask to 64 bit*/ - pci_set_dma_mask(ioc->pcidev, - DMA_BIT_MASK(64)); - pci_set_consistent_dma_mask(ioc->pcidev, - DMA_BIT_MASK(64)); + dma_set_mask_and_coherent(&ioc->pcidev, DMA_BIT_MASK(64)); printk(MYIOC_s_ERR_FMT "failed setting 35 bit addressing for " @@ -4600,9 +4589,8 @@ PrimeIocFifos(MPT_ADAPTER *ioc) alloc_dma += ioc->reply_sz; } - if (dma_mask == DMA_BIT_MASK(35) && !pci_set_dma_mask(ioc->pcidev, - ioc->dma_mask) && !pci_set_consistent_dma_mask(ioc->pcidev, - ioc->dma_mask)) + if (dma_mask == DMA_BIT_MASK(35) && + !dma_set_mask_and_coherent(&ioc->pcidev, ioc->dma_mask)) d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT "restoring 64 bit addressing\n", ioc->name)); @@ -4625,9 +4613,8 @@ PrimeIocFifos(MPT_ADAPTER *ioc) ioc->sense_buf_pool = NULL; } - if (dma_mask == DMA_BIT_MASK(35) && !pci_set_dma_mask(ioc->pcidev, - DMA_BIT_MASK(64)) && !pci_set_consistent_dma_mask(ioc->pcidev, - DMA_BIT_MASK(64))) + if (dma_mask == DMA_BIT_MASK(35) && + !dma_set_mask_and_coherent(&ioc->pcidev, DMA_BIT_MASK(64))) d36memprintk(ioc, printk(MYIOC_s_DEBUG_FMT "restoring 64 bit addressing\n", ioc->name));