summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic/fnic_res.h
diff options
context:
space:
mode:
authorAbhijeet Joglekar <abjoglek@cisco.com>2009-10-21 16:28:25 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 12:00:36 -0600
commit4b53662bd594941e5e5e540baaaff6a3e66d062c (patch)
tree934e76d1254c90af5017e6454718e847217c14ad /drivers/scsi/fnic/fnic_res.h
parentf9bdc3da4c9c2af4886bc6a562effc05cbf75234 (diff)
downloadlinux-4b53662bd594941e5e5e540baaaff6a3e66d062c.tar.bz2
[SCSI] fnic: Pad the unused bytes of CDB to 0s
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/fnic/fnic_res.h')
-rw-r--r--drivers/scsi/fnic/fnic_res.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/fnic/fnic_res.h b/drivers/scsi/fnic/fnic_res.h
index b6f310262534..88c4471c18f0 100644
--- a/drivers/scsi/fnic/fnic_res.h
+++ b/drivers/scsi/fnic/fnic_res.h
@@ -58,6 +58,7 @@ static inline void fnic_queue_wq_copy_desc_icmnd_16(struct vnic_wq_copy *wq,
u64 sgl_addr, u64 sns_addr,
u8 crn, u8 pri_ta,
u8 flags, u8 *scsi_cdb,
+ u8 cdb_len,
u32 data_len, u8 *lun,
u32 d_id, u16 mss,
u32 ratov, u32 edtov)
@@ -82,7 +83,8 @@ static inline void fnic_queue_wq_copy_desc_icmnd_16(struct vnic_wq_copy *wq,
desc->u.icmnd_16.pri_ta = pri_ta; /* SCSI Pri & Task attribute */
desc->u.icmnd_16._resvd1 = 0; /* reserved: should be 0 */
desc->u.icmnd_16.flags = flags; /* command flags */
- memcpy(desc->u.icmnd_16.scsi_cdb, scsi_cdb, CDB_16); /* SCSI CDB */
+ memset(desc->u.icmnd_16.scsi_cdb, 0, CDB_16);
+ memcpy(desc->u.icmnd_16.scsi_cdb, scsi_cdb, cdb_len); /* SCSI CDB */
desc->u.icmnd_16.data_len = data_len; /* length of data expected */
memcpy(desc->u.icmnd_16.lun, lun, LUN_ADDRESS); /* LUN address */
desc->u.icmnd_16._resvd2 = 0; /* reserved */