diff options
author | James Smart <James.Smart@Emulex.Com> | 2008-01-11 01:52:36 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 12:29:21 -0500 |
commit | 0ff10d46cf0a373c9c855a23cc9383ba4030d8d2 (patch) | |
tree | 111eb8303ad63cecad266d507af4c2c0bfec4d5b /drivers/scsi/lpfc/lpfc_init.c | |
parent | b18268fc631034882f5f3dd93daa248a3bfdd085 (diff) |
[SCSI] lpfc 8.2.4 : Miscellaneous Discovery/ELS Fixes
Miscellaneous Discovery/ELS Fixes:
- Delay free's of ELS requests if adapter reject conditions
- Fix concurrent PLOGI vs ADISC state handling
- Add retry mechanism for GFF_ID
- Correct some illegal state transitions around RSCN timeouts
- Fix missing return in FAN handling
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0143baf4ba3b..f32cd9acd3f6 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -547,8 +547,10 @@ void | |||
547 | lpfc_hb_timeout_handler(struct lpfc_hba *phba) | 547 | lpfc_hb_timeout_handler(struct lpfc_hba *phba) |
548 | { | 548 | { |
549 | LPFC_MBOXQ_t *pmboxq; | 549 | LPFC_MBOXQ_t *pmboxq; |
550 | struct lpfc_dmabuf *buf_ptr; | ||
550 | int retval; | 551 | int retval; |
551 | struct lpfc_sli *psli = &phba->sli; | 552 | struct lpfc_sli *psli = &phba->sli; |
553 | LIST_HEAD(completions); | ||
552 | 554 | ||
553 | if ((phba->link_state == LPFC_HBA_ERROR) || | 555 | if ((phba->link_state == LPFC_HBA_ERROR) || |
554 | (phba->pport->load_flag & FC_UNLOADING) || | 556 | (phba->pport->load_flag & FC_UNLOADING) || |
@@ -575,6 +577,24 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
575 | } | 577 | } |
576 | spin_unlock_irq(&phba->pport->work_port_lock); | 578 | spin_unlock_irq(&phba->pport->work_port_lock); |
577 | 579 | ||
580 | if (phba->elsbuf_cnt && | ||
581 | (phba->elsbuf_cnt == phba->elsbuf_prev_cnt)) { | ||
582 | spin_lock_irq(&phba->hbalock); | ||
583 | list_splice_init(&phba->elsbuf, &completions); | ||
584 | phba->elsbuf_cnt = 0; | ||
585 | phba->elsbuf_prev_cnt = 0; | ||
586 | spin_unlock_irq(&phba->hbalock); | ||
587 | |||
588 | while (!list_empty(&completions)) { | ||
589 | list_remove_head(&completions, buf_ptr, | ||
590 | struct lpfc_dmabuf, list); | ||
591 | lpfc_mbuf_free(phba, buf_ptr->virt, buf_ptr->phys); | ||
592 | kfree(buf_ptr); | ||
593 | } | ||
594 | } | ||
595 | phba->elsbuf_prev_cnt = phba->elsbuf_cnt; | ||
596 | |||
597 | |||
578 | /* If there is no heart beat outstanding, issue a heartbeat command */ | 598 | /* If there is no heart beat outstanding, issue a heartbeat command */ |
579 | if (!phba->hb_outstanding) { | 599 | if (!phba->hb_outstanding) { |
580 | pmboxq = mempool_alloc(phba->mbox_mem_pool,GFP_KERNEL); | 600 | pmboxq = mempool_alloc(phba->mbox_mem_pool,GFP_KERNEL); |
@@ -1999,6 +2019,9 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) | |||
1999 | /* Initialize list of fabric iocbs */ | 2019 | /* Initialize list of fabric iocbs */ |
2000 | INIT_LIST_HEAD(&phba->fabric_iocb_list); | 2020 | INIT_LIST_HEAD(&phba->fabric_iocb_list); |
2001 | 2021 | ||
2022 | /* Initialize list to save ELS buffers */ | ||
2023 | INIT_LIST_HEAD(&phba->elsbuf); | ||
2024 | |||
2002 | vport = lpfc_create_port(phba, phba->brd_no, &phba->pcidev->dev); | 2025 | vport = lpfc_create_port(phba, phba->brd_no, &phba->pcidev->dev); |
2003 | if (!vport) | 2026 | if (!vport) |
2004 | goto out_kthread_stop; | 2027 | goto out_kthread_stop; |