summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/dwc/pci-layerscape.c
diff options
context:
space:
mode:
authorWill McVicker <willmcvicker@google.com>2022-06-13 17:26:11 -0500
committerBjorn Helgaas <bhelgaas@google.com>2022-08-01 15:15:32 -0500
commit35797e672ff0610224d80e3cc08393fef1032f9a (patch)
treeba6cd700d9cc9188a557c8f2fb252765f5fa6667 /drivers/pci/controller/dwc/pci-layerscape.c
parentce06bf570390fb8b41d581e5d594727b51367179 (diff)
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/Yo0soniFborDl7+C@google.com/ Signed-off-by: Will McVicker <willmcvicker@google.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-layerscape.c')
0 files changed, 0 insertions, 0 deletions