aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2009-07-19 10:01:03 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-08-22 18:51:56 -0400
commit8fa38513ddc1076f3e26c651f3567b084c273ba2 (patch)
treea13d51bd2b2deced5b2209f52118b53ad1f59bbc /drivers/scsi/lpfc/lpfc_init.c
parent66d6faec2f874cf6bf9bd4900966584ea9feae3d (diff)
[SCSI] lpfc 8.3.4: Various SLI4 fixes
Various SLI4 fixes - Fix switch name not used in the FCF record for FCoE HBAs - Enabled HBA UE error polling error-condition action code - Rewrite lpfc_sli4_scmd_to_wqidx_distr() to handle counter rollover cleanly - Modify resume_rpi mailbox data structure to match current SLI4 spec - Do not issue mailbox command in MBX_POLL mode when LPFC_HBA_ERROR is set - Wait for HBA POST completion before checking Online and UE registers - Fix accumulated total length not being filled in on unsolicited IOCBs - Use PCI config space register to determine SLI rev of HBA - Turn on starting ELS tmo function timer during device initialization Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 2452dc9c9014..f8271a587aab 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4488,23 +4488,6 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba)
4488 if (!phba->sli4_hba.STAregaddr) 4488 if (!phba->sli4_hba.STAregaddr)
4489 return -ENODEV; 4489 return -ENODEV;
4490 4490
4491 /* With uncoverable error, log the error message and return error */
4492 onlnreg0 = readl(phba->sli4_hba.ONLINE0regaddr);
4493 onlnreg1 = readl(phba->sli4_hba.ONLINE1regaddr);
4494 if ((onlnreg0 != LPFC_ONLINE_NERR) || (onlnreg1 != LPFC_ONLINE_NERR)) {
4495 uerrlo_reg.word0 = readl(phba->sli4_hba.UERRLOregaddr);
4496 uerrhi_reg.word0 = readl(phba->sli4_hba.UERRHIregaddr);
4497 if (uerrlo_reg.word0 || uerrhi_reg.word0) {
4498 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
4499 "1422 HBA Unrecoverable error: "
4500 "uerr_lo_reg=0x%x, uerr_hi_reg=0x%x, "
4501 "online0_reg=0x%x, online1_reg=0x%x\n",
4502 uerrlo_reg.word0, uerrhi_reg.word0,
4503 onlnreg0, onlnreg1);
4504 }
4505 return -ENODEV;
4506 }
4507
4508 /* Wait up to 30 seconds for the SLI Port POST done and ready */ 4491 /* Wait up to 30 seconds for the SLI Port POST done and ready */
4509 for (i = 0; i < 3000; i++) { 4492 for (i = 0; i < 3000; i++) {
4510 sta_reg.word0 = readl(phba->sli4_hba.STAregaddr); 4493 sta_reg.word0 = readl(phba->sli4_hba.STAregaddr);
@@ -4544,6 +4527,23 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba)
4544 bf_get(lpfc_scratchpad_featurelevel1, &scratchpad), 4527 bf_get(lpfc_scratchpad_featurelevel1, &scratchpad),
4545 bf_get(lpfc_scratchpad_featurelevel2, &scratchpad)); 4528 bf_get(lpfc_scratchpad_featurelevel2, &scratchpad));
4546 4529
4530 /* With uncoverable error, log the error message and return error */
4531 onlnreg0 = readl(phba->sli4_hba.ONLINE0regaddr);
4532 onlnreg1 = readl(phba->sli4_hba.ONLINE1regaddr);
4533 if ((onlnreg0 != LPFC_ONLINE_NERR) || (onlnreg1 != LPFC_ONLINE_NERR)) {
4534 uerrlo_reg.word0 = readl(phba->sli4_hba.UERRLOregaddr);
4535 uerrhi_reg.word0 = readl(phba->sli4_hba.UERRHIregaddr);
4536 if (uerrlo_reg.word0 || uerrhi_reg.word0) {
4537 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
4538 "1422 HBA Unrecoverable error: "
4539 "uerr_lo_reg=0x%x, uerr_hi_reg=0x%x, "
4540 "online0_reg=0x%x, online1_reg=0x%x\n",
4541 uerrlo_reg.word0, uerrhi_reg.word0,
4542 onlnreg0, onlnreg1);
4543 }
4544 return -ENODEV;
4545 }
4546
4547 return port_error; 4547 return port_error;
4548} 4548}
4549 4549
@@ -7635,19 +7635,17 @@ static int __devinit
7635lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) 7635lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
7636{ 7636{
7637 int rc; 7637 int rc;
7638 uint16_t dev_id; 7638 struct lpfc_sli_intf intf;
7639 7639
7640 if (pci_read_config_word(pdev, PCI_DEVICE_ID, &dev_id)) 7640 if (pci_read_config_dword(pdev, LPFC_SLIREV_CONF_WORD, &intf.word0))
7641 return -ENODEV; 7641 return -ENODEV;
7642 7642
7643 switch (dev_id) { 7643 if ((bf_get(lpfc_sli_intf_valid, &intf) == LPFC_SLI_INTF_VALID) &&
7644 case PCI_DEVICE_ID_TIGERSHARK: 7644 (bf_get(lpfc_sli_intf_rev, &intf) == LPFC_SLIREV_CONF_SLI4))
7645 rc = lpfc_pci_probe_one_s4(pdev, pid); 7645 rc = lpfc_pci_probe_one_s4(pdev, pid);
7646 break; 7646 else
7647 default:
7648 rc = lpfc_pci_probe_one_s3(pdev, pid); 7647 rc = lpfc_pci_probe_one_s3(pdev, pid);
7649 break; 7648
7650 }
7651 return rc; 7649 return rc;
7652} 7650}
7653 7651