Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298284
b: refs/heads/master
c: 1f67096
h: refs/heads/master
v: v3
  • Loading branch information
Krishna Gudipati authored and James Bottomley committed Mar 28, 2012
1 parent c6b4888 commit 18a8cfc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acea241510b068b0a92a0e023915aeeaf1065866
refs/heads/master: 1f67096ca5299ab67d06abeb4180c988960f9280
13 changes: 10 additions & 3 deletions trunk/drivers/scsi/bfa/bfa_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
struct bfi_msg_s *m;
u32 pi, ci;
struct list_head *waitq;
bfa_boolean_t ret;

ci = bfa_rspq_ci(bfa, qid);
pi = bfa_rspq_pi(bfa, qid);

ret = (ci != pi);

while (ci != pi) {
m = bfa_rspq_elem(bfa, qid, ci);
WARN_ON(m->mhdr.msg_class >= BFI_MC_MAX);
Expand All @@ -260,6 +263,8 @@ bfa_isr_rspq(struct bfa_s *bfa, int qid)
waitq = bfa_reqq(bfa, qid);
if (!list_empty(waitq))
bfa_reqq_resume(bfa, qid);

return ret;
}

static inline void
Expand Down Expand Up @@ -320,6 +325,7 @@ bfa_intx(struct bfa_s *bfa)
{
u32 intr, qintr;
int queue;
bfa_boolean_t rspq_comp = BFA_FALSE;

intr = readl(bfa->iocfc.bfa_regs.intr_status);

Expand All @@ -332,11 +338,12 @@ bfa_intx(struct bfa_s *bfa)
*/
if (bfa->queue_process) {
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)
return BFA_TRUE;
return (qintr | rspq_comp) ? BFA_TRUE : BFA_FALSE;

/*
* CPE completion queue interrupt
Expand Down

0 comments on commit 18a8cfc

Please sign in to comment.