Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: ioat: use PCI core macros for PCIe Capability

The PCIe Capability is defined by the PCIe spec, so use the PCI_EXP_DEVCTL
macros defined by the PCI core instead of defining copies in IOAT. This
makes it easier to find all uses of the PCIe Device Control register. No
functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230307214615.887354-1-helgaas@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Bjorn Helgaas and committed by
Vinod Koul
8f6707d0 3765af04

+3 -10
+3 -3
drivers/dma/ioat/init.c
··· 1191 1191 ioat_dma->dca = ioat_dca_init(pdev, ioat_dma->reg_base); 1192 1192 1193 1193 /* disable relaxed ordering */ 1194 - err = pcie_capability_read_word(pdev, IOAT_DEVCTRL_OFFSET, &val16); 1194 + err = pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &val16); 1195 1195 if (err) 1196 1196 return pcibios_err_to_errno(err); 1197 1197 1198 1198 /* clear relaxed ordering enable */ 1199 - val16 &= ~IOAT_DEVCTRL_ROE; 1200 - err = pcie_capability_write_word(pdev, IOAT_DEVCTRL_OFFSET, val16); 1199 + val16 &= ~PCI_EXP_DEVCTL_RELAX_EN; 1200 + err = pcie_capability_write_word(pdev, PCI_EXP_DEVCTL, val16); 1201 1201 if (err) 1202 1202 return pcibios_err_to_errno(err); 1203 1203
-7
drivers/dma/ioat/registers.h
··· 14 14 #define IOAT_PCI_CHANERR_INT_OFFSET 0x180 15 15 #define IOAT_PCI_CHANERRMASK_INT_OFFSET 0x184 16 16 17 - /* PCIe config registers */ 18 - 19 - /* EXPCAPID + N */ 20 - #define IOAT_DEVCTRL_OFFSET 0x8 21 - /* relaxed ordering enable */ 22 - #define IOAT_DEVCTRL_ROE 0x10 23 - 24 17 /* MMIO Device Registers */ 25 18 #define IOAT_CHANCNT_OFFSET 0x00 /* 8-bit */ 26 19