diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-11-18 15:40:49 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:01:52 -0500 |
commit | 1c6f4ef5d6be7ef4cbe92a86286217971f52e2cd (patch) | |
tree | 6415ea806d637bae7e3894f509f08a3196147337 /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | 891478a2442d8d0077651bc8316afaec8d85dd4d (diff) |
[SCSI] lpfc 8.3.6 : Fix critical errors
Fix errors relating to crashes and hangs.
- Fix crash due to list corruption while unloading driver.
- Fix panic during pci-hot-plug testing.
- Fix panic when unmapping luns.
- Fixed total_scsi_bufs counting could cause exhausted memory.
- Fixed locking issue causing hang.
- Fixed the call from lpfc_new_scsi_buf_s3 to use lpfc_release_scsi_buf_s3.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rwxr-xr-x | drivers/scsi/lpfc/lpfc_hbadisc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 4d7d8846b4da..3b9424427652 100755 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1018,13 +1018,12 @@ lpfc_mbx_cmpl_reg_fcfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) | |||
1018 | mempool_free(mboxq, phba->mbox_mem_pool); | 1018 | mempool_free(mboxq, phba->mbox_mem_pool); |
1019 | return; | 1019 | return; |
1020 | } | 1020 | } |
1021 | spin_lock_irqsave(&phba->hbalock, flags); | ||
1021 | phba->fcf.fcf_flag |= (FCF_DISCOVERED | FCF_IN_USE); | 1022 | phba->fcf.fcf_flag |= (FCF_DISCOVERED | FCF_IN_USE); |
1022 | phba->hba_flag &= ~FCF_DISC_INPROGRESS; | 1023 | phba->hba_flag &= ~FCF_DISC_INPROGRESS; |
1023 | if (vport->port_state != LPFC_FLOGI) { | 1024 | spin_unlock_irqrestore(&phba->hbalock, flags); |
1024 | spin_lock_irqsave(&phba->hbalock, flags); | 1025 | if (vport->port_state != LPFC_FLOGI) |
1025 | spin_unlock_irqrestore(&phba->hbalock, flags); | ||
1026 | lpfc_initial_flogi(vport); | 1026 | lpfc_initial_flogi(vport); |
1027 | } | ||
1028 | 1027 | ||
1029 | mempool_free(mboxq, phba->mbox_mem_pool); | 1028 | mempool_free(mboxq, phba->mbox_mem_pool); |
1030 | return; | 1029 | return; |
@@ -1460,12 +1459,15 @@ lpfc_check_pending_fcoe_event(struct lpfc_hba *phba, uint8_t unreg_fcf) | |||
1460 | 1459 | ||
1461 | if (phba->link_state >= LPFC_LINK_UP) | 1460 | if (phba->link_state >= LPFC_LINK_UP) |
1462 | lpfc_sli4_read_fcf_record(phba, LPFC_FCOE_FCF_GET_FIRST); | 1461 | lpfc_sli4_read_fcf_record(phba, LPFC_FCOE_FCF_GET_FIRST); |
1463 | else | 1462 | else { |
1464 | /* | 1463 | /* |
1465 | * Do not continue FCF discovery and clear FCF_DISC_INPROGRESS | 1464 | * Do not continue FCF discovery and clear FCF_DISC_INPROGRESS |
1466 | * flag | 1465 | * flag |
1467 | */ | 1466 | */ |
1467 | spin_lock_irq(&phba->hbalock); | ||
1468 | phba->hba_flag &= ~FCF_DISC_INPROGRESS; | 1468 | phba->hba_flag &= ~FCF_DISC_INPROGRESS; |
1469 | spin_unlock_irq(&phba->hbalock); | ||
1470 | } | ||
1469 | 1471 | ||
1470 | if (unreg_fcf) { | 1472 | if (unreg_fcf) { |
1471 | spin_lock_irq(&phba->hbalock); | 1473 | spin_lock_irq(&phba->hbalock); |
@@ -2264,7 +2266,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
2264 | * This shost reference might have been taken at the beginning of | 2266 | * This shost reference might have been taken at the beginning of |
2265 | * lpfc_vport_delete() | 2267 | * lpfc_vport_delete() |
2266 | */ | 2268 | */ |
2267 | if (vport->load_flag & FC_UNLOADING) | 2269 | if ((vport->load_flag & FC_UNLOADING) && (vport != phba->pport)) |
2268 | scsi_host_put(shost); | 2270 | scsi_host_put(shost); |
2269 | } | 2271 | } |
2270 | 2272 | ||