Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195288
b: refs/heads/master
c: 1f1332a
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed May 18, 2010
1 parent e36de2f commit 89dcca0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 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: 57c8a456640fa3ca777652f11f2db4179a3e66b6
refs/heads/master: 1f1332a3cb7ac73e3bcff6ea42ff965c90a29d12
6 changes: 3 additions & 3 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,12 +1143,12 @@ static int cnic_submit_bnx2_kwqes(struct cnic_dev *dev, struct kwqe *wqes[],

spin_lock_bh(&cp->cnic_ulp_lock);
if (num_wqes > cnic_kwq_avail(cp) &&
!(cp->cnic_local_flags & CNIC_LCL_FL_KWQ_INIT)) {
!test_bit(CNIC_LCL_FL_KWQ_INIT, &cp->cnic_local_flags)) {
spin_unlock_bh(&cp->cnic_ulp_lock);
return -EAGAIN;
}

cp->cnic_local_flags &= ~CNIC_LCL_FL_KWQ_INIT;
clear_bit(CNIC_LCL_FL_KWQ_INIT, &cp->cnic_local_flags);

prod = cp->kwq_prod_idx;
sw_prod = prod & MAX_KWQ_IDX;
Expand Down Expand Up @@ -3690,7 +3690,7 @@ static int cnic_start_bnx2_hw(struct cnic_dev *dev)
cp->max_kwq_idx = MAX_KWQ_IDX;
cp->kwq_prod_idx = 0;
cp->kwq_con_idx = 0;
cp->cnic_local_flags |= CNIC_LCL_FL_KWQ_INIT;
set_bit(CNIC_LCL_FL_KWQ_INIT, &cp->cnic_local_flags);

if (CHIP_NUM(cp) == CHIP_NUM_5706 || CHIP_NUM(cp) == CHIP_NUM_5708)
cp->kwq_con_idx_ptr = &sblk->status_rx_quick_consumer_index15;
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/cnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ struct cnic_local {
#define ULP_F_CALL_PENDING 2
struct cnic_ulp_ops *ulp_ops[MAX_CNIC_ULP_TYPE];

/* protected by ulp_lock */
u32 cnic_local_flags;
#define CNIC_LCL_FL_KWQ_INIT 0x00000001
unsigned long cnic_local_flags;
#define CNIC_LCL_FL_KWQ_INIT 0x0

struct cnic_dev *dev;

Expand Down

0 comments on commit 89dcca0

Please sign in to comment.