diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-03-05 22:34:44 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-07 02:23:53 -0500 |
commit | 8b651b4294e67789028982d18779a9ebe75c2b8a (patch) | |
tree | 043c7a9dfa3a864858ee3f3ed7d9e9a4ab729fbc /drivers/scsi/bfa/bfa_intr.c | |
parent | 0a20de446c76529028cb239bf2a13cb0f05b263a (diff) |
[SCSI] bfa: Clear LL_HALT and PSS_ERR bit when IOC crashes.
Clear LL_HALT and PSS_ERR bit in the interrupt status register on an IOC crash.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_intr.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_intr.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/bfa_intr.c b/drivers/scsi/bfa/bfa_intr.c index ab463db11144..c42254613f73 100644 --- a/drivers/scsi/bfa/bfa_intr.c +++ b/drivers/scsi/bfa/bfa_intr.c | |||
@@ -197,17 +197,44 @@ bfa_msix_rspq(struct bfa_s *bfa, int rsp_qid) | |||
197 | void | 197 | void |
198 | bfa_msix_lpu_err(struct bfa_s *bfa, int vec) | 198 | bfa_msix_lpu_err(struct bfa_s *bfa, int vec) |
199 | { | 199 | { |
200 | u32 intr; | 200 | u32 intr, curr_value; |
201 | 201 | ||
202 | intr = bfa_reg_read(bfa->iocfc.bfa_regs.intr_status); | 202 | intr = bfa_reg_read(bfa->iocfc.bfa_regs.intr_status); |
203 | 203 | ||
204 | if (intr & (__HFN_INT_MBOX_LPU0 | __HFN_INT_MBOX_LPU1)) | 204 | if (intr & (__HFN_INT_MBOX_LPU0 | __HFN_INT_MBOX_LPU1)) |
205 | bfa_msix_lpu(bfa); | 205 | bfa_msix_lpu(bfa); |
206 | 206 | ||
207 | if (intr & (__HFN_INT_ERR_EMC | | 207 | intr &= (__HFN_INT_ERR_EMC | __HFN_INT_ERR_LPU0 | |
208 | __HFN_INT_ERR_LPU0 | __HFN_INT_ERR_LPU1 | | 208 | __HFN_INT_ERR_LPU1 | __HFN_INT_ERR_PSS | __HFN_INT_LL_HALT); |
209 | __HFN_INT_ERR_PSS | __HFN_INT_LL_HALT)) | 209 | |
210 | if (intr) { | ||
211 | if (intr & __HFN_INT_LL_HALT) { | ||
212 | /** | ||
213 | * If LL_HALT bit is set then FW Init Halt LL Port | ||
214 | * Register needs to be cleared as well so Interrupt | ||
215 | * Status Register will be cleared. | ||
216 | */ | ||
217 | curr_value = bfa_reg_read(bfa->ioc.ioc_regs.ll_halt); | ||
218 | curr_value &= ~__FW_INIT_HALT_P; | ||
219 | bfa_reg_write(bfa->ioc.ioc_regs.ll_halt, curr_value); | ||
220 | } | ||
221 | |||
222 | if (intr & __HFN_INT_ERR_PSS) { | ||
223 | /** | ||
224 | * ERR_PSS bit needs to be cleared as well in case | ||
225 | * interrups are shared so driver's interrupt handler is | ||
226 | * still called eventhough it is already masked out. | ||
227 | */ | ||
228 | curr_value = bfa_reg_read( | ||
229 | bfa->ioc.ioc_regs.pss_err_status_reg); | ||
230 | curr_value &= __PSS_ERR_STATUS_SET; | ||
231 | bfa_reg_write(bfa->ioc.ioc_regs.pss_err_status_reg, | ||
232 | curr_value); | ||
233 | } | ||
234 | |||
235 | bfa_reg_write(bfa->iocfc.bfa_regs.intr_status, intr); | ||
210 | bfa_msix_errint(bfa, intr); | 236 | bfa_msix_errint(bfa, intr); |
237 | } | ||
211 | } | 238 | } |
212 | 239 | ||
213 | void | 240 | void |