diff options
author | Michael Chan <mchan@broadcom.com> | 2011-06-08 15:29:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-09 02:52:36 -0400 |
commit | 93736656138e6d2f39f19c1d68f9ef81cfc9dd66 (patch) | |
tree | c5ff0e79d7ed67bb8078c5b32e2db35b89125a9a /drivers | |
parent | 2b77bdde97ae8241dcc23110a4e837acfbc83438 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/cnic.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 11a92afdf982..5c0a669dfa5f 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) | |||
2778 | 2778 | ||
2779 | /* Tell compiler that status_blk fields can change. */ | 2779 | /* Tell compiler that status_blk fields can change. */ |
2780 | barrier(); | 2780 | barrier(); |
2781 | if (status_idx != *cp->kcq1.status_idx_ptr) { | 2781 | status_idx = (u16) *cp->kcq1.status_idx_ptr; |
2782 | status_idx = (u16) *cp->kcq1.status_idx_ptr; | 2782 | /* status block index must be read first */ |
2783 | /* status block index must be read first */ | 2783 | rmb(); |
2784 | rmb(); | 2784 | cp->kwq_con_idx = *cp->kwq_con_idx_ptr; |
2785 | cp->kwq_con_idx = *cp->kwq_con_idx_ptr; | ||
2786 | } else | ||
2787 | break; | ||
2788 | } | 2785 | } |
2789 | 2786 | ||
2790 | CNIC_WR16(dev, cp->kcq1.io_addr, cp->kcq1.sw_prod_idx); | 2787 | 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) | |||
2908 | 2905 | ||
2909 | /* Tell compiler that sblk fields can change. */ | 2906 | /* Tell compiler that sblk fields can change. */ |
2910 | barrier(); | 2907 | barrier(); |
2911 | if (last_status == *info->status_idx_ptr) | ||
2912 | break; | ||
2913 | 2908 | ||
2914 | last_status = *info->status_idx_ptr; | 2909 | last_status = *info->status_idx_ptr; |
2915 | /* status block index must be read before reading the KCQ */ | 2910 | /* status block index must be read before reading the KCQ */ |