summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2011-06-08 19:29:32 +0000
committerDavid S. Miller <davem@davemloft.net>2011-06-08 23:52:36 -0700
commit93736656138e6d2f39f19c1d68f9ef81cfc9dd66 (patch)
treec5ff0e79d7ed67bb8078c5b32e2db35b89125a9a
parent2b77bdde97ae8241dcc23110a4e837acfbc83438 (diff)
downloadlinux-3.10-93736656138e6d2f39f19c1d68f9ef81cfc9dd66.tar.gz
linux-3.10-93736656138e6d2f39f19c1d68f9ef81cfc9dd66.tar.bz2
linux-3.10-93736656138e6d2f39f19c1d68f9ef81cfc9dd66.zip
cnic: Fix interrupt logic
We need to keep looping until cnic_get_kcqes() returns 0. cnic_get_kcqes() returns a maximum of 64 entries. If there are more entries in the queue and we don't loop back, the remaining entries may not be serviced for a long time. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/cnic.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 11a92afdf98..5c0a669dfa5 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -2778,13 +2778,10 @@ static u32 cnic_service_bnx2_queues(struct cnic_dev *dev)
/* Tell compiler that status_blk fields can change. */
barrier();
- if (status_idx != *cp->kcq1.status_idx_ptr) {
- status_idx = (u16) *cp->kcq1.status_idx_ptr;
- /* status block index must be read first */
- rmb();
- cp->kwq_con_idx = *cp->kwq_con_idx_ptr;
- } else
- break;
+ status_idx = (u16) *cp->kcq1.status_idx_ptr;
+ /* status block index must be read first */
+ rmb();
+ cp->kwq_con_idx = *cp->kwq_con_idx_ptr;
}
CNIC_WR16(dev, cp->kcq1.io_addr, cp->kcq1.sw_prod_idx);
@@ -2908,8 +2905,6 @@ static u32 cnic_service_bnx2x_kcq(struct cnic_dev *dev, struct kcq_info *info)
/* Tell compiler that sblk fields can change. */
barrier();
- if (last_status == *info->status_idx_ptr)
- break;
last_status = *info->status_idx_ptr;
/* status block index must be read before reading the KCQ */