Blame view
include/asm-generic/scatterlist.h
845 Bytes
aafe4dbed asm-generic: add ... |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#ifndef __ASM_GENERIC_SCATTERLIST_H #define __ASM_GENERIC_SCATTERLIST_H #include <linux/types.h> struct scatterlist { #ifdef CONFIG_DEBUG_SG unsigned long sg_magic; #endif unsigned long page_link; unsigned int offset; unsigned int length; dma_addr_t dma_address; |
18e98307d asm-generic: add ... |
14 |
#ifdef CONFIG_NEED_SG_DMA_LENGTH |
aafe4dbed asm-generic: add ... |
15 |
unsigned int dma_length; |
18e98307d asm-generic: add ... |
16 |
#endif |
aafe4dbed asm-generic: add ... |
17 18 19 20 21 22 23 24 25 26 |
}; /* * These macros should be used after a dma_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) |
18e98307d asm-generic: add ... |
27 28 |
#ifdef CONFIG_NEED_SG_DMA_LENGTH |
aafe4dbed asm-generic: add ... |
29 30 31 |
#define sg_dma_len(sg) ((sg)->dma_length) #else #define sg_dma_len(sg) ((sg)->length) |
18e98307d asm-generic: add ... |
32 |
#endif |
aafe4dbed asm-generic: add ... |
33 |
|
aafe4dbed asm-generic: add ... |
34 |
#endif /* __ASM_GENERIC_SCATTERLIST_H */ |