Date: Fri, 5 Apr 2019 11:05:56 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345907 - stable/11/sys/compat/linuxkpi/common/include/linux Message-ID: <201904051105.x35B5uTm096093@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Apr 5 11:05:55 2019 New Revision: 345907 URL: https://svnweb.freebsd.org/changeset/base/345907 Log: MFC r345090: Implement dma_set_mask_and_coherent() in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Fri Apr 5 10:00:40 2019 (r345906) +++ stable/11/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Fri Apr 5 11:05:55 2019 (r345907) @@ -119,6 +119,17 @@ dma_set_coherent_mask(struct device *dev, u64 mask) return 0; } +static inline int +dma_set_mask_and_coherent(struct device *dev, u64 mask) +{ + int r; + + r = dma_set_mask(dev, mask); + if (r == 0) + dma_set_coherent_mask(dev, mask); + return (r); +} + static inline void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904051105.x35B5uTm096093>