mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
[SCSI] lpfc 8.1.12 : Don't process ERATT interrupts when issuing KILL_BOARD mbx command
Don't process ERATT interrupts when issuing KILL_BOARD mbx command Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
685f0bf7af
commit
ebdbe65f07
2 changed files with 13 additions and 0 deletions
|
@ -250,6 +250,7 @@ struct lpfc_hba {
|
||||||
#define FC_LOOPBACK_MODE 0x40000 /* NPort is in Loopback mode */
|
#define FC_LOOPBACK_MODE 0x40000 /* NPort is in Loopback mode */
|
||||||
/* This flag is set while issuing */
|
/* This flag is set while issuing */
|
||||||
/* INIT_LINK mailbox command */
|
/* INIT_LINK mailbox command */
|
||||||
|
#define FC_IGNORE_ERATT 0x80000 /* intr handler should ignore ERATT */
|
||||||
|
|
||||||
uint32_t fc_topology; /* link topology, from LINK INIT */
|
uint32_t fc_topology; /* link topology, from LINK INIT */
|
||||||
|
|
||||||
|
|
|
@ -1584,6 +1584,7 @@ void lpfc_reset_barrier(struct lpfc_hba * phba)
|
||||||
hc_copy = readl(phba->HCregaddr);
|
hc_copy = readl(phba->HCregaddr);
|
||||||
writel((hc_copy & ~HC_ERINT_ENA), phba->HCregaddr);
|
writel((hc_copy & ~HC_ERINT_ENA), phba->HCregaddr);
|
||||||
readl(phba->HCregaddr); /* flush */
|
readl(phba->HCregaddr); /* flush */
|
||||||
|
phba->fc_flag |= FC_IGNORE_ERATT;
|
||||||
|
|
||||||
if (readl(phba->HAregaddr) & HA_ERATT) {
|
if (readl(phba->HAregaddr) & HA_ERATT) {
|
||||||
/* Clear Chip error bit */
|
/* Clear Chip error bit */
|
||||||
|
@ -1626,6 +1627,7 @@ void lpfc_reset_barrier(struct lpfc_hba * phba)
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_hc:
|
restore_hc:
|
||||||
|
phba->fc_flag &= ~FC_IGNORE_ERATT;
|
||||||
writel(hc_copy, phba->HCregaddr);
|
writel(hc_copy, phba->HCregaddr);
|
||||||
readl(phba->HCregaddr); /* flush */
|
readl(phba->HCregaddr); /* flush */
|
||||||
}
|
}
|
||||||
|
@ -1661,6 +1663,7 @@ lpfc_sli_brdkill(struct lpfc_hba * phba)
|
||||||
status &= ~HC_ERINT_ENA;
|
status &= ~HC_ERINT_ENA;
|
||||||
writel(status, phba->HCregaddr);
|
writel(status, phba->HCregaddr);
|
||||||
readl(phba->HCregaddr); /* flush */
|
readl(phba->HCregaddr); /* flush */
|
||||||
|
phba->fc_flag |= FC_IGNORE_ERATT;
|
||||||
spin_unlock_irq(phba->host->host_lock);
|
spin_unlock_irq(phba->host->host_lock);
|
||||||
|
|
||||||
lpfc_kill_board(phba, pmb);
|
lpfc_kill_board(phba, pmb);
|
||||||
|
@ -1670,6 +1673,9 @@ lpfc_sli_brdkill(struct lpfc_hba * phba)
|
||||||
if (retval != MBX_SUCCESS) {
|
if (retval != MBX_SUCCESS) {
|
||||||
if (retval != MBX_BUSY)
|
if (retval != MBX_BUSY)
|
||||||
mempool_free(pmb, phba->mbox_mem_pool);
|
mempool_free(pmb, phba->mbox_mem_pool);
|
||||||
|
spin_lock_irq(phba->host->host_lock);
|
||||||
|
phba->fc_flag &= ~FC_IGNORE_ERATT;
|
||||||
|
spin_unlock_irq(phba->host->host_lock);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1696,6 +1702,7 @@ lpfc_sli_brdkill(struct lpfc_hba * phba)
|
||||||
}
|
}
|
||||||
spin_lock_irq(phba->host->host_lock);
|
spin_lock_irq(phba->host->host_lock);
|
||||||
psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
|
psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
|
||||||
|
phba->fc_flag &= ~FC_IGNORE_ERATT;
|
||||||
spin_unlock_irq(phba->host->host_lock);
|
spin_unlock_irq(phba->host->host_lock);
|
||||||
|
|
||||||
psli->mbox_active = NULL;
|
psli->mbox_active = NULL;
|
||||||
|
@ -3207,6 +3214,11 @@ lpfc_intr_handler(int irq, void *dev_id)
|
||||||
*/
|
*/
|
||||||
spin_lock(phba->host->host_lock);
|
spin_lock(phba->host->host_lock);
|
||||||
ha_copy = readl(phba->HAregaddr);
|
ha_copy = readl(phba->HAregaddr);
|
||||||
|
/* If somebody is waiting to handle an eratt don't process it
|
||||||
|
* here. The brdkill function will do this.
|
||||||
|
*/
|
||||||
|
if (phba->fc_flag & FC_IGNORE_ERATT)
|
||||||
|
ha_copy &= ~HA_ERATT;
|
||||||
writel((ha_copy & ~(HA_LATT | HA_ERATT)), phba->HAregaddr);
|
writel((ha_copy & ~(HA_LATT | HA_ERATT)), phba->HAregaddr);
|
||||||
readl(phba->HAregaddr); /* flush */
|
readl(phba->HAregaddr); /* flush */
|
||||||
spin_unlock(phba->host->host_lock);
|
spin_unlock(phba->host->host_lock);
|
||||||
|
|
Loading…
Reference in a new issue