diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2012-03-13 20:38:15 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-03-28 04:50:34 -0400 |
commit | 1f67096ca5299ab67d06abeb4180c988960f9280 (patch) | |
tree | 24416b6486c9d7717f04a7e48838fbd55f5b8c11 /drivers/scsi | |
parent | acea241510b068b0a92a0e023915aeeaf1065866 (diff) |
[SCSI] bfa: Modify ISR to process pending completions
Made changes to the driver ISR to process any pending completions even if
the RME bit is not set in the interrupt status register.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bfa/bfa_core.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c index 4bd546bcc240..035c9d5caf01 100644 --- a/drivers/scsi/bfa/bfa_core.c +++ b/drivers/scsi/bfa/bfa_core.c | |||
@@ -231,16 +231,19 @@ bfa_reqq_resume(struct bfa_s *bfa, int qid) | |||
231 | } | 231 | } |
232 | } | 232 | } |
233 | 233 | ||
234 | static inline void | 234 | bfa_boolean_t |
235 | bfa_isr_rspq(struct bfa_s *bfa, int qid) | 235 | bfa_isr_rspq(struct bfa_s *bfa, int qid) |
236 | { | 236 | { |
237 | struct bfi_msg_s *m; | 237 | struct bfi_msg_s *m; |
238 | u32 pi, ci; | 238 | u32 pi, ci; |
239 | struct list_head *waitq; | 239 | struct list_head *waitq; |
240 | bfa_boolean_t ret; | ||
240 | 241 | ||
241 | ci = bfa_rspq_ci(bfa, qid); | 242 | ci = bfa_rspq_ci(bfa, qid); |
242 | pi = bfa_rspq_pi(bfa, qid); | 243 | pi = bfa_rspq_pi(bfa, qid); |
243 | 244 | ||
245 | ret = (ci != pi); | ||
246 | |||
244 | while (ci != pi) { | 247 | while (ci != pi) { |
245 | m = bfa_rspq_elem(bfa, qid, ci); | 248 | m = bfa_rspq_elem(bfa, qid, ci); |
246 | WARN_ON(m->mhdr.msg_class >= BFI_MC_MAX); | 249 | WARN_ON(m->mhdr.msg_class >= BFI_MC_MAX); |
@@ -260,6 +263,8 @@ bfa_isr_rspq(struct bfa_s *bfa, int qid) | |||
260 | waitq = bfa_reqq(bfa, qid); | 263 | waitq = bfa_reqq(bfa, qid); |
261 | if (!list_empty(waitq)) | 264 | if (!list_empty(waitq)) |
262 | bfa_reqq_resume(bfa, qid); | 265 | bfa_reqq_resume(bfa, qid); |
266 | |||
267 | return ret; | ||
263 | } | 268 | } |
264 | 269 | ||
265 | static inline void | 270 | static inline void |
@@ -320,6 +325,7 @@ bfa_intx(struct bfa_s *bfa) | |||
320 | { | 325 | { |
321 | u32 intr, qintr; | 326 | u32 intr, qintr; |
322 | int queue; | 327 | int queue; |
328 | bfa_boolean_t rspq_comp = BFA_FALSE; | ||
323 | 329 | ||
324 | intr = readl(bfa->iocfc.bfa_regs.intr_status); | 330 | intr = readl(bfa->iocfc.bfa_regs.intr_status); |
325 | 331 | ||
@@ -332,11 +338,12 @@ bfa_intx(struct bfa_s *bfa) | |||
332 | */ | 338 | */ |
333 | if (bfa->queue_process) { | 339 | if (bfa->queue_process) { |
334 | for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++) | 340 | for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++) |
335 | bfa_isr_rspq(bfa, queue); | 341 | if (bfa_isr_rspq(bfa, queue)) |
342 | rspq_comp = BFA_TRUE; | ||
336 | } | 343 | } |
337 | 344 | ||
338 | if (!intr) | 345 | if (!intr) |
339 | return BFA_TRUE; | 346 | return (qintr | rspq_comp) ? BFA_TRUE : BFA_FALSE; |
340 | 347 | ||
341 | /* | 348 | /* |
342 | * CPE completion queue interrupt | 349 | * CPE completion queue interrupt |