[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB918DA5CBA08DE8+20240802161109.240191-1-wangyuli@uniontech.com>
Date: Sat, 3 Aug 2024 00:11:09 +0800
From: WangYuli <wangyuli@...ontech.com>
To: bhelgaas@...gle.com,
siyuli@...nfly.com
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
guanwentao@...ontech.com,
linux@...izon.com,
pat-lkml@...ey.org,
alex.williamson@...hat.com,
WangYuli <wangyuli@...ontech.com>
Subject: [PATCH] PCI: Add function 0 DMA alias quirk for Glenfly arise chip
Add DMA support for audio function of Glenfly arise chip,
which uses request id of function 0.
Signed-off-by: SiyuLi <siyuli@...nfly.com>
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
drivers/pci/quirks.c | 6 ++++++
include/linux/pci_ids.h | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index a2ce4e08edf5..a6cb8b314fae 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4246,6 +4246,12 @@ static void quirk_dma_func0_alias(struct pci_dev *dev)
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH, 0xe832, quirk_dma_func0_alias);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH, 0xe476, quirk_dma_func0_alias);
+/*
+ * Some Glenfly chips use function 0 as the PCIe requester ID for DMA too.
+ */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_GLENFLY, PCI_DEVICE_ID_GLENFLY_ARISE10C0_AUDIO, quirk_dma_func0_alias);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_GLENFLY, PCI_DEVICE_ID_GLENFLY_ARISE1020_AUDIO, quirk_dma_func0_alias);
+
static void quirk_dma_func1_alias(struct pci_dev *dev)
{
if (PCI_FUNC(dev->devfn) != 1)
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index e388c8b1cbc2..35d2314cc433 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1654,6 +1654,10 @@
#define PCI_DEVICE_ID_RICOH_R5C832 0x0832
#define PCI_DEVICE_ID_RICOH_R5C843 0x0843
+#define PCI_VENDOR_ID_GLENFLY 0x6766
+#define PCI_DEVICE_ID_GLENFLY_ARISE10C0_AUDIO 0x3D40
+#define PCI_DEVICE_ID_GLENFLY_ARISE1020_AUDIO 0x3D41
+
#define PCI_VENDOR_ID_DLINK 0x1186
#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00
--
2.43.4
Powered by blists - more mailing lists