Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1882640pxj; Sun, 13 Jun 2021 01:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3CD1EwX97cqMthxQGux6ZROvXzqmnp4Lq3DmUOgC2123Jp4Wyt+QBFc/mVWh9IKzaug6z X-Received: by 2002:a05:6402:1906:: with SMTP id e6mr11801899edz.14.1623572679880; Sun, 13 Jun 2021 01:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623572679; cv=none; d=google.com; s=arc-20160816; b=LBxZyrKVsxcTfbSHM0hNV9ZXkN+UB8Eo++bgQzzpc3hpRLtYEUrXOotjc/twYfBx9F MxWlPCYVfbbEkE1f/Ai/9CYxk4sDSCwsflTYitA6dpwWgvDc1KNVpBrxm5P3FF5+As7b 4t57nX5/zqCXFl96sAULHgYVKqIvF1/OwygAnhJgZf2zvklN2OfLhF1kPcYAXmx4uazJ vuR1HFZR0/6ItfuUH6eKNZz3BbAXL+Xs7cI2bvbHOYcqKT+cilnq9jWOjYT+0NL1QHv0 L266fGTYfYjABJKYKpyP2Ek5jS1pnrcQq1WfOFfsMHV9Wwj9G7jp72wjcjIB9loM0vRv qJfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=duZsjDD4OJnEtNFIa1/dT+IrEWl8cO6Yx5Qn7obbmpQ=; b=Qn4gdXGGnjgUPsH0UgVRQuO7e9SJXsskWpVKKeHKRQUxLJ4MRLpBhw0ziCYGpxwQqV PbCQ2+m0VLzy/bOJwr2FW45sYynUy8tkJb4qCaSuOLp7WYsSbKzuUaljjzKzQcwkv2mp Mk9ip2wGf9V3zMC4sAoM3djNMAUh07+PA3XAcAo3VWkQTbm8bVNlvQyS7QoWTLSHnPHP 7HRfDCgHOzTInetLfOKrrhjO1WsNuu/3x0/ZRBUPUhasC4dFnbKX4Dgdexnjn9dclWT2 6TCgIev0usHOfnk/lkAQwo+dRjlc/9fhBfnFl8CWZnLi7mBeBjCRx7TciabBTxkOsZwW rByQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si8824986edh.532.2021.06.13.01.24.17; Sun, 13 Jun 2021 01:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbhFMIYt (ORCPT + 99 others); Sun, 13 Jun 2021 04:24:49 -0400 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:56504 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbhFMIYt (ORCPT ); Sun, 13 Jun 2021 04:24:49 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d41 with ME id GYNl2500P21Fzsu03YNmao; Sun, 13 Jun 2021 10:22:47 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 13 Jun 2021 10:22:47 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com, suganath-prabu.subramani@broadcom.com Cc: MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 0/3] scsi: mptbase: switch from 'pci_' to 'dma_' API Date: Sun, 13 Jun 2021 10:22:43 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to convert this file to the dma_ API, 3 steps are proposed. The first one is purely mechanical. All the updated memory allocations can use GFP_KERNEL because of 'mpt_config()' calls. This function can sleep so it sounds like a reasonable assumption to use GFP_KERNEL. The 2nd patch may be discussed further. GFP_ATOMIC is needed because at least one of the caller might sleep. But if we want to avoid GFP_ATOMIC as much as possible, the 'sleepFlag' could be passed in order to use the "right" flag. All other callers would need to be invistigated to see if GFP_ATOMIC or GFP_KERNEL is needed. The 3rd patch is just a clean up. When 'dma_set_mask_and_coherent' can be used, it is less verbose than 'dma_set_mask()/dma_set_coherent_mask()'. In this patch, look at the comment below ---, because the code looks spurious to me, but as I know neither this hardware, nor the "1078 errata", I'll let anyone that understand this this code to send the correct fix, if needed. Christophe JAILLET (3): scsi: mptbase: switch from 'pci_' to 'dma_' API scsi: mptbase: switch from 'pci_' to 'dma_' API in 'mpt_alloc_fw_memory()' scsi: mptbase: use 'dma_set_mask_and_coherent()' to simplify code drivers/message/fusion/mptbase.c | 151 +++++++++++++++++-------------- 1 file changed, 82 insertions(+), 69 deletions(-) -- 2.30.2