summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-27 09:02:55 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-28 12:46:54 +0200
commitf068fe3170bcf06f14fd0a9eec0be12be04ff012 (patch)
treebc3e751c6a163515ada11ccd4e08465413c63b71 /include/linux/device.h
parent884571f0de7b02bb784be3a5c870eabce62cdaeb (diff)
core, dma-direct: add a flag 32-bit dma limits
Various PCI bridges (VIA PCI, Xilinx PCIe) limit DMA to only 32-bits even if the device itself supports more. Add a single bit flag to struct device (to be moved into the dma extension once we get to it) to flag such devices and reject larger DMA to them. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 563077d1cdc1..00b6c3b42437 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -904,6 +904,8 @@ struct dev_links_info {
* @offline: Set after successful invocation of bus type's .offline().
* @of_node_reused: Set if the device-tree node is shared with an ancestor
* device.
+ * @dma_32bit_limit: bridge limited to 32bit DMA even if the device itself
+ * indicates support for a higher limit in the dma_mask field.
*
* At the lowest level, every device in a Linux system is represented by an
* instance of struct device. The device structure contains the information
@@ -992,6 +994,7 @@ struct device {
bool offline_disabled:1;
bool offline:1;
bool of_node_reused:1;
+ bool dma_32bit_limit:1;
};
static inline struct device *kobj_to_dev(struct kobject *kobj)