[PATCH RFC] powerpc/kernel: Don't check for dev->dma_mask in fsl_set_dma_mask

Darren Stevens darren at stevens-zone.net
Sun Sep 2 21:30:34 AEST 2018


To enable use of dma to all ram on a corenet generic system, we add the
function fsl_pci_dma_set_mask, and link it into the ppc.md structure.

But this function checks for the presence of dev->dma_mask and dma_ops
at entry, and fails if one or other are missing. Powerpc's dma_set_mask 
(which it is called from) doesn't check this until after it has set the 
dma_mask for pci devs, this difference shows up on a Cyrus (AmigaOne X5000)
- a soundblaster live pci card, will works properly if memory is limited 
to <4G, but fail on probe with the following message if the memory is >=4G

[    4.646531] snd_emu10k1 1000:04:04.0: architecture does not support PCI 
busmaster DMA with mask 0x7fffffff

Remove the dev->mask tests to make the routines behave similarly. 

Signed-off-by: Darren Stevens <darren at stevens-zone.net>

---

This fix looks wrong to me, although it works. The test needs to be removed,
moving it to the end of the function doesn't work either. This needs someone
with more knowledge of what's going on to take a look.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dma.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20180902/19babc2f/attachment.ksh>


More information about the Linuxppc-dev mailing list