diff options
| author | Will McVicker <[email protected]> | 2022-06-13 22:26:11 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2022-08-01 20:15:32 +0000 |
| commit | 35797e672ff0610224d80e3cc08393fef1032f9a (patch) | |
| tree | ba6cd700d9cc9188a557c8f2fb252765f5fa6667 /drivers/pci/controller/dwc/pcie-uniphier.c | |
| parent | PCI: dwc: Check iATU in/outbound range setup status (diff) | |
| download | kernel-35797e672ff0610224d80e3cc08393fef1032f9a.tar.gz kernel-35797e672ff0610224d80e3cc08393fef1032f9a.zip | |
PCI: dwc: Fix MSI msi_msg DMA mapping
As of 07940c369a6b ("PCI: dwc: Fix MSI page leakage in suspend/resume"),
the PCIe designware host driver has been using the driver data allocation
for the msi_msg DMA mapping which can result in a DMA_MAPPING_ERROR due to
the DMA overflow check in dma_direct_map_page() when the address is greater
than 32 bits (reported in [1]). The commit was trying to address a memory
leak on suspend/resume by moving the MSI mapping to dw_pcie_host_init(),
but subsequently dropped the page allocation thinking it wasn't needed.
To fix the DMA mapping issue as well as make msi_msg DMA'able, switch back
to allocating a 32-bit page for the msi_msg. To avoid the suspend/resume
leak, allocate the page in dw_pcie_host_init() since that shouldn't be
called during suspend/resume.
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by: Will McVicker <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-uniphier.c')
0 files changed, 0 insertions, 0 deletions
