[PATCH] powerpc/powernv/pci: Return failure for some uses of dma_set_mask()

Russell Currey ruscur at russell.cc
Fri Jul 28 10:54:17 AEST 2017


On Wed, 2017-07-26 at 15:26 +1000, Alistair Popple wrote:
> Commit 8e3f1b1d8255 ("powerpc/powernv/pci: Enable 64-bit devices to access
> > 4GB DMA space") introduced the ability for PCI device drivers to request a
> 
> DMA mask between 64 and 32 bits and actually get a mask greater than
> 32-bits. However currently if certain machine configuration dependent
> conditions are not meet the code silently falls back to a 32-bit mask.
> 
> This makes it hard for device drivers to detect which mask they actually
> got. Instead we should return an error when the request could not be
> fulfilled which allows drivers to either fallback or implement other
> workarounds as documented in DMA-API-HOWTO.txt.
> 
> Signed-off-by: Alistair Popple <alistair at popple.id.au>

Acked-by: Russell Currey <ruscur at russell.cc>


More information about the Linuxppc-dev mailing list