提交 85727e1f 编写于 作者: M Mike Hernandez 提交者: James Bottomley

[SCSI] qla2xxx: Populate Command Type 6 LUN field properly.

Use the host_to_fcp_swap call to correctly populate the LUN field
in the Command Type 6 path.  This field is used during LUN reset
cleanup and must match the field used in the FCP command.

Cc: stable@kernel.org
Signed-off-by: NMike Hernandez <michael.hernandez@qlogic.com>
Signed-off-by: NMadhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 e55f8753
...@@ -1061,6 +1061,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, ...@@ -1061,6 +1061,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
fcp_cmnd->additional_cdb_len |= 2; fcp_cmnd->additional_cdb_len |= 2;
int_to_scsilun(sp->cmd->device->lun, &fcp_cmnd->lun); int_to_scsilun(sp->cmd->device->lun, &fcp_cmnd->lun);
host_to_fcp_swap((uint8_t *)&fcp_cmnd->lun, sizeof(fcp_cmnd->lun));
memcpy(fcp_cmnd->cdb, cmd->cmnd, cmd->cmd_len); memcpy(fcp_cmnd->cdb, cmd->cmnd, cmd->cmd_len);
cmd_pkt->fcp_cmnd_dseg_len = cpu_to_le16(fcp_cmnd_len); cmd_pkt->fcp_cmnd_dseg_len = cpu_to_le16(fcp_cmnd_len);
cmd_pkt->fcp_cmnd_dseg_address[0] = cpu_to_le32( cmd_pkt->fcp_cmnd_dseg_address[0] = cpu_to_le32(
......
...@@ -2749,6 +2749,7 @@ qla82xx_start_scsi(srb_t *sp) ...@@ -2749,6 +2749,7 @@ qla82xx_start_scsi(srb_t *sp)
goto queuing_error_fcp_cmnd; goto queuing_error_fcp_cmnd;
int_to_scsilun(sp->cmd->device->lun, &cmd_pkt->lun); int_to_scsilun(sp->cmd->device->lun, &cmd_pkt->lun);
host_to_fcp_swap((uint8_t *)&cmd_pkt->lun, sizeof(cmd_pkt->lun));
/* build FCP_CMND IU */ /* build FCP_CMND IU */
memset(ctx->fcp_cmnd, 0, sizeof(struct fcp_cmnd)); memset(ctx->fcp_cmnd, 0, sizeof(struct fcp_cmnd));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册