|
@@ -111,6 +111,16 @@ static inline int dma_set_mask_and_coherent(struct device *dev, u64 mask)
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * Similar to the above, except it deals with the case where the device
|
|
|
+ * does not have dev->dma_mask appropriately setup.
|
|
|
+ */
|
|
|
+static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
|
|
|
+{
|
|
|
+ dev->dma_mask = &dev->coherent_dma_mask;
|
|
|
+ return dma_set_mask_and_coherent(dev, mask);
|
|
|
+}
|
|
|
+
|
|
|
extern u64 dma_get_required_mask(struct device *dev);
|
|
|
|
|
|
static inline unsigned int dma_get_max_seg_size(struct device *dev)
|