X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-frv%2Fscatterlist.h;h=4bca8a28546c2474e6300d041e117186175dc0ea;hb=13c48c490208d9e70d8d66d56f96c5054db69af7;hp=99ba76edc42a4c94a333571e9c5c1d2658e465ca;hpb=2024da603978882d102a34d47828a205fffb338e;p=linux-2.6 diff --git a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h index 99ba76edc4..4bca8a2854 100644 --- a/include/asm-frv/scatterlist.h +++ b/include/asm-frv/scatterlist.h @@ -16,8 +16,7 @@ * * can be rewritten as * - * sg_set_page(virt_to_page(some_ptr)); - * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK; + * sg_set_buf(sg, some_ptr, length); * * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens */ @@ -32,6 +31,16 @@ struct scatterlist { unsigned int 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 (0xffffffffUL) #endif /* !_ASM_SCATTERLIST_H */