powerpc/macio: set a proper dma_coherent_mask

"Linux Kernel Mailing List" <[email protected]> Fri, 16 Feb 2018 20:48:25 +0000 (UTC)
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/7bcfab202ca71bece02b283cdd104301c07eece4
Commit:     7bcfab202ca71bece02b283cdd104301c07eece4
Parent:     ecc2dc55ce79945c2e0a04977706a99dc4848229
Refname:    refs/heads/master
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Tue Feb 13 07:44:34 2018 -0800
Committer:  Christoph Hellwig <[email protected]>
CommitDate: Tue Feb 13 08:58:53 2018 -0800

    powerpc/macio: set a proper dma_coherent_mask
    
    We have expected busses to set up a coherent mask to properly use the
    common dma mapping code for a long time, and now that I've added a warning
    macio turned out to not set one up yet.  This sets it to the same value
    as the dma_mask, which seems to be what the drivers expect.
    
    Reported-by: Mathieu Malaterre <[email protected]>
    Tested-by: Mathieu Malaterre <[email protected]>
    Reported-by: Meelis Roos <[email protected]>
    Tested-by: Meelis Roos <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
---
 drivers/macintosh/macio_asic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 62f541f968f6..07074820a167 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -375,6 +375,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 	dev->ofdev.dev.of_node = np;
 	dev->ofdev.archdata.dma_mask = 0xffffffffUL;
 	dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask;
+	dev->ofdev.dev.coherent_dma_mask = dev->ofdev.archdata.dma_mask;
 	dev->ofdev.dev.parent = parent;
 	dev->ofdev.dev.bus = &macio_bus_type;
 	dev->ofdev.dev.release = macio_release_dev;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html