mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 22:14:20 +08:00
ba0cef2532
Since the put_unaligned_*() macros are used in this header file, include
the header file that defines these macros.
Cc: Himanshu Madhani <hmadhani@marvell.com>
Fixes: 15b7a68c1d
("scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures") # v5.2-rc1.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
33 lines
702 B
C
33 lines
702 B
C
#ifndef _QLA_DSD_H_
|
|
#define _QLA_DSD_H_
|
|
|
|
#include <asm/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
|