Will McVicker 35797e672f 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>
2022-08-01 15:15:32 -05:00
..
2022-05-31 09:56:54 -07:00
2021-06-16 17:20:40 -05:00
2022-03-07 12:06:10 -07:00
2020-07-29 14:25:18 -05:00
2022-03-09 18:30:46 -06:00
2022-03-09 18:30:46 -06:00
2022-05-31 09:56:54 -07:00
2022-05-27 15:25:10 -07:00
2022-05-31 09:56:54 -07:00
2022-01-16 08:08:11 +02:00
2022-03-22 11:23:53 -05:00
2021-02-10 16:46:29 -06:00
2022-03-22 17:16:21 -05:00
2021-09-28 13:43:17 -05:00
2020-08-05 18:23:14 -05:00