Re: [PATCH v7 23/25] PCI: dwc: Restore DMA-mask after MSI-data allocation

From: Christoph Hellwig
Date: Fri Dec 16 2022 - 04:50:20 EST


On Fri, Dec 16, 2022 at 12:34:23PM +0300, Serge Semin wrote:
> What about instead of save/restore pattern I'll just change the
> dma_set_mask_and_coherent() method with the dma_set_coherent_mask()
> function call? It seems cleaner. Like this:

> Thus the platform-specific streaming DMA mask would be preserved.
> Since it's PCIe then having the streaming DMA-mask less than 32-bits
> wide is very much improbable. Moreover DW PCIe AXI-interface can be
> synthesize only with one out of two address bus widths: 32 and 64.

Where platform-specific means the dwc subdriver? Yes, that seems
to work. Alternatively have a flag that says which streaming mask
to set.