[RFC PATCH] powerpc: fix get_arch_dma_ops() for NTB devices

Christoph Hellwig hch at lst.de
Mon Feb 4 19:17:52 AEDT 2019


On Wed, Jan 30, 2019 at 11:58:40PM +1100, Michael Ellerman wrote:
> Alexander Fomichev <fomichev.ru at gmail.com> writes:
> 
> > get_dma_ops() falls into arch-dependant get_arch_dma_ops(), which
> > historically returns NULL on PowerPC. Therefore dma_set_mask() fails.
> > This affects Switchtec (and probably other) NTB devices, that they fail
> > to initialize.
> 
> What's an NTB device?
> 
> drivers/ntb I assume?
> 
> So it's a PCI device of some sort, but presumably the device you're
> calling dma_set_mask() on is an NTB device not a PCI device?
> 
> But then it works if you tell it to use the PCI DMA ops?
> 
> At the very least the code should be checking for the NTB bus type and
> only returning the PCI ops in that specific case, not for all devices.

Can you provide the context?  E.g. the patch and the rest of the commit
log.  This all looks rather odd to me.


More information about the Linuxppc-dev mailing list