[SCSI] lpfc 8.3.0 : Fix issue with assumed Interrupt Enable Block support
authorJames Smart <James.Smart@Emulex.Com>
Fri, 5 Dec 2008 03:39:23 +0000 (22:39 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 29 Dec 2008 17:24:26 +0000 (11:24 -0600)
The phba hbq_get address was setup before the HBA reported support for
Interrupt Enable Block (INB).  This caused loopback tests to fail
after all HBQs had been used once.  Moved setting of hba_get until
after config port mailbox command completes.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/lpfc/lpfc_mbox.c
drivers/scsi/lpfc/lpfc_sli.c

index dcdb7c939520166c6400458698cc6cf287af4d81..5bb376baba62c1045f87423401854eb02262404c 100644 (file)
@@ -1198,16 +1198,11 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
                                    sizeof(*phba->host_gp));
        }
 
-       /* Setup Port Group ring pointer */
-       if (phba->sli3_options & LPFC_SLI3_INB_ENABLED) {
-               pgp_offset = offsetof(struct lpfc_sli2_slim,
-                                     mbx.us.s3_inb_pgp.port);
-               phba->hbq_get = phba->mbox->us.s3_inb_pgp.hbq_get;
-       } else if (phba->sli_rev == 3) {
+       /* Setup Port Group offset */
+       if (phba->sli_rev == 3)
                pgp_offset = offsetof(struct lpfc_sli2_slim,
                                      mbx.us.s3_pgp.port);
-               phba->hbq_get = phba->mbox->us.s3_pgp.hbq_get;
-       } else
+       else
                pgp_offset = offsetof(struct lpfc_sli2_slim, mbx.us.s2.port);
        pdma_addr = phba->slim2p.phys + pgp_offset;
        phba->pcb->pgpAddrHigh = putPaddrHigh(pdma_addr);
index 215f9a56f824ea21b0bab7c9e2850655c6b120e1..14f933676ce5e872aab97493019cc7d1fd1039d5 100644 (file)
@@ -3144,17 +3144,20 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode)
                        phba->sli3_options |= LPFC_SLI3_CRP_ENABLED;
                if (pmb->mb.un.varCfgPort.ginb) {
                        phba->sli3_options |= LPFC_SLI3_INB_ENABLED;
+                       phba->hbq_get = phba->mbox->us.s3_inb_pgp.hbq_get;
                        phba->port_gp = phba->mbox->us.s3_inb_pgp.port;
                        phba->inb_ha_copy = &phba->mbox->us.s3_inb_pgp.ha_copy;
                        phba->inb_counter = &phba->mbox->us.s3_inb_pgp.counter;
                        phba->inb_last_counter =
                                        phba->mbox->us.s3_inb_pgp.counter;
                } else {
+                       phba->hbq_get = phba->mbox->us.s3_pgp.hbq_get;
                        phba->port_gp = phba->mbox->us.s3_pgp.port;
                        phba->inb_ha_copy = NULL;
                        phba->inb_counter = NULL;
                }
        } else {
+               phba->hbq_get = NULL;
                phba->port_gp = phba->mbox->us.s2.port;
                phba->inb_ha_copy = NULL;
                phba->inb_counter = NULL;