[SCSI] qla2xxx: Move initialization of some variables before iospace_config.
authorChad Dupuis <chad.dupuis@qlogic.com>
Fri, 18 Nov 2011 17:03:21 +0000 (09:03 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 15 Dec 2011 06:55:11 +0000 (10:55 +0400)
Some variables need to be initialized before we config PCI I/O config space
or else strange firmware initialization errors may occur.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_os.c

index d713bc3877909499303170b7f201c27842646f4c..4ed1e4a96b954bf16562ff28dd306f6ab1f79ad2 100644 (file)
@@ -2027,6 +2027,11 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
                pdev->needs_freset = 1;
        }
 
+       ha->prev_topology = 0;
+       ha->init_cb_size = sizeof(init_cb_t);
+       ha->link_data_rate = PORT_SPEED_UNKNOWN;
+       ha->optrom_size = OPTROM_SIZE_2300;
+
        /* Assign ISP specific operations. */
        max_id = MAX_TARGETS_2200;
        if (IS_QLA2100(ha)) {
@@ -2143,11 +2148,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
        ql_log_pci(ql_log_info, pdev, 0x001d,
            "Found an ISP%04X irq %d iobase 0x%p.\n",
            pdev->device, pdev->irq, ha->iobase);
-       ha->prev_topology = 0;
-       ha->init_cb_size = sizeof(init_cb_t);
-       ha->link_data_rate = PORT_SPEED_UNKNOWN;
-       ha->optrom_size = OPTROM_SIZE_2300;
-
        mutex_init(&ha->vport_lock);
        init_completion(&ha->mbx_cmd_comp);
        complete(&ha->mbx_cmd_comp);