5f60d5f6bb
asm/unaligned.h is always an include of asm-generic/unaligned.h; might as well move that thing to linux/unaligned.h and include that - there's nothing arch-specific in that header. auto-generated by the following: for i in `git grep -l -w asm/unaligned.h`; do sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i done for i in `git grep -l -w asm-generic/unaligned.h`; do sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i done git mv include/asm-generic/unaligned.h include/linux/unaligned.h git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
33 lines
704 B
C
33 lines
704 B
C
#ifndef _QLA_DSD_H_
|
|
#define _QLA_DSD_H_
|
|
|
|
#include <linux/unaligned.h>
|
|
|
|
/* 32-bit data segment descriptor (8 bytes) */
|
|
struct dsd32 {
|
|
__le32 address;
|
|
__le32 length;
|
|
};
|
|
|
|
static inline void append_dsd32(struct dsd32 **dsd, struct scatterlist *sg)
|
|
{
|
|
put_unaligned_le32(sg_dma_address(sg), &(*dsd)->address);
|
|
put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
|
|
(*dsd)++;
|
|
}
|
|
|
|
/* 64-bit data segment descriptor (12 bytes) */
|
|
struct dsd64 {
|
|
__le64 address;
|
|
__le32 length;
|
|
} __packed;
|
|
|
|
static inline void append_dsd64(struct dsd64 **dsd, struct scatterlist *sg)
|
|
{
|
|
put_unaligned_le64(sg_dma_address(sg), &(*dsd)->address);
|
|
put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
|
|
(*dsd)++;
|
|
}
|
|
|
|
#endif
|