Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] lpfc 8.3.0 : Fix issue with assumed Interrupt Enable Block support

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>

authored by

James Smart and committed by
James Bottomley
8f34f4ce 97207482

+6 -8
+3 -8
drivers/scsi/lpfc/lpfc_mbox.c
··· 1198 1198 sizeof(*phba->host_gp)); 1199 1199 } 1200 1200 1201 - /* Setup Port Group ring pointer */ 1202 - if (phba->sli3_options & LPFC_SLI3_INB_ENABLED) { 1203 - pgp_offset = offsetof(struct lpfc_sli2_slim, 1204 - mbx.us.s3_inb_pgp.port); 1205 - phba->hbq_get = phba->mbox->us.s3_inb_pgp.hbq_get; 1206 - } else if (phba->sli_rev == 3) { 1201 + /* Setup Port Group offset */ 1202 + if (phba->sli_rev == 3) 1207 1203 pgp_offset = offsetof(struct lpfc_sli2_slim, 1208 1204 mbx.us.s3_pgp.port); 1209 - phba->hbq_get = phba->mbox->us.s3_pgp.hbq_get; 1210 - } else 1205 + else 1211 1206 pgp_offset = offsetof(struct lpfc_sli2_slim, mbx.us.s2.port); 1212 1207 pdma_addr = phba->slim2p.phys + pgp_offset; 1213 1208 phba->pcb->pgpAddrHigh = putPaddrHigh(pdma_addr);
+3
drivers/scsi/lpfc/lpfc_sli.c
··· 3144 3144 phba->sli3_options |= LPFC_SLI3_CRP_ENABLED; 3145 3145 if (pmb->mb.un.varCfgPort.ginb) { 3146 3146 phba->sli3_options |= LPFC_SLI3_INB_ENABLED; 3147 + phba->hbq_get = phba->mbox->us.s3_inb_pgp.hbq_get; 3147 3148 phba->port_gp = phba->mbox->us.s3_inb_pgp.port; 3148 3149 phba->inb_ha_copy = &phba->mbox->us.s3_inb_pgp.ha_copy; 3149 3150 phba->inb_counter = &phba->mbox->us.s3_inb_pgp.counter; 3150 3151 phba->inb_last_counter = 3151 3152 phba->mbox->us.s3_inb_pgp.counter; 3152 3153 } else { 3154 + phba->hbq_get = phba->mbox->us.s3_pgp.hbq_get; 3153 3155 phba->port_gp = phba->mbox->us.s3_pgp.port; 3154 3156 phba->inb_ha_copy = NULL; 3155 3157 phba->inb_counter = NULL; 3156 3158 } 3157 3159 } else { 3160 + phba->hbq_get = NULL; 3158 3161 phba->port_gp = phba->mbox->us.s2.port; 3159 3162 phba->inb_ha_copy = NULL; 3160 3163 phba->inb_counter = NULL;