aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic
diff options
context:
space:
mode:
authorAbhijeet Joglekar <abjoglek@cisco.com>2009-10-21 19:28:25 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:00:36 -0500
commit4b53662bd594941e5e5e540baaaff6a3e66d062c (patch)
tree934e76d1254c90af5017e6454718e847217c14ad /drivers/scsi/fnic
parentf9bdc3da4c9c2af4886bc6a562effc05cbf75234 (diff)
[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')
-rw-r--r--drivers/scsi/fnic/fnic_res.h4
-rw-r--r--drivers/scsi/fnic/fnic_scsi.c3
2 files changed, 5 insertions, 2 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,
58 u64 sgl_addr, u64 sns_addr, 58 u64 sgl_addr, u64 sns_addr,
59 u8 crn, u8 pri_ta, 59 u8 crn, u8 pri_ta,
60 u8 flags, u8 *scsi_cdb, 60 u8 flags, u8 *scsi_cdb,
61 u8 cdb_len,
61 u32 data_len, u8 *lun, 62 u32 data_len, u8 *lun,
62 u32 d_id, u16 mss, 63 u32 d_id, u16 mss,
63 u32 ratov, u32 edtov) 64 u32 ratov, u32 edtov)
@@ -82,7 +83,8 @@ static inline void fnic_queue_wq_copy_desc_icmnd_16(struct vnic_wq_copy *wq,
82 desc->u.icmnd_16.pri_ta = pri_ta; /* SCSI Pri & Task attribute */ 83 desc->u.icmnd_16.pri_ta = pri_ta; /* SCSI Pri & Task attribute */
83 desc->u.icmnd_16._resvd1 = 0; /* reserved: should be 0 */ 84 desc->u.icmnd_16._resvd1 = 0; /* reserved: should be 0 */
84 desc->u.icmnd_16.flags = flags; /* command flags */ 85 desc->u.icmnd_16.flags = flags; /* command flags */
85 memcpy(desc->u.icmnd_16.scsi_cdb, scsi_cdb, CDB_16); /* SCSI CDB */ 86 memset(desc->u.icmnd_16.scsi_cdb, 0, CDB_16);
87 memcpy(desc->u.icmnd_16.scsi_cdb, scsi_cdb, cdb_len); /* SCSI CDB */
86 desc->u.icmnd_16.data_len = data_len; /* length of data expected */ 88 desc->u.icmnd_16.data_len = data_len; /* length of data expected */
87 memcpy(desc->u.icmnd_16.lun, lun, LUN_ADDRESS); /* LUN address */ 89 memcpy(desc->u.icmnd_16.lun, lun, LUN_ADDRESS); /* LUN address */
88 desc->u.icmnd_16._resvd2 = 0; /* reserved */ 90 desc->u.icmnd_16._resvd2 = 0; /* reserved */
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index bfc996971b81..b5d17385939b 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -319,7 +319,8 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
319 0, /* scsi cmd ref, always 0 */ 319 0, /* scsi cmd ref, always 0 */
320 pri_tag, /* scsi pri and tag */ 320 pri_tag, /* scsi pri and tag */
321 flags, /* command flags */ 321 flags, /* command flags */
322 sc->cmnd, scsi_bufflen(sc), 322 sc->cmnd, sc->cmd_len,
323 scsi_bufflen(sc),
323 fc_lun.scsi_lun, io_req->port_id, 324 fc_lun.scsi_lun, io_req->port_id,
324 rport->maxframe_size, rp->r_a_tov, 325 rport->maxframe_size, rp->r_a_tov,
325 rp->e_d_tov); 326 rp->e_d_tov);