diff options
author | Quinn Tran <quinn.tran@qlogic.com> | 2014-06-24 00:22:29 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-06-25 07:29:31 -0400 |
commit | 33a5fcee7f5d4920ff33997169e02cc34cbab6e6 (patch) | |
tree | 69b3794338bb609e0b1455aad04ff7c163f18660 | |
parent | d576a5e80cd07ea7049f8fd7b303c14df7b5d7d2 (diff) |
qla2xxx: Fix sparse warning in qla_target.c.
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 17 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.h | 4 |
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 4b188b0164e9..e632e14180cf 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -1128,7 +1128,7 @@ static void qlt_24xx_retry_term_exchange(struct scsi_qla_host *vha, | |||
1128 | ctio->u.status1.flags = | 1128 | ctio->u.status1.flags = |
1129 | __constant_cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | | 1129 | __constant_cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | |
1130 | CTIO7_FLAGS_TERMINATE); | 1130 | CTIO7_FLAGS_TERMINATE); |
1131 | ctio->u.status1.ox_id = entry->fcp_hdr_le.ox_id; | 1131 | ctio->u.status1.ox_id = cpu_to_le16(entry->fcp_hdr_le.ox_id); |
1132 | 1132 | ||
1133 | qla2x00_start_iocbs(vha, vha->req); | 1133 | qla2x00_start_iocbs(vha, vha->req); |
1134 | 1134 | ||
@@ -1262,6 +1262,7 @@ static void qlt_24xx_send_task_mgmt_ctio(struct scsi_qla_host *ha, | |||
1262 | { | 1262 | { |
1263 | struct atio_from_isp *atio = &mcmd->orig_iocb.atio; | 1263 | struct atio_from_isp *atio = &mcmd->orig_iocb.atio; |
1264 | struct ctio7_to_24xx *ctio; | 1264 | struct ctio7_to_24xx *ctio; |
1265 | uint16_t temp; | ||
1265 | 1266 | ||
1266 | ql_dbg(ql_dbg_tgt, ha, 0xe008, | 1267 | ql_dbg(ql_dbg_tgt, ha, 0xe008, |
1267 | "Sending task mgmt CTIO7 (ha=%p, atio=%p, resp_code=%x\n", | 1268 | "Sending task mgmt CTIO7 (ha=%p, atio=%p, resp_code=%x\n", |
@@ -1292,7 +1293,8 @@ static void qlt_24xx_send_task_mgmt_ctio(struct scsi_qla_host *ha, | |||
1292 | ctio->u.status1.flags = (atio->u.isp24.attr << 9) | | 1293 | ctio->u.status1.flags = (atio->u.isp24.attr << 9) | |
1293 | __constant_cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | | 1294 | __constant_cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | |
1294 | CTIO7_FLAGS_SEND_STATUS); | 1295 | CTIO7_FLAGS_SEND_STATUS); |
1295 | ctio->u.status1.ox_id = swab16(atio->u.isp24.fcp_hdr.ox_id); | 1296 | temp = be16_to_cpu(atio->u.isp24.fcp_hdr.ox_id); |
1297 | ctio->u.status1.ox_id = cpu_to_le16(temp); | ||
1296 | ctio->u.status1.scsi_status = | 1298 | ctio->u.status1.scsi_status = |
1297 | __constant_cpu_to_le16(SS_RESPONSE_INFO_LEN_VALID); | 1299 | __constant_cpu_to_le16(SS_RESPONSE_INFO_LEN_VALID); |
1298 | ctio->u.status1.response_len = __constant_cpu_to_le16(8); | 1300 | ctio->u.status1.response_len = __constant_cpu_to_le16(8); |
@@ -1513,6 +1515,7 @@ static int qlt_24xx_build_ctio_pkt(struct qla_tgt_prm *prm, | |||
1513 | struct ctio7_to_24xx *pkt; | 1515 | struct ctio7_to_24xx *pkt; |
1514 | struct qla_hw_data *ha = vha->hw; | 1516 | struct qla_hw_data *ha = vha->hw; |
1515 | struct atio_from_isp *atio = &prm->cmd->atio; | 1517 | struct atio_from_isp *atio = &prm->cmd->atio; |
1518 | uint16_t temp; | ||
1516 | 1519 | ||
1517 | pkt = (struct ctio7_to_24xx *)vha->req->ring_ptr; | 1520 | pkt = (struct ctio7_to_24xx *)vha->req->ring_ptr; |
1518 | prm->pkt = pkt; | 1521 | prm->pkt = pkt; |
@@ -1541,13 +1544,13 @@ static int qlt_24xx_build_ctio_pkt(struct qla_tgt_prm *prm, | |||
1541 | pkt->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0]; | 1544 | pkt->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0]; |
1542 | pkt->exchange_addr = atio->u.isp24.exchange_addr; | 1545 | pkt->exchange_addr = atio->u.isp24.exchange_addr; |
1543 | pkt->u.status0.flags |= (atio->u.isp24.attr << 9); | 1546 | pkt->u.status0.flags |= (atio->u.isp24.attr << 9); |
1544 | pkt->u.status0.ox_id = swab16(atio->u.isp24.fcp_hdr.ox_id); | 1547 | temp = be16_to_cpu(atio->u.isp24.fcp_hdr.ox_id); |
1548 | pkt->u.status0.ox_id = cpu_to_le16(temp); | ||
1545 | pkt->u.status0.relative_offset = cpu_to_le32(prm->cmd->offset); | 1549 | pkt->u.status0.relative_offset = cpu_to_le32(prm->cmd->offset); |
1546 | 1550 | ||
1547 | ql_dbg(ql_dbg_tgt, vha, 0xe00c, | 1551 | ql_dbg(ql_dbg_tgt, vha, 0xe00c, |
1548 | "qla_target(%d): handle(cmd) -> %08x, timeout %d, ox_id %#x\n", | 1552 | "qla_target(%d): handle(cmd) -> %08x, timeout %d, ox_id %#x\n", |
1549 | vha->vp_idx, pkt->handle, QLA_TGT_TIMEOUT, | 1553 | vha->vp_idx, pkt->handle, QLA_TGT_TIMEOUT, temp); |
1550 | le16_to_cpu(pkt->u.status0.ox_id)); | ||
1551 | return 0; | 1554 | return 0; |
1552 | } | 1555 | } |
1553 | 1556 | ||
@@ -2619,6 +2622,7 @@ static int __qlt_send_term_exchange(struct scsi_qla_host *vha, | |||
2619 | struct qla_hw_data *ha = vha->hw; | 2622 | struct qla_hw_data *ha = vha->hw; |
2620 | request_t *pkt; | 2623 | request_t *pkt; |
2621 | int ret = 0; | 2624 | int ret = 0; |
2625 | uint16_t temp; | ||
2622 | 2626 | ||
2623 | ql_dbg(ql_dbg_tgt, vha, 0xe01c, "Sending TERM EXCH CTIO (ha=%p)\n", ha); | 2627 | ql_dbg(ql_dbg_tgt, vha, 0xe01c, "Sending TERM EXCH CTIO (ha=%p)\n", ha); |
2624 | 2628 | ||
@@ -2655,7 +2659,8 @@ static int __qlt_send_term_exchange(struct scsi_qla_host *vha, | |||
2655 | ctio24->u.status1.flags = (atio->u.isp24.attr << 9) | | 2659 | ctio24->u.status1.flags = (atio->u.isp24.attr << 9) | |
2656 | __constant_cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | | 2660 | __constant_cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | |
2657 | CTIO7_FLAGS_TERMINATE); | 2661 | CTIO7_FLAGS_TERMINATE); |
2658 | ctio24->u.status1.ox_id = swab16(atio->u.isp24.fcp_hdr.ox_id); | 2662 | temp = be16_to_cpu(atio->u.isp24.fcp_hdr.ox_id); |
2663 | ctio24->u.status1.ox_id = cpu_to_le16(temp); | ||
2659 | 2664 | ||
2660 | /* Most likely, it isn't needed */ | 2665 | /* Most likely, it isn't needed */ |
2661 | ctio24->u.status1.residual = get_unaligned((uint32_t *) | 2666 | ctio24->u.status1.residual = get_unaligned((uint32_t *) |
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index e0a58fd13f66..d1d24fb0160a 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h | |||
@@ -443,7 +443,7 @@ struct ctio7_to_24xx { | |||
443 | uint16_t reserved1; | 443 | uint16_t reserved1; |
444 | __le16 flags; | 444 | __le16 flags; |
445 | uint32_t residual; | 445 | uint32_t residual; |
446 | uint16_t ox_id; | 446 | __le16 ox_id; |
447 | uint16_t scsi_status; | 447 | uint16_t scsi_status; |
448 | uint32_t relative_offset; | 448 | uint32_t relative_offset; |
449 | uint32_t reserved2; | 449 | uint32_t reserved2; |
@@ -458,7 +458,7 @@ struct ctio7_to_24xx { | |||
458 | uint16_t sense_length; | 458 | uint16_t sense_length; |
459 | uint16_t flags; | 459 | uint16_t flags; |
460 | uint32_t residual; | 460 | uint32_t residual; |
461 | uint16_t ox_id; | 461 | __le16 ox_id; |
462 | uint16_t scsi_status; | 462 | uint16_t scsi_status; |
463 | uint16_t response_len; | 463 | uint16_t response_len; |
464 | uint16_t reserved; | 464 | uint16_t reserved; |