diff options
author | Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> | 2012-04-25 01:47:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-26 05:03:31 -0400 |
commit | 652bf64622f32c938dd4a8738ba12d51dc9fbdd4 (patch) | |
tree | 20de774b4a367e09e487d81759e07d8787849a79 /drivers/net/ethernet/emulex/benet/be.h | |
parent | d51ebd331166e102591e5c25805d8015df0e1e21 (diff) | |
download | lwn-652bf64622f32c938dd4a8738ba12d51dc9fbdd4.tar.gz lwn-652bf64622f32c938dd4a8738ba12d51dc9fbdd4.zip |
be2net: Fix wrong status getting returned for MCC commands
MCC Response CQEs are processed as part of NAPI poll routine and
also synchronously. If MCC completions are consumed by NAPI poll
routine, wrong status is returned to synchronously waiting routine.
Fix this by getting status of MCC command from command response
instead of response CQEs.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index ad69cf89491c..4bc18efb7053 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -162,6 +162,11 @@ static inline void queue_head_inc(struct be_queue_info *q) index_inc(&q->head, q->len); } +static inline void index_dec(u16 *index, u16 limit) +{ + *index = MODULO((*index - 1), limit); +} + static inline void queue_tail_inc(struct be_queue_info *q) { index_inc(&q->tail, q->len); |