[SCSI] qla2xxx: Properly set the dsd_list_len for dsd_chaining in cmd type 6.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Tue, 10 May 2011 18:18:15 +0000 (11:18 -0700)
committerJames Bottomley <jbottomley@parallels.com>
Tue, 17 May 2011 07:28:03 +0000 (11:28 +0400)
The firmware spec has the fcp_data_dseg_len defined as a 32-bit
value, while the corresponding field in the driver structure has
it defined as a 16-bit value.

Cc: stable@kernel.org
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_fw.h
drivers/scsi/qla2xxx/qla_nx.c

index 73888ae..691783a 100644 (file)
@@ -416,8 +416,7 @@ struct cmd_type_6 {
        uint8_t vp_index;
 
        uint32_t fcp_data_dseg_address[2];      /* Data segment address. */
-       uint16_t fcp_data_dseg_len;             /* Data segment length. */
-       uint16_t reserved_1;                    /* MUST be set to 0. */
+       uint32_t fcp_data_dseg_len;             /* Data segment length. */
 };
 
 #define COMMAND_TYPE_7 0x18            /* Command Type 7 entry */
index acd1ad3..8b217f3 100644 (file)
@@ -2563,11 +2563,11 @@ qla2xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt,
                        dsd_seg = (uint32_t *)&cmd_pkt->fcp_data_dseg_address;
                        *dsd_seg++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
                        *dsd_seg++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
-                       cmd_pkt->fcp_data_dseg_len = dsd_list_len;
+                       *dsd_seg++ = cpu_to_le32(dsd_list_len);
                } else {
                        *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
                        *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
-                       *cur_dsd++ = dsd_list_len;
+                       *cur_dsd++ = cpu_to_le32(dsd_list_len);
                }
                cur_dsd = (uint32_t *)next_dsd;
                while (avail_dsds) {