From: Pavel Roskin Date: Thu, 18 Feb 2010 17:34:36 +0000 (-0800) Subject: compat: backport for ARM dma_sync_single_range_*() helpers X-Git-Tag: compat-linux-2.6.34.y~24 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ef968cbcfb8d08c94ea2349987808cfdbc4690e0;p=~emulex%2Ffor-vlad%2Fcompat.git compat: backport for ARM dma_sync_single_range_*() helpers This backports for ARM dma_sync_single_range_for_cpu() and dma_sync_single_range_for_device() needed by the b44 Ethernet driver. Signed-off-by: Pavel Roskin Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h index 657cba0..e9de41e 100644 --- a/include/linux/compat-2.6.27.h +++ b/include/linux/compat-2.6.27.h @@ -188,6 +188,30 @@ static inline int iwe_stream_lcp_len(struct iw_request_info *info) return IW_EV_LCP_LEN; } +#ifdef CONFIG_ARM + +/* + * The caller asks to handle a range between offset and offset + size, + * but we process a larger range from 0 to offset + size due to lack of + * offset support. + */ + +static inline void dma_sync_single_range_for_cpu(struct device *dev, + dma_addr_t handle, unsigned long offset, size_t size, + enum dma_data_direction dir) +{ + dma_sync_single_for_cpu(dev, handle, offset + size, dir); +} + +static inline void dma_sync_single_range_for_device(struct device *dev, + dma_addr_t handle, unsigned long offset, size_t size, + enum dma_data_direction dir) +{ + dma_sync_single_for_device(dev, handle, offset + size, dir); +} + +#endif /* arm */ + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */ #endif /* LINUX_26_27_COMPAT_H */