WIP FPC-III support
[linux/fpc-iii.git] / drivers / scsi / qla2xxx / qla_dsd.h
blob20788054b91bc136965d0eaa570255e833784b0c
1 #ifndef _QLA_DSD_H_
2 #define _QLA_DSD_H_
4 #include <asm/unaligned.h>
6 /* 32-bit data segment descriptor (8 bytes) */
7 struct dsd32 {
8 __le32 address;
9 __le32 length;
12 static inline void append_dsd32(struct dsd32 **dsd, struct scatterlist *sg)
14 put_unaligned_le32(sg_dma_address(sg), &(*dsd)->address);
15 put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
16 (*dsd)++;
19 /* 64-bit data segment descriptor (12 bytes) */
20 struct dsd64 {
21 __le64 address;
22 __le32 length;
23 } __packed;
25 static inline void append_dsd64(struct dsd64 **dsd, struct scatterlist *sg)
27 put_unaligned_le64(sg_dma_address(sg), &(*dsd)->address);
28 put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
29 (*dsd)++;
32 #endif