Commit 1f67096c authored by Krishna Gudipati's avatar Krishna Gudipati Committed by James Bottomley

[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: default avatarKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent acea2415
...@@ -231,16 +231,19 @@ bfa_reqq_resume(struct bfa_s *bfa, int qid) ...@@ -231,16 +231,19 @@ bfa_reqq_resume(struct bfa_s *bfa, int qid)
} }
} }
static inline void bfa_boolean_t
bfa_isr_rspq(struct bfa_s *bfa, int qid) bfa_isr_rspq(struct bfa_s *bfa, int qid)
{ {
struct bfi_msg_s *m; struct bfi_msg_s *m;
u32 pi, ci; u32 pi, ci;
struct list_head *waitq; struct list_head *waitq;
bfa_boolean_t ret;
ci = bfa_rspq_ci(bfa, qid); ci = bfa_rspq_ci(bfa, qid);
pi = bfa_rspq_pi(bfa, qid); pi = bfa_rspq_pi(bfa, qid);
ret = (ci != pi);
while (ci != pi) { while (ci != pi) {
m = bfa_rspq_elem(bfa, qid, ci); m = bfa_rspq_elem(bfa, qid, ci);
WARN_ON(m->mhdr.msg_class >= BFI_MC_MAX); WARN_ON(m->mhdr.msg_class >= BFI_MC_MAX);
...@@ -260,6 +263,8 @@ bfa_isr_rspq(struct bfa_s *bfa, int qid) ...@@ -260,6 +263,8 @@ bfa_isr_rspq(struct bfa_s *bfa, int qid)
waitq = bfa_reqq(bfa, qid); waitq = bfa_reqq(bfa, qid);
if (!list_empty(waitq)) if (!list_empty(waitq))
bfa_reqq_resume(bfa, qid); bfa_reqq_resume(bfa, qid);
return ret;
} }
static inline void static inline void
...@@ -320,6 +325,7 @@ bfa_intx(struct bfa_s *bfa) ...@@ -320,6 +325,7 @@ bfa_intx(struct bfa_s *bfa)
{ {
u32 intr, qintr; u32 intr, qintr;
int queue; int queue;
bfa_boolean_t rspq_comp = BFA_FALSE;
intr = readl(bfa->iocfc.bfa_regs.intr_status); intr = readl(bfa->iocfc.bfa_regs.intr_status);
...@@ -332,11 +338,12 @@ bfa_intx(struct bfa_s *bfa) ...@@ -332,11 +338,12 @@ bfa_intx(struct bfa_s *bfa)
*/ */
if (bfa->queue_process) { if (bfa->queue_process) {
for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++) for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++)
bfa_isr_rspq(bfa, queue); if (bfa_isr_rspq(bfa, queue))
rspq_comp = BFA_TRUE;
} }
if (!intr) if (!intr)
return BFA_TRUE; return (qintr | rspq_comp) ? BFA_TRUE : BFA_FALSE;
/* /*
* CPE completion queue interrupt * CPE completion queue interrupt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment