Commit 1f8deefe authored by Saurav Kashyap's avatar Saurav Kashyap Committed by James Bottomley

[SCSI] qla2xxx: Fix sparse warning from qla_mr.c and qla_iocb.c.

Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent b8eb4136
...@@ -323,7 +323,7 @@ struct srb_iocb { ...@@ -323,7 +323,7 @@ struct srb_iocb {
uint32_t lun; uint32_t lun;
uint32_t data; uint32_t data;
struct completion comp; struct completion comp;
uint32_t comp_status; __le16 comp_status;
} tmf; } tmf;
struct { struct {
#define SRB_FXDISC_REQ_DMA_VALID BIT_0 #define SRB_FXDISC_REQ_DMA_VALID BIT_0
...@@ -338,21 +338,21 @@ struct srb_iocb { ...@@ -338,21 +338,21 @@ struct srb_iocb {
void *rsp_addr; void *rsp_addr;
dma_addr_t req_dma_handle; dma_addr_t req_dma_handle;
dma_addr_t rsp_dma_handle; dma_addr_t rsp_dma_handle;
uint32_t adapter_id; __le32 adapter_id;
uint32_t adapter_id_hi; __le32 adapter_id_hi;
uint32_t req_func_type; __le16 req_func_type;
uint32_t req_data; __le32 req_data;
uint32_t req_data_extra; __le32 req_data_extra;
uint32_t result; __le32 result;
uint32_t seq_number; __le32 seq_number;
uint32_t fw_flags; __le16 fw_flags;
struct completion fxiocb_comp; struct completion fxiocb_comp;
uint32_t reserved_0; __le32 reserved_0;
uint8_t reserved_1; uint8_t reserved_1;
} fxiocb; } fxiocb;
struct { struct {
uint32_t cmd_hndl; uint32_t cmd_hndl;
uint32_t comp_status; __le16 comp_status;
struct completion comp; struct completion comp;
} abt; } abt;
} u; } u;
...@@ -1196,14 +1196,14 @@ typedef struct { ...@@ -1196,14 +1196,14 @@ typedef struct {
struct init_cb_fx { struct init_cb_fx {
uint16_t version; uint16_t version;
uint16_t reserved_1[13]; uint16_t reserved_1[13];
uint16_t request_q_outpointer; __le16 request_q_outpointer;
uint16_t response_q_inpointer; __le16 response_q_inpointer;
uint16_t reserved_2[2]; uint16_t reserved_2[2];
uint16_t response_q_length; __le16 response_q_length;
uint16_t request_q_length; __le16 request_q_length;
uint16_t reserved_3[2]; uint16_t reserved_3[2];
uint32_t request_q_address[2]; __le32 request_q_address[2];
uint32_t response_q_address[2]; __le32 response_q_address[2];
uint16_t reserved_4[4]; uint16_t reserved_4[4];
uint8_t response_q_msivec; uint8_t response_q_msivec;
uint8_t reserved_5[19]; uint8_t reserved_5[19];
......
...@@ -587,7 +587,7 @@ extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t); ...@@ -587,7 +587,7 @@ extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t);
extern int qlafx00_fw_ready(scsi_qla_host_t *); extern int qlafx00_fw_ready(scsi_qla_host_t *);
extern int qlafx00_configure_devices(scsi_qla_host_t *); extern int qlafx00_configure_devices(scsi_qla_host_t *);
extern int qlafx00_reset_initialize(scsi_qla_host_t *); extern int qlafx00_reset_initialize(scsi_qla_host_t *);
extern int qlafx00_fx_disc(scsi_qla_host_t *, fc_port_t *, uint8_t); extern int qlafx00_fx_disc(scsi_qla_host_t *, fc_port_t *, uint16_t);
extern int qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *); extern int qlafx00_process_aen(struct scsi_qla_host *, struct qla_work_evt *);
extern int qlafx00_post_aenfx_work(struct scsi_qla_host *, uint32_t, extern int qlafx00_post_aenfx_work(struct scsi_qla_host *, uint32_t,
uint32_t *, int); uint32_t *, int);
......
...@@ -83,7 +83,7 @@ static inline void ...@@ -83,7 +83,7 @@ static inline void
host_to_adap(uint8_t *src, uint8_t *dst, uint32_t bsize) host_to_adap(uint8_t *src, uint8_t *dst, uint32_t bsize)
{ {
uint32_t *isrc = (uint32_t *) src; uint32_t *isrc = (uint32_t *) src;
uint32_t *odest = (uint32_t *) dst; __le32 *odest = (__le32 *) dst;
uint32_t iter = bsize >> 2; uint32_t iter = bsize >> 2;
for (; iter ; iter--) for (; iter ; iter--)
......
...@@ -1863,8 +1863,8 @@ qla2x00_alloc_iocbs(scsi_qla_host_t *vha, srb_t *sp) ...@@ -1863,8 +1863,8 @@ qla2x00_alloc_iocbs(scsi_qla_host_t *vha, srb_t *sp)
pkt = req->ring_ptr; pkt = req->ring_ptr;
memset(pkt, 0, REQUEST_ENTRY_SIZE); memset(pkt, 0, REQUEST_ENTRY_SIZE);
if (IS_QLAFX00(ha)) { if (IS_QLAFX00(ha)) {
WRT_REG_BYTE(&pkt->entry_count, req_cnt); WRT_REG_BYTE((void __iomem *)&pkt->entry_count, req_cnt);
WRT_REG_WORD(&pkt->handle, handle); WRT_REG_WORD((void __iomem *)&pkt->handle, handle);
} else { } else {
pkt->entry_count = req_cnt; pkt->entry_count = req_cnt;
pkt->handle = handle; pkt->handle = handle;
......
This diff is collapsed.
...@@ -24,10 +24,10 @@ struct cmd_type_7_fx00 { ...@@ -24,10 +24,10 @@ struct cmd_type_7_fx00 {
uint32_t handle; /* System handle. */ uint32_t handle; /* System handle. */
uint32_t handle_hi; uint32_t handle_hi;
uint16_t tgt_idx; /* Target Idx. */ __le16 tgt_idx; /* Target Idx. */
uint16_t timeout; /* Command timeout. */ uint16_t timeout; /* Command timeout. */
uint16_t dseg_count; /* Data segment count. */ __le16 dseg_count; /* Data segment count. */
uint16_t scsi_rsp_dsd_len; uint16_t scsi_rsp_dsd_len;
struct scsi_lun lun; /* LUN (LE). */ struct scsi_lun lun; /* LUN (LE). */
...@@ -41,7 +41,7 @@ struct cmd_type_7_fx00 { ...@@ -41,7 +41,7 @@ struct cmd_type_7_fx00 {
uint8_t crn; uint8_t crn;
uint8_t fcp_cdb[MAX_CMDSZ]; /* SCSI command words. */ uint8_t fcp_cdb[MAX_CMDSZ]; /* SCSI command words. */
uint32_t byte_count; /* Total byte count. */ __le32 byte_count; /* Total byte count. */
uint32_t dseg_0_address[2]; /* Data segment 0 address. */ uint32_t dseg_0_address[2]; /* Data segment 0 address. */
uint32_t dseg_0_len; /* Data segment 0 length. */ uint32_t dseg_0_len; /* Data segment 0 length. */
...@@ -81,16 +81,16 @@ struct sts_entry_fx00 { ...@@ -81,16 +81,16 @@ struct sts_entry_fx00 {
uint32_t handle; /* System handle. */ uint32_t handle; /* System handle. */
uint32_t handle_hi; /* System handle. */ uint32_t handle_hi; /* System handle. */
uint16_t comp_status; /* Completion status. */ __le16 comp_status; /* Completion status. */
uint16_t reserved_0; /* OX_ID used by the firmware. */ uint16_t reserved_0; /* OX_ID used by the firmware. */
uint32_t residual_len; /* FW calc residual transfer length. */ __le32 residual_len; /* FW calc residual transfer length. */
uint16_t reserved_1; uint16_t reserved_1;
uint16_t state_flags; /* State flags. */ uint16_t state_flags; /* State flags. */
uint16_t reserved_2; uint16_t reserved_2;
uint16_t scsi_status; /* SCSI status. */ __le16 scsi_status; /* SCSI status. */
uint32_t sense_len; /* FCP SENSE length. */ uint32_t sense_len; /* FCP SENSE length. */
uint8_t data[32]; /* FCP response/sense information. */ uint8_t data[32]; /* FCP response/sense information. */
...@@ -106,7 +106,7 @@ struct multi_sts_entry_fx00 { ...@@ -106,7 +106,7 @@ struct multi_sts_entry_fx00 {
uint8_t handle_count; uint8_t handle_count;
uint8_t entry_status; uint8_t entry_status;
uint32_t handles[MAX_HANDLE_COUNT]; __le32 handles[MAX_HANDLE_COUNT];
}; };
#define TSK_MGMT_IOCB_TYPE_FX00 0x05 #define TSK_MGMT_IOCB_TYPE_FX00 0x05
...@@ -116,21 +116,21 @@ struct tsk_mgmt_entry_fx00 { ...@@ -116,21 +116,21 @@ struct tsk_mgmt_entry_fx00 {
uint8_t sys_define; uint8_t sys_define;
uint8_t entry_status; /* Entry Status. */ uint8_t entry_status; /* Entry Status. */
uint32_t handle; /* System handle. */ __le32 handle; /* System handle. */
uint32_t handle_hi; /* System handle. */ uint32_t handle_hi; /* System handle. */
uint16_t tgt_id; /* Target Idx. */ __le16 tgt_id; /* Target Idx. */
uint16_t reserved_1; uint16_t reserved_1;
uint16_t delay; /* Activity delay in seconds. */ uint16_t delay; /* Activity delay in seconds. */
uint16_t timeout; /* Command timeout. */ __le16 timeout; /* Command timeout. */
struct scsi_lun lun; /* LUN (LE). */ struct scsi_lun lun; /* LUN (LE). */
uint32_t control_flags; /* Control Flags. */ __le32 control_flags; /* Control Flags. */
uint8_t reserved_2[32]; uint8_t reserved_2[32];
}; };
...@@ -143,16 +143,16 @@ struct abort_iocb_entry_fx00 { ...@@ -143,16 +143,16 @@ struct abort_iocb_entry_fx00 {
uint8_t sys_define; /* System defined. */ uint8_t sys_define; /* System defined. */
uint8_t entry_status; /* Entry Status. */ uint8_t entry_status; /* Entry Status. */
uint32_t handle; /* System handle. */ __le32 handle; /* System handle. */
uint32_t handle_hi; /* System handle. */ __le32 handle_hi; /* System handle. */
uint16_t tgt_id_sts; /* Completion status. */ __le16 tgt_id_sts; /* Completion status. */
uint16_t options; __le16 options;
uint32_t abort_handle; /* System handle. */ __le32 abort_handle; /* System handle. */
uint32_t abort_handle_hi; /* System handle. */ __le32 abort_handle_hi; /* System handle. */
uint16_t req_que_no; __le16 req_que_no;
uint8_t reserved_1[38]; uint8_t reserved_1[38];
}; };
...@@ -167,17 +167,17 @@ struct ioctl_iocb_entry_fx00 { ...@@ -167,17 +167,17 @@ struct ioctl_iocb_entry_fx00 {
uint32_t reserved_0; /* System handle. */ uint32_t reserved_0; /* System handle. */
uint16_t comp_func_num; uint16_t comp_func_num;
uint16_t fw_iotcl_flags; __le16 fw_iotcl_flags;
uint32_t dataword_r; /* Data word returned */ __le32 dataword_r; /* Data word returned */
uint32_t adapid; /* Adapter ID */ uint32_t adapid; /* Adapter ID */
uint32_t adapid_hi; /* Adapter ID high */ uint32_t adapid_hi; /* Adapter ID high */
uint32_t reserved_1; uint32_t reserved_1;
uint32_t seq_no; __le32 seq_no;
uint8_t reserved_2[20]; uint8_t reserved_2[20];
uint32_t residuallen; uint32_t residuallen;
uint32_t status; __le32 status;
}; };
#define STATUS_CONT_TYPE_FX00 0x04 #define STATUS_CONT_TYPE_FX00 0x04
...@@ -189,26 +189,26 @@ struct fxdisc_entry_fx00 { ...@@ -189,26 +189,26 @@ struct fxdisc_entry_fx00 {
uint8_t sys_define; /* System Defined. */ uint8_t sys_define; /* System Defined. */
uint8_t entry_status; /* Entry Status. */ uint8_t entry_status; /* Entry Status. */
uint32_t handle; /* System handle. */ __le32 handle; /* System handle. */
uint32_t reserved_0; /* System handle. */ __le32 reserved_0; /* System handle. */
uint16_t func_num; __le16 func_num;
uint16_t req_xfrcnt; __le16 req_xfrcnt;
uint16_t req_dsdcnt; __le16 req_dsdcnt;
uint16_t rsp_xfrcnt; __le16 rsp_xfrcnt;
uint16_t rsp_dsdcnt; __le16 rsp_dsdcnt;
uint8_t flags; uint8_t flags;
uint8_t reserved_1; uint8_t reserved_1;
uint32_t dseg_rq_address[2]; /* Data segment 0 address. */ __le32 dseg_rq_address[2]; /* Data segment 0 address. */
uint32_t dseg_rq_len; /* Data segment 0 length. */ __le32 dseg_rq_len; /* Data segment 0 length. */
uint32_t dseg_rsp_address[2]; /* Data segment 1 address. */ __le32 dseg_rsp_address[2]; /* Data segment 1 address. */
uint32_t dseg_rsp_len; /* Data segment 1 length. */ __le32 dseg_rsp_len; /* Data segment 1 length. */
uint32_t dataword; __le32 dataword;
uint32_t adapid; __le32 adapid;
uint32_t adapid_hi; __le32 adapid_hi;
uint32_t dataword_extra; __le32 dataword_extra;
}; };
struct qlafx00_tgt_node_info { struct qlafx00_tgt_node_info {
...@@ -421,43 +421,43 @@ struct config_info_data { ...@@ -421,43 +421,43 @@ struct config_info_data {
WRT_REG_DWORD((ha)->cregbase + off, val) WRT_REG_DWORD((ha)->cregbase + off, val)
struct qla_mt_iocb_rqst_fx00 { struct qla_mt_iocb_rqst_fx00 {
uint32_t reserved_0; __le32 reserved_0;
uint16_t func_type; __le16 func_type;
uint8_t flags; uint8_t flags;
uint8_t reserved_1; uint8_t reserved_1;
uint32_t dataword; __le32 dataword;
uint32_t adapid; __le32 adapid;
uint32_t adapid_hi; __le32 adapid_hi;
uint32_t dataword_extra; __le32 dataword_extra;
uint32_t req_len; __le32 req_len;
uint32_t rsp_len; __le32 rsp_len;
}; };
struct qla_mt_iocb_rsp_fx00 { struct qla_mt_iocb_rsp_fx00 {
uint32_t reserved_1; uint32_t reserved_1;
uint16_t func_type; uint16_t func_type;
uint16_t ioctl_flags; __le16 ioctl_flags;
uint32_t ioctl_data; __le32 ioctl_data;
uint32_t adapid; uint32_t adapid;
uint32_t adapid_hi; uint32_t adapid_hi;
uint32_t reserved_2; uint32_t reserved_2;
uint32_t seq_number; __le32 seq_number;
uint8_t reserved_3[20]; uint8_t reserved_3[20];
int32_t res_count; int32_t res_count;
uint32_t status; __le32 status;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment