summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/pci.h')
-rw-r--r--include/asm-mips/pci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h
index 78f6a63e9..a5a4ee7b8 100644
--- a/include/asm-mips/pci.h
+++ b/include/asm-mips/pci.h
@@ -209,9 +209,18 @@ extern inline void pci_dma_sync_sg(struct pci_dev *hwdev,
*/
extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
{
+ /*
+ * we fall back to GFP_DMA when the mask isn't all 1s,
+ * so we can't guarantee allocations that must be
+ * within a tighter range than GFP_DMA..
+ */
+ if (mask < 0x00ffffff)
+ return 0;
+
return 1;
}
+
/*
* These macros should be used after a pci_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.