From: Chad Dupuis Date: Sat, 17 Sep 2011 14:43:02 +0000 (-0400) Subject: qla2xxx: Move initialization of some variables before iospace_config. X-Git-Tag: v2.6.39-400.9.0~822^2^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2095401df1a103ab3589243b4635f5833523ca13;p=users%2Fjedix%2Flinux-maple.git qla2xxx: Move initialization of some variables before iospace_config. 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 --- diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 50ad79e41eb7..0e2a13292e67 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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);