aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i
diff options
context:
space:
mode:
authorEddie Wai <eddie.wai@broadcom.com>2010-11-23 18:29:22 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:11 -0500
commitcf464fc5eb272f3f5964560ef2b8d632333afe0d (patch)
treee1d6aaf2efb3f74b7625bf8545510a7ddbc782fe /drivers/scsi/bnx2i
parent8eea2f55a65b9471276e78e5c86ddd19c4c0365c (diff)
[SCSI] bnx2i: Fixed the endian bug in the TMF LUN cmd send
Added a be32_to_cpu call for the TMF LUN wqe. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bnx2i')
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 32cf9306ffcb..c9a3c0ff3c2f 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -385,6 +385,7 @@ int bnx2i_send_iscsi_tmf(struct bnx2i_conn *bnx2i_conn,
385 struct bnx2i_cmd *bnx2i_cmd; 385 struct bnx2i_cmd *bnx2i_cmd;
386 struct bnx2i_tmf_request *tmfabort_wqe; 386 struct bnx2i_tmf_request *tmfabort_wqe;
387 u32 dword; 387 u32 dword;
388 u32 scsi_lun[2];
388 389
389 bnx2i_cmd = (struct bnx2i_cmd *)mtask->dd_data; 390 bnx2i_cmd = (struct bnx2i_cmd *)mtask->dd_data;
390 tmfabort_hdr = (struct iscsi_tm *)mtask->hdr; 391 tmfabort_hdr = (struct iscsi_tm *)mtask->hdr;
@@ -426,7 +427,10 @@ int bnx2i_send_iscsi_tmf(struct bnx2i_conn *bnx2i_conn,
426 default: 427 default:
427 tmfabort_wqe->ref_itt = RESERVED_ITT; 428 tmfabort_wqe->ref_itt = RESERVED_ITT;
428 } 429 }
429 memcpy(tmfabort_wqe->lun, tmfabort_hdr->lun, sizeof(struct scsi_lun)); 430 memcpy(scsi_lun, tmfabort_hdr->lun, sizeof(struct scsi_lun));
431 tmfabort_wqe->lun[0] = be32_to_cpu(scsi_lun[0]);
432 tmfabort_wqe->lun[1] = be32_to_cpu(scsi_lun[1]);
433
430 tmfabort_wqe->ref_cmd_sn = be32_to_cpu(tmfabort_hdr->refcmdsn); 434 tmfabort_wqe->ref_cmd_sn = be32_to_cpu(tmfabort_hdr->refcmdsn);
431 435
432 tmfabort_wqe->bd_list_addr_lo = (u32) bnx2i_conn->hba->mp_bd_dma; 436 tmfabort_wqe->bd_list_addr_lo = (u32) bnx2i_conn->hba->mp_bd_dma;