diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-06-25 10:34:08 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-02 18:05:32 -0400 |
commit | db468d108abc0bb348bcfc54b8e06145922fb6b1 (patch) | |
tree | 20fc4fd71fe9e194bb36c5083e3ea1cb3fab81a5 /drivers/scsi | |
parent | 6e8215e48865bda2e07c1c0633952e35fa3b170c (diff) |
[SCSI] lpfc: Fixes in mbox_timeout_handler
Analysis:
Timeout of READ_SPARM64 causes call to lpfc_mbox_timeout_handler which
reads psli->mbox_active to determine the timeout mbox. Timeout
handler then NULL's psli->mbox_active and calls
lpfc_mbx_cmpl_read_sparam(), which on timeout condition, calls
link_down(). link_down() now calls disc_done() which calls
mbox_timeout_hander() again since WORKER_MBOX_TMO is still set, which
goes back to read psli->mbox_active which is already NULL'ed.
Remove redundant if statement in lpfc_mbox_timeout_handler. pmbox is
assigned psli->mbox_active so there is no need to check if it actually
equals psli->mbox_active.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 9493ec1b17e1..46e062dafd85 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -1724,6 +1724,8 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
1724 | return; | 1724 | return; |
1725 | } | 1725 | } |
1726 | 1726 | ||
1727 | phba->work_hba_events &= ~WORKER_MBOX_TMO; | ||
1728 | |||
1727 | pmbox = phba->sli.mbox_active; | 1729 | pmbox = phba->sli.mbox_active; |
1728 | mb = &pmbox->mb; | 1730 | mb = &pmbox->mb; |
1729 | 1731 | ||
@@ -1738,16 +1740,14 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
1738 | phba->sli.sli_flag, | 1740 | phba->sli.sli_flag, |
1739 | phba->sli.mbox_active); | 1741 | phba->sli.mbox_active); |
1740 | 1742 | ||
1741 | if (phba->sli.mbox_active == pmbox) { | 1743 | phba->sli.mbox_active = NULL; |
1742 | phba->sli.mbox_active = NULL; | 1744 | if (pmbox->mbox_cmpl) { |
1743 | if (pmbox->mbox_cmpl) { | 1745 | mb->mbxStatus = MBX_NOT_FINISHED; |
1744 | mb->mbxStatus = MBX_NOT_FINISHED; | 1746 | spin_unlock_irq(phba->host->host_lock); |
1745 | spin_unlock_irq(phba->host->host_lock); | 1747 | (pmbox->mbox_cmpl) (phba, pmbox); |
1746 | (pmbox->mbox_cmpl) (phba, pmbox); | 1748 | spin_lock_irq(phba->host->host_lock); |
1747 | spin_lock_irq(phba->host->host_lock); | ||
1748 | } | ||
1749 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
1750 | } | 1749 | } |
1750 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
1751 | 1751 | ||
1752 | spin_unlock_irq(phba->host->host_lock); | 1752 | spin_unlock_irq(phba->host->host_lock); |
1753 | lpfc_mbox_abort(phba); | 1753 | lpfc_mbox_abort(phba); |