srb_t *sp = (srb_t *)data;
struct srb_iocb *tmf = &sp->u.iocb_cmd;
- tmf->u.tmf.comp_status = CS_TIMEOUT;
+ tmf->u.tmf.comp_status = cpu_to_le16((uint16_t)CS_TIMEOUT);
complete(&tmf->u.tmf.comp);
}
pkt = rsp->ring_ptr;
for (cnt = 0; cnt < rsp->length; cnt++) {
pkt->signature = RESPONSE_PROCESSED;
- WRT_REG_DWORD(&pkt->signature, RESPONSE_PROCESSED);
+ WRT_REG_DWORD((void __iomem *)&pkt->signature,
+ RESPONSE_PROCESSED);
pkt++;
}
}
}
int
-qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint8_t fx_type)
+qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type)
{
srb_t *sp;
struct srb_iocb *fdisc;
fdisc->u.fxiocb.flags =
SRB_FXDISC_RESP_DMA_VALID | SRB_FXDISC_REQ_DWRD_VALID;
fdisc->u.fxiocb.rsp_len = QLAFX00_PORT_DATA_INFO;
- fdisc->u.fxiocb.req_data = fcport->port_id;
+ fdisc->u.fxiocb.req_data = cpu_to_le32(fcport->port_id);
break;
case FXDISC_GET_TGT_NODE_INFO:
fdisc->u.fxiocb.flags =
SRB_FXDISC_RESP_DMA_VALID | SRB_FXDISC_REQ_DWRD_VALID;
fdisc->u.fxiocb.rsp_len = QLAFX00_TGT_NODE_INFO;
- fdisc->u.fxiocb.req_data = fcport->tgt_id;
+ fdisc->u.fxiocb.req_data = cpu_to_le32(fcport->tgt_id);
break;
case FXDISC_GET_TGT_NODE_LIST:
fdisc->u.fxiocb.flags =
sp->name = "fxdisc";
qla2x00_init_timer(sp, FXDISC_TIMEOUT);
fdisc->timeout = qla2x00_fxdisc_iocb_timeout;
- fdisc->u.fxiocb.req_func_type = fx_type;
+ fdisc->u.fxiocb.req_func_type = cpu_to_le16(fx_type);
sp->done = qla2x00_fxdisc_sp_done;
rval = qla2x00_start_sp(sp);
(uint8_t *)pinfo, 16);
memcpy(vha->hw->gid_list, pinfo, QLAFX00_TGT_NODE_LIST_SIZE);
}
- rval = fdisc->u.fxiocb.result;
+ rval = le32_to_cpu(fdisc->u.fxiocb.result);
done_unmap_dma:
if (fdisc->u.fxiocb.rsp_addr)
srb_t *sp = (srb_t *)data;
struct srb_iocb *abt = &sp->u.iocb_cmd;
- abt->u.abt.comp_status = CS_TIMEOUT;
+ abt->u.abt.comp_status = cpu_to_le16((uint16_t)CS_TIMEOUT);
complete(&abt->u.abt.comp);
}
static void
qlafx00_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct tsk_mgmt_entry_fx00 *pkt, srb_t *sp,
- uint16_t sstatus, uint16_t cpstatus)
+ __le16 sstatus, __le16 cpstatus)
{
struct srb_iocb *tmf;
tmf = &sp->u.iocb_cmd;
- if (cpstatus != CS_COMPLETE ||
- (sstatus & SS_RESPONSE_INFO_LEN_VALID))
- cpstatus = CS_INCOMPLETE;
+ if (cpstatus != cpu_to_le16((uint16_t)CS_COMPLETE) ||
+ (sstatus & cpu_to_le16((uint16_t)SS_RESPONSE_INFO_LEN_VALID)))
+ cpstatus = cpu_to_le16((uint16_t)CS_INCOMPLETE);
tmf->u.tmf.comp_status = cpstatus;
sp->done(vha, sp, 0);
}
return;
abt = &sp->u.iocb_cmd;
- abt->u.abt.comp_status = le32_to_cpu(pkt->tgt_id_sts);
+ abt->u.abt.comp_status = pkt->tgt_id_sts;
sp->done(vha, sp, 0);
}
if (sp->type == SRB_FXIOCB_DCMD) {
iocb_job = &sp->u.iocb_cmd;
- iocb_job->u.fxiocb.seq_number = le32_to_cpu(pkt->seq_no);
- iocb_job->u.fxiocb.fw_flags = le32_to_cpu(pkt->fw_iotcl_flags);
- iocb_job->u.fxiocb.result = le32_to_cpu(pkt->status);
+ iocb_job->u.fxiocb.seq_number = pkt->seq_no;
+ iocb_job->u.fxiocb.fw_flags = pkt->fw_iotcl_flags;
+ iocb_job->u.fxiocb.result = pkt->status;
if (iocb_job->u.fxiocb.flags & SRB_FXDISC_RSP_DWRD_VALID)
iocb_job->u.fxiocb.req_data =
- le32_to_cpu(pkt->dataword_r);
+ pkt->dataword_r;
} else {
bsg_job = sp->u.bsg_job;
fc_port_t *fcport;
struct scsi_cmnd *cp;
struct sts_entry_fx00 *sts;
- uint16_t comp_status;
- uint16_t scsi_status;
+ __le16 comp_status;
+ __le16 scsi_status;
uint16_t ox_id;
- uint8_t lscsi_status;
+ __le16 lscsi_status;
int32_t resid;
uint32_t sense_len, par_sense_len, rsp_info_len, resid_len,
fw_resid_len;
sts = (struct sts_entry_fx00 *) pkt;
- comp_status = le16_to_cpu(sts->comp_status);
- scsi_status = le16_to_cpu(sts->scsi_status) & SS_MASK;
+ comp_status = sts->comp_status;
+ scsi_status = sts->scsi_status & cpu_to_le16((uint16_t)SS_MASK);
hindex = sts->handle;
handle = LSW(hindex);
return;
}
- lscsi_status = scsi_status & STATUS_MASK;
+ lscsi_status = scsi_status & cpu_to_le16((uint16_t)STATUS_MASK);
fcport = sp->fcport;
ox_id = 0;
sense_len = par_sense_len = rsp_info_len = resid_len =
fw_resid_len = 0;
- if (scsi_status & SS_SENSE_LEN_VALID)
- sense_len = le32_to_cpu(sts->sense_len);
- if (scsi_status & (SS_RESIDUAL_UNDER | SS_RESIDUAL_OVER))
+ if (scsi_status & cpu_to_le16((uint16_t)SS_SENSE_LEN_VALID))
+ sense_len = sts->sense_len;
+ if (scsi_status & cpu_to_le16(((uint16_t)SS_RESIDUAL_UNDER
+ | (uint16_t)SS_RESIDUAL_OVER)))
resid_len = le32_to_cpu(sts->residual_len);
- if (comp_status == CS_DATA_UNDERRUN)
+ if (comp_status == cpu_to_le16((uint16_t)CS_DATA_UNDERRUN))
fw_resid_len = le32_to_cpu(sts->residual_len);
rsp_info = sense_data = sts->data;
par_sense_len = sizeof(sts->data);
/* Check for overrun. */
if (comp_status == CS_COMPLETE &&
- scsi_status & SS_RESIDUAL_OVER)
- comp_status = CS_DATA_OVERRUN;
+ scsi_status & cpu_to_le16((uint16_t)SS_RESIDUAL_OVER))
+ comp_status = cpu_to_le16((uint16_t)CS_DATA_OVERRUN);
/*
* Based on Host and scsi status generate status code for Linux
*/
- switch (comp_status) {
+ switch (le16_to_cpu(comp_status)) {
case CS_COMPLETE:
case CS_QUEUE_FULL:
if (scsi_status == 0) {
res = DID_OK << 16;
break;
}
- if (scsi_status & (SS_RESIDUAL_UNDER | SS_RESIDUAL_OVER)) {
+ if (scsi_status & cpu_to_le16(((uint16_t)SS_RESIDUAL_UNDER
+ | (uint16_t)SS_RESIDUAL_OVER))) {
resid = resid_len;
scsi_set_resid(cp, resid);
break;
}
}
- res = DID_OK << 16 | lscsi_status;
+ res = DID_OK << 16 | le16_to_cpu(lscsi_status);
- if (lscsi_status == SAM_STAT_TASK_SET_FULL) {
+ if (lscsi_status ==
+ cpu_to_le16((uint16_t)SAM_STAT_TASK_SET_FULL)) {
ql_dbg(ql_dbg_io, fcport->vha, 0x3051,
"QUEUE FULL detected.\n");
break;
}
logit = 0;
- if (lscsi_status != SS_CHECK_CONDITION)
+ if (lscsi_status != cpu_to_le16((uint16_t)SS_CHECK_CONDITION))
break;
memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
- if (!(scsi_status & SS_SENSE_LEN_VALID))
+ if (!(scsi_status & cpu_to_le16((uint16_t)SS_SENSE_LEN_VALID)))
break;
qlafx00_handle_sense(sp, sense_data, par_sense_len, sense_len,
else
resid = resid_len;
scsi_set_resid(cp, resid);
- if (scsi_status & SS_RESIDUAL_UNDER) {
+ if (scsi_status & cpu_to_le16((uint16_t)SS_RESIDUAL_UNDER)) {
if ((IS_FWI2_CAPABLE(ha) || IS_QLAFX00(ha))
&& fw_resid_len != resid_len) {
ql_dbg(ql_dbg_io, fcport->vha, 0x3052,
"(0x%x of 0x%x bytes).\n",
resid, scsi_bufflen(cp));
- res = DID_ERROR << 16 | lscsi_status;
+ res = DID_ERROR << 16 |
+ le16_to_cpu(lscsi_status);
goto check_scsi_status;
}
res = DID_ERROR << 16;
break;
}
- } else if (lscsi_status != SAM_STAT_TASK_SET_FULL &&
- lscsi_status != SAM_STAT_BUSY) {
+ } else if (lscsi_status !=
+ cpu_to_le16((uint16_t)SAM_STAT_TASK_SET_FULL) &&
+ lscsi_status != cpu_to_le16((uint16_t)SAM_STAT_BUSY)) {
/*
* scsi status of task set and busy are considered
* to be task not completed.
"of 0x%x bytes).\n", resid,
scsi_bufflen(cp));
- res = DID_ERROR << 16 | lscsi_status;
+ res = DID_ERROR << 16 | le16_to_cpu(lscsi_status);
goto check_scsi_status;
} else {
ql_dbg(ql_dbg_io, fcport->vha, 0x3055,
scsi_status, lscsi_status);
}
- res = DID_OK << 16 | lscsi_status;
+ res = DID_OK << 16 | le16_to_cpu(lscsi_status);
logit = 0;
check_scsi_status:
* Status.
*/
if (lscsi_status != 0) {
- if (lscsi_status == SAM_STAT_TASK_SET_FULL) {
+ if (lscsi_status ==
+ cpu_to_le16((uint16_t)SAM_STAT_TASK_SET_FULL)) {
ql_dbg(ql_dbg_io, fcport->vha, 0x3056,
"QUEUE FULL detected.\n");
logit = 1;
break;
}
- if (lscsi_status != SS_CHECK_CONDITION)
+ if (lscsi_status !=
+ cpu_to_le16((uint16_t)SS_CHECK_CONDITION))
break;
memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
- if (!(scsi_status & SS_SENSE_LEN_VALID))
+ if (!(scsi_status &
+ cpu_to_le16((uint16_t)SS_SENSE_LEN_VALID)))
break;
qlafx00_handle_sense(sp, sense_data, par_sense_len,
uint32_t handle, hindex, handle_count, i;
uint16_t que;
struct req_que *req;
- uint32_t *handle_ptr;
+ __le32 *handle_ptr;
stsmfx = (struct multi_sts_entry_fx00 *) pkt;
return;
}
- handle_ptr = (uint32_t *) &stsmfx->handles[0];
+ handle_ptr = &stsmfx->handles[0];
for (i = 0; i < handle_count; i++) {
hindex = le32_to_cpu(*handle_ptr);
if (!vha->flags.online)
return;
- while (RD_REG_DWORD(&(rsp->ring_ptr->signature)) !=
+ while (RD_REG_DWORD((void __iomem *)&(rsp->ring_ptr->signature)) !=
RESPONSE_PROCESSED) {
lptr = rsp->ring_ptr;
- memcpy_fromio(rsp->rsp_pkt, lptr, sizeof(rsp->rsp_pkt));
+ memcpy_fromio(rsp->rsp_pkt, (void __iomem *)lptr,
+ sizeof(rsp->rsp_pkt));
pkt = (struct sts_entry_fx00 *)rsp->rsp_pkt;
rsp->ring_index++;
break;
}
next_iter:
- WRT_REG_DWORD(&lptr->signature, RESPONSE_PROCESSED);
+ WRT_REG_DWORD((void __iomem *)&lptr->signature,
+ RESPONSE_PROCESSED);
wmb();
}
cont_pkt = (cont_a64_entry_t *)req->ring_ptr;
/* Load packet defaults. */
- *((uint32_t *)(&lcont_pkt->entry_type)) =
- __constant_cpu_to_le32(CONTINUE_A64_TYPE_FX00);
+ lcont_pkt->entry_type = CONTINUE_A64_TYPE_FX00;
return cont_pkt;
}
uint16_t tot_dsds, struct cmd_type_7_fx00 *lcmd_pkt)
{
uint16_t avail_dsds;
- uint32_t *cur_dsd;
+ __le32 *cur_dsd;
scsi_qla_host_t *vha;
struct scsi_cmnd *cmd;
struct scatterlist *sg;
cont_pkt = NULL;
/* Update entry type to indicate Command Type 3 IOCB */
- *((uint32_t *)(&lcmd_pkt->entry_type)) =
- __constant_cpu_to_le32(FX00_COMMAND_TYPE_7);
+ lcmd_pkt->entry_type = FX00_COMMAND_TYPE_7;
/* No data transfer */
if (!scsi_bufflen(cmd) || cmd->sc_data_direction == DMA_NONE) {
/* One DSD is available in the Command Type 3 IOCB */
avail_dsds = 1;
- cur_dsd = (uint32_t *)&lcmd_pkt->dseg_0_address;
+ cur_dsd = (__le32 *)&lcmd_pkt->dseg_0_address;
/* Load data segments */
scsi_for_each_sg(cmd, sg, tot_dsds, i) {
memset(&lcont_pkt, 0, REQUEST_ENTRY_SIZE);
cont_pkt =
qlafx00_prep_cont_type1_iocb(req, &lcont_pkt);
- cur_dsd = (uint32_t *)lcont_pkt.dseg_0_address;
+ cur_dsd = (__le32 *)lcont_pkt.dseg_0_address;
avail_dsds = 5;
cont = 1;
}
tm_iocb.timeout = cpu_to_le16(qla2x00_get_async_timeout(vha) + 2);
tm_iocb.tgt_id = cpu_to_le16(sp->fcport->tgt_id);
tm_iocb.control_flags = cpu_to_le32(fxio->u.tmf.flags);
- if (tm_iocb.control_flags == TCF_LUN_RESET) {
+ if (tm_iocb.control_flags == cpu_to_le32((uint32_t)TCF_LUN_RESET)) {
int_to_scsilun(fxio->u.tmf.lun, &llun);
host_to_adap((uint8_t *)&llun, (uint8_t *)&tm_iocb.lun,
sizeof(struct scsi_lun));
}
- memcpy((void __iomem *)ptm_iocb, &tm_iocb,
+ memcpy((void *)ptm_iocb, &tm_iocb,
sizeof(struct tsk_mgmt_entry_fx00));
wmb();
}
abt_iocb.tgt_id_sts = cpu_to_le16(sp->fcport->tgt_id);
abt_iocb.req_que_no = cpu_to_le16(req->id);
- memcpy((void __iomem *)pabt_iocb, &abt_iocb,
+ memcpy((void *)pabt_iocb, &abt_iocb,
sizeof(struct abort_iocb_entry_fx00));
wmb();
}
if (sp->type == SRB_FXIOCB_DCMD) {
fx_iocb.func_num =
- cpu_to_le16(sp->u.iocb_cmd.u.fxiocb.req_func_type);
- fx_iocb.adapid = cpu_to_le32(fxio->u.fxiocb.adapter_id);
- fx_iocb.adapid_hi = cpu_to_le32(fxio->u.fxiocb.adapter_id_hi);
- fx_iocb.reserved_0 = cpu_to_le32(fxio->u.fxiocb.reserved_0);
- fx_iocb.reserved_1 = cpu_to_le32(fxio->u.fxiocb.reserved_1);
- fx_iocb.dataword_extra =
- cpu_to_le32(fxio->u.fxiocb.req_data_extra);
+ sp->u.iocb_cmd.u.fxiocb.req_func_type;
+ fx_iocb.adapid = fxio->u.fxiocb.adapter_id;
+ fx_iocb.adapid_hi = fxio->u.fxiocb.adapter_id_hi;
+ fx_iocb.reserved_0 = fxio->u.fxiocb.reserved_0;
+ fx_iocb.reserved_1 = fxio->u.fxiocb.reserved_1;
+ fx_iocb.dataword_extra = fxio->u.fxiocb.req_data_extra;
if (fxio->u.fxiocb.flags & SRB_FXDISC_REQ_DMA_VALID) {
fx_iocb.req_dsdcnt = cpu_to_le16(1);
}
if (fxio->u.fxiocb.flags & SRB_FXDISC_REQ_DWRD_VALID) {
- fx_iocb.dataword =
- cpu_to_le32(fxio->u.fxiocb.req_data);
+ fx_iocb.dataword = fxio->u.fxiocb.req_data;
}
fx_iocb.flags = fxio->u.fxiocb.flags;
} else {
fx_iocb.reserved_1 = piocb_rqst->reserved_1;
fx_iocb.dataword_extra = piocb_rqst->dataword_extra;
fx_iocb.dataword = piocb_rqst->dataword;
- fx_iocb.req_xfrcnt = cpu_to_le16(piocb_rqst->req_len);
- fx_iocb.rsp_xfrcnt = cpu_to_le16(piocb_rqst->rsp_len);
+ fx_iocb.req_xfrcnt = piocb_rqst->req_len;
+ fx_iocb.rsp_xfrcnt = piocb_rqst->rsp_len;
if (piocb_rqst->flags & SRB_FXDISC_REQ_DMA_VALID) {
int avail_dsds, tot_dsds;
cont_a64_entry_t lcont_pkt;
cont_a64_entry_t *cont_pkt = NULL;
- uint32_t *cur_dsd;
+ __le32 *cur_dsd;
int index = 0, cont = 0;
fx_iocb.req_dsdcnt =
cpu_to_le16(bsg_job->request_payload.sg_cnt);
tot_dsds =
- cpu_to_le32(bsg_job->request_payload.sg_cnt);
- cur_dsd = (uint32_t *)&fx_iocb.dseg_rq_address[0];
+ bsg_job->request_payload.sg_cnt;
+ cur_dsd = (__le32 *)&fx_iocb.dseg_rq_address[0];
avail_dsds = 1;
for_each_sg(bsg_job->request_payload.sg_list, sg,
tot_dsds, index) {
qlafx00_prep_cont_type1_iocb(
sp->fcport->vha->req,
&lcont_pkt);
- cur_dsd = (uint32_t *)
+ cur_dsd = (__le32 *)
lcont_pkt.dseg_0_address;
avail_dsds = 5;
cont = 1;
int avail_dsds, tot_dsds;
cont_a64_entry_t lcont_pkt;
cont_a64_entry_t *cont_pkt = NULL;
- uint32_t *cur_dsd;
+ __le32 *cur_dsd;
int index = 0, cont = 0;
fx_iocb.rsp_dsdcnt =
cpu_to_le16(bsg_job->reply_payload.sg_cnt);
- tot_dsds = cpu_to_le32(bsg_job->reply_payload.sg_cnt);
- cur_dsd = (uint32_t *)&fx_iocb.dseg_rsp_address[0];
+ tot_dsds = bsg_job->reply_payload.sg_cnt;
+ cur_dsd = (__le32 *)&fx_iocb.dseg_rsp_address[0];
avail_dsds = 1;
for_each_sg(bsg_job->reply_payload.sg_list, sg,
qlafx00_prep_cont_type1_iocb(
sp->fcport->vha->req,
&lcont_pkt);
- cur_dsd = (uint32_t *)
+ cur_dsd = (__le32 *)
lcont_pkt.dseg_0_address;
avail_dsds = 5;
cont = 1;
}
if (piocb_rqst->flags & SRB_FXDISC_REQ_DWRD_VALID)
- fx_iocb.dataword = cpu_to_le32(piocb_rqst->dataword);
+ fx_iocb.dataword = piocb_rqst->dataword;
fx_iocb.flags = piocb_rqst->flags;
fx_iocb.entry_count = entry_cnt;
}
sp->fcport->vha, 0x3047,
(uint8_t *)&fx_iocb, sizeof(struct fxdisc_entry_fx00));
- memcpy((void __iomem *)pfxiocb, &fx_iocb,
+ memcpy((void *)pfxiocb, &fx_iocb,
sizeof(struct fxdisc_entry_fx00));
wmb();
}
uint32_t handle; /* System handle. */
uint32_t handle_hi;
- uint16_t tgt_idx; /* Target Idx. */
+ __le16 tgt_idx; /* Target Idx. */
uint16_t timeout; /* Command timeout. */
- uint16_t dseg_count; /* Data segment count. */
+ __le16 dseg_count; /* Data segment count. */
uint16_t scsi_rsp_dsd_len;
struct scsi_lun lun; /* LUN (LE). */
uint8_t crn;
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_len; /* Data segment 0 length. */
uint32_t handle; /* 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. */
- uint32_t residual_len; /* FW calc residual transfer length. */
+ __le32 residual_len; /* FW calc residual transfer length. */
uint16_t reserved_1;
uint16_t state_flags; /* State flags. */
uint16_t reserved_2;
- uint16_t scsi_status; /* SCSI status. */
+ __le16 scsi_status; /* SCSI status. */
uint32_t sense_len; /* FCP SENSE length. */
uint8_t data[32]; /* FCP response/sense information. */
uint8_t handle_count;
uint8_t entry_status;
- uint32_t handles[MAX_HANDLE_COUNT];
+ __le32 handles[MAX_HANDLE_COUNT];
};
#define TSK_MGMT_IOCB_TYPE_FX00 0x05
uint8_t sys_define;
uint8_t entry_status; /* Entry Status. */
- uint32_t handle; /* System handle. */
+ __le32 handle; /* 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 delay; /* Activity delay in seconds. */
- uint16_t timeout; /* Command timeout. */
+ __le16 timeout; /* Command timeout. */
struct scsi_lun lun; /* LUN (LE). */
- uint32_t control_flags; /* Control Flags. */
+ __le32 control_flags; /* Control Flags. */
uint8_t reserved_2[32];
};
uint8_t sys_define; /* System defined. */
uint8_t entry_status; /* Entry Status. */
- uint32_t handle; /* System handle. */
- uint32_t handle_hi; /* System handle. */
+ __le32 handle; /* System handle. */
+ __le32 handle_hi; /* System handle. */
- uint16_t tgt_id_sts; /* Completion status. */
- uint16_t options;
+ __le16 tgt_id_sts; /* Completion status. */
+ __le16 options;
- uint32_t abort_handle; /* System handle. */
- uint32_t abort_handle_hi; /* System handle. */
+ __le32 abort_handle; /* System handle. */
+ __le32 abort_handle_hi; /* System handle. */
- uint16_t req_que_no;
+ __le16 req_que_no;
uint8_t reserved_1[38];
};
uint32_t reserved_0; /* System handle. */
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_hi; /* Adapter ID high */
uint32_t reserved_1;
- uint32_t seq_no;
+ __le32 seq_no;
uint8_t reserved_2[20];
uint32_t residuallen;
- uint32_t status;
+ __le32 status;
};
#define STATUS_CONT_TYPE_FX00 0x04
uint8_t sys_define; /* System Defined. */
uint8_t entry_status; /* Entry Status. */
- uint32_t handle; /* System handle. */
- uint32_t reserved_0; /* System handle. */
+ __le32 handle; /* System handle. */
+ __le32 reserved_0; /* System handle. */
- uint16_t func_num;
- uint16_t req_xfrcnt;
- uint16_t req_dsdcnt;
- uint16_t rsp_xfrcnt;
- uint16_t rsp_dsdcnt;
+ __le16 func_num;
+ __le16 req_xfrcnt;
+ __le16 req_dsdcnt;
+ __le16 rsp_xfrcnt;
+ __le16 rsp_dsdcnt;
uint8_t flags;
uint8_t reserved_1;
- uint32_t dseg_rq_address[2]; /* Data segment 0 address. */
- uint32_t dseg_rq_len; /* Data segment 0 length. */
- uint32_t dseg_rsp_address[2]; /* Data segment 1 address. */
- uint32_t dseg_rsp_len; /* Data segment 1 length. */
+ __le32 dseg_rq_address[2]; /* Data segment 0 address. */
+ __le32 dseg_rq_len; /* Data segment 0 length. */
+ __le32 dseg_rsp_address[2]; /* Data segment 1 address. */
+ __le32 dseg_rsp_len; /* Data segment 1 length. */
- uint32_t dataword;
- uint32_t adapid;
- uint32_t adapid_hi;
- uint32_t dataword_extra;
+ __le32 dataword;
+ __le32 adapid;
+ __le32 adapid_hi;
+ __le32 dataword_extra;
};
struct qlafx00_tgt_node_info {
WRT_REG_DWORD((ha)->cregbase + off, val)
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 reserved_1;
- uint32_t dataword;
+ __le32 dataword;
- uint32_t adapid;
- uint32_t adapid_hi;
+ __le32 adapid;
+ __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 {
uint32_t reserved_1;
uint16_t func_type;
- uint16_t ioctl_flags;
+ __le16 ioctl_flags;
- uint32_t ioctl_data;
+ __le32 ioctl_data;
uint32_t adapid;
uint32_t adapid_hi;
uint32_t reserved_2;
- uint32_t seq_number;
+ __le32 seq_number;
uint8_t reserved_3[20];
int32_t res_count;
- uint32_t status;
+ __le32 status;
};