diff options
author | James Smart <James.Smart@Emulex.Com> | 2006-08-01 07:33:52 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-06 12:28:22 -0400 |
commit | 1c067a42413c4f39c907443b8f5979cd4d82f0ff (patch) | |
tree | e799752f33cd731b362e4fe4f039cc3a40c7590c /drivers/scsi | |
parent | a309a6b6e64b8147b7cfe7388237fb83834f58c9 (diff) |
[SCSI] lpfc 8.1.7 : Fix race condition between lpfc_sli_issue_mbox and lpfc_online
Fix race condition between lpfc_sli_issue_mbox and lpfc_online
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 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 4dc2d584319e..fbf108c9625c 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -1711,15 +1711,13 @@ lpfc_sli_brdreset(struct lpfc_hba * phba) | |||
1711 | phba->fc_myDID = 0; | 1711 | phba->fc_myDID = 0; |
1712 | phba->fc_prevDID = 0; | 1712 | phba->fc_prevDID = 0; |
1713 | 1713 | ||
1714 | psli->sli_flag = 0; | ||
1715 | |||
1716 | /* Turn off parity checking and serr during the physical reset */ | 1714 | /* Turn off parity checking and serr during the physical reset */ |
1717 | pci_read_config_word(phba->pcidev, PCI_COMMAND, &cfg_value); | 1715 | pci_read_config_word(phba->pcidev, PCI_COMMAND, &cfg_value); |
1718 | pci_write_config_word(phba->pcidev, PCI_COMMAND, | 1716 | pci_write_config_word(phba->pcidev, PCI_COMMAND, |
1719 | (cfg_value & | 1717 | (cfg_value & |
1720 | ~(PCI_COMMAND_PARITY | PCI_COMMAND_SERR))); | 1718 | ~(PCI_COMMAND_PARITY | PCI_COMMAND_SERR))); |
1721 | 1719 | ||
1722 | psli->sli_flag &= ~LPFC_SLI2_ACTIVE; | 1720 | psli->sli_flag &= ~(LPFC_SLI2_ACTIVE | LPFC_PROCESS_LA); |
1723 | /* Now toggle INITFF bit in the Host Control Register */ | 1721 | /* Now toggle INITFF bit in the Host Control Register */ |
1724 | writel(HC_INITFF, phba->HCregaddr); | 1722 | writel(HC_INITFF, phba->HCregaddr); |
1725 | mdelay(1); | 1723 | mdelay(1); |
@@ -1905,6 +1903,9 @@ lpfc_sli_hba_setup(struct lpfc_hba * phba) | |||
1905 | } | 1903 | } |
1906 | 1904 | ||
1907 | while (resetcount < 2 && !done) { | 1905 | while (resetcount < 2 && !done) { |
1906 | spin_lock_irq(phba->host->host_lock); | ||
1907 | phba->sli.sli_flag |= LPFC_SLI_MBOX_ACTIVE; | ||
1908 | spin_unlock_irq(phba->host->host_lock); | ||
1908 | phba->hba_state = LPFC_STATE_UNKNOWN; | 1909 | phba->hba_state = LPFC_STATE_UNKNOWN; |
1909 | lpfc_sli_brdrestart(phba); | 1910 | lpfc_sli_brdrestart(phba); |
1910 | msleep(2500); | 1911 | msleep(2500); |
@@ -1912,6 +1913,9 @@ lpfc_sli_hba_setup(struct lpfc_hba * phba) | |||
1912 | if (rc) | 1913 | if (rc) |
1913 | break; | 1914 | break; |
1914 | 1915 | ||
1916 | spin_lock_irq(phba->host->host_lock); | ||
1917 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
1918 | spin_unlock_irq(phba->host->host_lock); | ||
1915 | resetcount++; | 1919 | resetcount++; |
1916 | 1920 | ||
1917 | /* Call pre CONFIG_PORT mailbox command initialization. A value of 0 | 1921 | /* Call pre CONFIG_PORT mailbox command initialization. A value of 0 |