]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/scsi/qla2xxx/qla_init.c
[SCSI] qla2xxx: Ensure the timer and DPC routines complete prior to midlayer tear...
[mirror_ubuntu-bionic-kernel.git] / drivers / scsi / qla2xxx / qla_init.c
index 87f9abc714604b9927b019ebb67f71cf11f01c5a..0febfa648c34807134a9bfcf717cd2b694c0c58c 100644 (file)
@@ -816,7 +816,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
                qla_printk(KERN_INFO, ha, "Allocated (%d KB) for FCE...\n",
                    FCE_SIZE / 1024);
 
-               fce_size = sizeof(struct qla2xxx_fce_chain) + EFT_SIZE;
+               fce_size = sizeof(struct qla2xxx_fce_chain) + FCE_SIZE;
                ha->flags.fce_enabled = 1;
                ha->fce_dma = tc_dma;
                ha->fce = tc;
@@ -963,6 +963,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
        struct qla_hw_data *ha = vha->hw;
        struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
        unsigned long flags;
+       uint16_t fw_major_version;
 
        if (!IS_FWI2_CAPABLE(ha) && !IS_QLA2100(ha) && !IS_QLA2200(ha)) {
                /* Disable SRAM, Instruction RAM and GP RAM parity.  */
@@ -986,13 +987,15 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
 
                        rval = qla2x00_execute_fw(vha, srisc_address);
                        /* Retrieve firmware information. */
-                       if (rval == QLA_SUCCESS && ha->fw_major_version == 0) {
+                       if (rval == QLA_SUCCESS) {
+                               fw_major_version = ha->fw_major_version;
                                qla2x00_get_fw_version(vha,
                                    &ha->fw_major_version,
                                    &ha->fw_minor_version,
                                    &ha->fw_subminor_version,
                                    &ha->fw_attributes, &ha->fw_memory_size,
-                                   ha->mpi_version, &ha->mpi_capabilities);
+                                   ha->mpi_version, &ha->mpi_capabilities,
+                                   ha->phy_version);
                                ha->flags.npiv_supported = 0;
                                if (IS_QLA2XXX_MIDTYPE(ha) &&
                                         (ha->fw_attributes & BIT_2)) {
@@ -1003,10 +1006,11 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
                                                ha->max_npiv_vports =
                                                    MIN_MULTI_ID_FABRIC - 1;
                                }
-                               qla2x00_resize_request_q(vha);
-
-                               if (ql2xallocfwdump)
-                                       qla2x00_alloc_fw_dump(vha);
+                               if (!fw_major_version) {
+                                       qla2x00_resize_request_q(vha);
+                                       if (ql2xallocfwdump)
+                                               qla2x00_alloc_fw_dump(vha);
+                               }
                        }
                } else {
                        DEBUG2(printk(KERN_INFO
@@ -4452,6 +4456,9 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
                icb->enode_mac[5] = 0x06 + PCI_FUNC(ha->pdev->devfn);
        }
 
+       /* Use extended-initialization control block. */
+       memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb));
+
        /*
         * Setup driver NVRAM options.
         */