From: Yusuf Khan <yusisamerican@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-pci@vger.kernel.org, tiwai@suse.com, perex@perex.cz,
alex.bou9@gmail.com, mporter@kernel.crashing.org,
logang@deltatee.com, kurt.schwemmer@microsemi.com,
bhelgaas@google.com, kw@linux.com, robh@kernel.org,
lorenzo.pieralisi@arm.com, jonathan.derrick@linux.dev,
nirmal.patel@linux.intel.com,
Yusuf Khan <yusisamerican@gmail.com>
Subject: [PATCH] Removed some usages of the deprecated "pci-dma-compat.h" KPI
Date: Tue, 22 Feb 2022 21:15:45 -0800 [thread overview]
Message-ID: <20220223051545.572235-1-yusisamerican@gmail.com> (raw)
The inspiration for this commit comes from Christophe
JAILLET in [1], you can find reasons for why this was removed
linked there. This removes the use of the KPI in some pci
components and rapidio(whatever that is) devices.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux
-next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
---
drivers/pci/controller/vmd.c | 1 +
drivers/pci/switch/switchtec.c | 1 +
drivers/rapidio/devices/tsi721.c | 8 ++++----
sound/pci/asihpi/hpios.c | 1 +
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index cc166c683638..244dc0f2f71e 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -17,6 +17,7 @@
#include <linux/srcu.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
+#include <linux/dma-mapping.h>
#include <asm/irqdomain.h>
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index c36c1238c604..05a876ec1463 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -15,6 +15,7 @@
#include <linux/wait.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/nospec.h>
+#include <linux/dma-mapping.h>
MODULE_DESCRIPTION("Microsemi Switchtec(tm) PCIe Management Driver");
MODULE_VERSION("0.1");
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index 4dd31dd9feea..b3134744fb55 100644
--- a/drivers/rapidio/devices/tsi721.c
+++ b/drivers/rapidio/devices/tsi721.c
@@ -2836,17 +2836,17 @@ static int tsi721_probe(struct pci_dev *pdev,
}
/* Configure DMA attributes. */
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
- err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
+ err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
if (err) {
tsi_err(&pdev->dev, "Unable to set DMA mask");
goto err_unmap_bars;
}
- if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
+ if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)))
tsi_info(&pdev->dev, "Unable to set consistent DMA mask");
} else {
- err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+ err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
if (err)
tsi_info(&pdev->dev, "Unable to set consistent DMA mask");
}
diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c
index 6fe60d13e24b..08757c92aee5 100644
--- a/sound/pci/asihpi/hpios.c
+++ b/sound/pci/asihpi/hpios.c
@@ -10,6 +10,7 @@ HPI Operating System function implementation for Linux
(C) Copyright AudioScience Inc. 1997-2003
******************************************************************************/
#define SOURCEFILE_NAME "hpios.c"
+#include <linux/dma-mapping.h>
#include "hpi_internal.h"
#include "hpidebug.h"
#include <linux/delay.h>
--
2.25.1
next reply other threads:[~2022-02-23 5:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 5:15 Yusuf Khan [this message]
2022-02-23 9:54 ` [PATCH] Removed some usages of the deprecated "pci-dma-compat.h" KPI Yusuf Khan
2022-02-25 18:20 ` Bjorn Helgaas
2022-02-26 2:12 ` Yusuf Khan
2022-02-25 18:19 ` Bjorn Helgaas
2022-02-26 4:16 ` Yusuf Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220223051545.572235-1-yusisamerican@gmail.com \
--to=yusisamerican@gmail.com \
--cc=alex.bou9@gmail.com \
--cc=bhelgaas@google.com \
--cc=jonathan.derrick@linux.dev \
--cc=kurt.schwemmer@microsemi.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=mporter@kernel.crashing.org \
--cc=nirmal.patel@linux.intel.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox