Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55206
b: refs/heads/master
c: ebdbe65
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed May 6, 2007
1 parent 0810890 commit 378fea7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 685f0bf7afe087940d34f98ac0fd1df84091d360
refs/heads/master: ebdbe65f07bb26baf69fcb0ee332702064888018
1 change: 1 addition & 0 deletions trunk/drivers/scsi/lpfc/lpfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ struct lpfc_hba {
#define FC_LOOPBACK_MODE 0x40000 /* NPort is in Loopback mode */
/* This flag is set while issuing */
/* INIT_LINK mailbox command */
#define FC_IGNORE_ERATT 0x80000 /* intr handler should ignore ERATT */

uint32_t fc_topology; /* link topology, from LINK INIT */

Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,7 @@ void lpfc_reset_barrier(struct lpfc_hba * phba)
hc_copy = readl(phba->HCregaddr);
writel((hc_copy & ~HC_ERINT_ENA), phba->HCregaddr);
readl(phba->HCregaddr); /* flush */
phba->fc_flag |= FC_IGNORE_ERATT;

if (readl(phba->HAregaddr) & HA_ERATT) {
/* Clear Chip error bit */
Expand Down Expand Up @@ -1626,6 +1627,7 @@ void lpfc_reset_barrier(struct lpfc_hba * phba)
}

restore_hc:
phba->fc_flag &= ~FC_IGNORE_ERATT;
writel(hc_copy, phba->HCregaddr);
readl(phba->HCregaddr); /* flush */
}
Expand Down Expand Up @@ -1661,6 +1663,7 @@ lpfc_sli_brdkill(struct lpfc_hba * phba)
status &= ~HC_ERINT_ENA;
writel(status, phba->HCregaddr);
readl(phba->HCregaddr); /* flush */
phba->fc_flag |= FC_IGNORE_ERATT;
spin_unlock_irq(phba->host->host_lock);

lpfc_kill_board(phba, pmb);
Expand All @@ -1670,6 +1673,9 @@ lpfc_sli_brdkill(struct lpfc_hba * phba)
if (retval != MBX_SUCCESS) {
if (retval != MBX_BUSY)
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;
}

Expand All @@ -1696,6 +1702,7 @@ lpfc_sli_brdkill(struct lpfc_hba * phba)
}
spin_lock_irq(phba->host->host_lock);
psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
phba->fc_flag &= ~FC_IGNORE_ERATT;
spin_unlock_irq(phba->host->host_lock);

psli->mbox_active = NULL;
Expand Down Expand Up @@ -3207,6 +3214,11 @@ lpfc_intr_handler(int irq, void *dev_id)
*/
spin_lock(phba->host->host_lock);
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);
readl(phba->HAregaddr); /* flush */
spin_unlock(phba->host->host_lock);
Expand Down

0 comments on commit 378fea7

Please sign in to comment.