]> git.hungrycats.org Git - linux/commitdiff
Fix qla2xxx mismerge
authorJames Bottomley <jejb@mulgrave.(none)>
Mon, 13 Sep 2004 19:30:08 +0000 (15:30 -0400)
committerJames Bottomley <jejb@mulgrave.(none)>
Mon, 13 Sep 2004 19:30:08 +0000 (15:30 -0400)
From: Andrew Vasquez <andrew.vasquez@qlogic.com>

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/qla2xxx/qla_os.c

index 313ec65466101c18a827e98a796b409718eea6a5..4d27495f958f44d920c3a1a4a2601abfe4c11cd8 100644 (file)
@@ -2892,6 +2892,19 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
                        continue;
                }
 
+               /* get consistent memory allocated for init control block */
+               ha->init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
+                   &ha->init_cb_dma);
+               if (ha->init_cb == NULL) {
+                       qla_printk(KERN_WARNING, ha,
+                           "Memory Allocation failed - init_cb\n");
+
+                       qla2x00_mem_free(ha);
+                       msleep(100);
+
+                       continue;
+               }
+               memset(ha->init_cb, 0, sizeof(init_cb_t));
 
                /* Get consistent memory allocated for Get Port Database cmd */
                ha->iodesc_pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
@@ -2983,21 +2996,6 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
                        memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt));
                }
 
-               /* Get consistent memory allocated for Get Port Database cmd */
-               ha->iodesc_pd = pci_alloc_consistent(ha->pdev,
-                   PORT_DATABASE_SIZE, &ha->iodesc_pd_dma);
-               if (ha->iodesc_pd == NULL) {
-                       /* error */
-                       qla_printk(KERN_WARNING, ha,
-                           "Memory Allocation failed - iodesc_pd\n");
-
-                       qla2x00_mem_free(ha);
-                       msleep(100);
-
-                       continue;
-               }
-               memset(ha->iodesc_pd, 0, PORT_DATABASE_SIZE);
-
                /* Done all allocations without any error. */
                status = 0;