patch-2.4.23 linux-2.4.23/include/asm-ppc/scatterlist.h

Next file: linux-2.4.23/include/asm-ppc/serial.h
Previous file: linux-2.4.23/include/asm-ppc/processor.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/include/asm-ppc/scatterlist.h linux-2.4.23/include/asm-ppc/scatterlist.h
@@ -9,9 +9,12 @@
 				 * or NULL for highmem page */
 	struct page * page;	/* Location for highmem page, if any */
 	unsigned int offset;	/* for highmem, page offset */
+	unsigned int length;	/* length at address or page+offset */
 
-	dma_addr_t dma_address;	/* phys/bus dma address		 */
-	unsigned int length;	/* length			 */
+	dma_addr_t dma_address;	/* phys/bus dma address	*/
+	unsigned int dma_length; /* number of bytes mapped at dma_address */
+	/* Note that if we coalesce multiple scatterlist elements,
+	   dma_length can be different from length */
 };
 
 /*
@@ -22,7 +25,7 @@
  * is 0.
  */
 #define sg_dma_address(sg)      ((sg)->dma_address)
-#define sg_dma_len(sg)          ((sg)->length)
+#define sg_dma_len(sg)          ((sg)->dma_length)
 
 #endif /* !(_PPC_SCATTERLIST_H) */
 #endif /* __KERNEL__ */

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