Commit 93736656 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

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: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b77bdde
...@@ -2778,13 +2778,10 @@ static u32 cnic_service_bnx2_queues(struct cnic_dev *dev) ...@@ -2778,13 +2778,10 @@ static u32 cnic_service_bnx2_queues(struct cnic_dev *dev)
/* Tell compiler that status_blk fields can change. */ /* Tell compiler that status_blk fields can change. */
barrier(); barrier();
if (status_idx != *cp->kcq1.status_idx_ptr) { status_idx = (u16) *cp->kcq1.status_idx_ptr;
status_idx = (u16) *cp->kcq1.status_idx_ptr; /* status block index must be read first */
/* status block index must be read first */ rmb();
rmb(); cp->kwq_con_idx = *cp->kwq_con_idx_ptr;
cp->kwq_con_idx = *cp->kwq_con_idx_ptr;
} else
break;
} }
CNIC_WR16(dev, cp->kcq1.io_addr, cp->kcq1.sw_prod_idx); 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,8 +2905,6 @@ static u32 cnic_service_bnx2x_kcq(struct cnic_dev *dev, struct kcq_info *info)
/* Tell compiler that sblk fields can change. */ /* Tell compiler that sblk fields can change. */
barrier(); barrier();
if (last_status == *info->status_idx_ptr)
break;
last_status = *info->status_idx_ptr; last_status = *info->status_idx_ptr;
/* status block index must be read before reading the KCQ */ /* status block index must be read before reading the KCQ */
......
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