patch-2.4.0-test8 linux/include/asm-arm/scatterlist.h
Next file: linux/include/asm-arm/shmparam.h
Previous file: linux/include/asm-arm/ptrace.h
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Sun Sep 3 11:19:11 2000
- Orig file:
v2.4.0-test7/linux/include/asm-arm/scatterlist.h
- Orig date:
Tue Jan 20 16:39:43 1998
diff -u --recursive --new-file v2.4.0-test7/linux/include/asm-arm/scatterlist.h linux/include/asm-arm/scatterlist.h
@@ -1,12 +1,24 @@
#ifndef _ASMARM_SCATTERLIST_H
#define _ASMARM_SCATTERLIST_H
+#include <asm/types.h>
+
struct scatterlist {
- char * address; /* Location data is to be transferred to */
- char * alt_address; /* Location of actual if address is a
- * dma indirect buffer. NULL otherwise */
- unsigned int length;
+ char *address; /* virtual address */
+ char *alt_address; /* indirect dma address, or NULL */
+ dma_addr_t dma_address; /* dma address */
+ unsigned int length; /* length */
};
+
+/*
+ * 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.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns, or alternatively stop on the first sg_dma_len(sg) which
+ * is 0.
+ */
+#define sg_dma_address(sg) ((sg)->dma_address)
+#define sg_dma_len(sg) ((sg)->length)
#define ISA_DMA_THRESHOLD (0xffffffff)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)