[SCSI] qla2xxx: Clear complete initialization control block.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Tue, 10 May 2011 18:30:14 +0000 (11:30 -0700)
committerJames Bottomley <jbottomley@parallels.com>
Tue, 17 May 2011 07:35:57 +0000 (11:35 +0400)
Use proper init_cb_size member which takes into account
MID/non-MID init-cb structure sizes.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_init.c

index cb6969320b47a5ba014cf382a7d75351dc9ea8ab..920b76bfbb932e6329f735fa42ebb28013355fca 100644 (file)
@@ -5210,7 +5210,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
        }
 
        /* Reset Initialization control block */
-       memset(icb, 0, sizeof(struct init_cb_81xx));
+       memset(icb, 0, ha->init_cb_size);
 
        /* Copy 1st segment. */
        dptr1 = (uint8_t *)icb;