patch-2.3.47 linux/include/asm-i386/pci.h

Next file: linux/include/asm-ia64/pci.h
Previous file: linux/include/asm-arm/unaligned.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/include/asm-i386/pci.h linux/include/asm-i386/pci.h
@@ -52,8 +52,10 @@
  * until either pci_unmap_single or pci_dma_sync_single is performed.
  */
 extern inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
-					size_t size)
+					size_t size, int direction)
 {
+	if (direction == PCI_DMA_NONE)
+		BUG();
 	return virt_to_bus(ptr);
 }
 
@@ -65,8 +67,10 @@
  * whatever the device wrote there.
  */
 extern inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
-				    size_t size)
+				    size_t size, int direction)
 {
+	if (direction == PCI_DMA_NONE)
+		BUG();
 	/* Nothing to do */
 }
 
@@ -86,8 +90,10 @@
  * the same here.
  */
 extern inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
-			     int nents)
+			     int nents, int direction)
 {
+	if (direction == PCI_DMA_NONE)
+		BUG();
 	return nents;
 }
 
@@ -96,8 +102,10 @@
  * pci_unmap_single() above.
  */
 extern inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
-				int nents)
+				int nents, int direction)
 {
+	if (direction == PCI_DMA_NONE)
+		BUG();
 	/* Nothing to do */
 }
 
@@ -112,8 +120,10 @@
  */
 extern inline void pci_dma_sync_single(struct pci_dev *hwdev,
 				       dma_addr_t dma_handle,
-				       size_t size)
+				       size_t size, int direction)
 {
+	if (direction == PCI_DMA_NONE)
+		BUG();
 	/* Nothing to do */
 }
 
@@ -125,9 +135,21 @@
  */
 extern inline void pci_dma_sync_sg(struct pci_dev *hwdev,
 				   struct scatterlist *sg,
-				   int nelems)
+				   int nelems, int direction)
 {
+	if (direction == PCI_DMA_NONE)
+		BUG();
 	/* Nothing to do */
+}
+
+/* Return whether the given PCI device DMA address mask can
+ * be supported properly.  For example, if your device can
+ * only drive the low 24-bits during PCI bus mastering, then
+ * you would pass 0x00ffffff as the mask to this function.
+ */
+extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
+{
+	return 1;
 }
 
 /* These macros should be used after a pci_map_sg call has been done

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)