]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
zorro: Set up z->dev.dma_mask for the DMA API
authorMichael Schmitz <schmitzmic@gmail.com>
Fri, 2 Mar 2018 23:04:13 +0000 (12:04 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:44 +0000 (07:50 +0200)
commitb19d676b7715deaaaf1f53cb0af6c58712c11504
tree8da315bdc867e62a906096159d5e26535b64aa7d
parent796fd6b5939248415f88016a77f5b32692c40ca2
zorro: Set up z->dev.dma_mask for the DMA API

[ Upstream commit 55496d3fe2acd1a365c43cbd613a20ecd4d74395 ]

The generic DMA API uses dev->dma_mask to check the DMA addressable
memory bitmask, and warns if no mask is set or even allocated.

Set z->dev.dma_coherent_mask on Zorro bus scan, and make z->dev.dma_mask
to point to z->dev.dma_coherent_mask so device drivers that need DMA have
everything set up to avoid warnings from dma_alloc_coherent(). Drivers can
still use dma_set_mask_and_coherent() to explicitly set their DMA bit mask.

Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
[geert: Handle Zorro II with 24-bit address space]
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/zorro/zorro.c