]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fix same RPI registered multiple times after HBA reset (CR 127176)
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 8 May 2012 22:01:26 +0000 (17:01 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:01:26 +0000 (17:01 -0700)
After HBA reset I/Os never complete and system eventually hangs, this is
because the BE adapters need to have RPI headers reposted before rpis can be
assigned to NDLPs. By moving the call to lpfc_sli4_node_prep to be after the
call to post_all_rpi headers this posts the headers before the rpis are
assigned.

commit id: 97f2ecf1f401d689d4036f64c244fad3b39e5e0a

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c

index 19b62f2c946ea16f4790905cd8b5d9f710c8187e..e5a9d22e4aaafbdeef9df4fc92a7837f3c0cc93d 100644 (file)
@@ -5202,8 +5202,7 @@ lpfc_sli4_create_rpi_hdr(struct lpfc_hba *phba)
         * rpi is normalized to a zero base because the physical rpi is
         * port based.
         */
-       curr_rpi_range = phba->sli4_hba.next_rpi -
-               phba->sli4_hba.max_cfg_param.rpi_base;
+       curr_rpi_range = phba->sli4_hba.next_rpi;
        spin_unlock_irq(&phba->hbalock);
 
        /*
@@ -6118,7 +6117,6 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
                phba->sli4_hba.next_xri = phba->sli4_hba.max_cfg_param.xri_base;
                phba->vpi_base = phba->sli4_hba.max_cfg_param.vpi_base;
                phba->vfi_base = phba->sli4_hba.max_cfg_param.vfi_base;
-               phba->sli4_hba.next_rpi = phba->sli4_hba.max_cfg_param.rpi_base;
                phba->max_vpi = (phba->sli4_hba.max_cfg_param.max_vpi > 0) ?
                                (phba->sli4_hba.max_cfg_param.max_vpi - 1) : 0;
                phba->max_vports = phba->max_vpi;
index 73310e838ee1f859ce932888d996c85f9a371c61..3af6aa86b2af4e7ef6748313d5440768b607683a 100644 (file)
@@ -5600,8 +5600,6 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba)
                for (i = 0; i < count; i++)
                        phba->sli4_hba.rpi_ids[i] = base + i;
 
-               lpfc_sli4_node_prep(phba);
-
                /* VPIs. */
                count = phba->sli4_hba.max_cfg_param.max_vpi;
                base = phba->sli4_hba.max_cfg_param.vpi_base;
@@ -6171,6 +6169,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
                rc = -ENODEV;
                goto out_free_mbox;
        }
+       lpfc_sli4_node_prep(phba);
 
        /* Create all the SLI4 queues */
        rc = lpfc_sli4_queue_create(phba);