Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122077
b: refs/heads/master
c: cb3c766
h: refs/heads/master
i:
  122075: 84e9a99
v: v3
  • Loading branch information
Scott Feldman authored and David S. Miller committed Nov 22, 2008
1 parent 9038427 commit 40d6b31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: 27372bf5fa5ffc0fee3ddb486a0da942295fd8e0
refs/heads/master: cb3c766975985885e64e20cc72c4a36d90da2b30
5 changes: 3 additions & 2 deletions trunk/drivers/net/enic/cq_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ struct cq_desc {
u8 type_color;
};

#define CQ_DESC_TYPE_BITS 7
#define CQ_DESC_TYPE_BITS 4
#define CQ_DESC_TYPE_MASK ((1 << CQ_DESC_TYPE_BITS) - 1)
#define CQ_DESC_COLOR_MASK 1
#define CQ_DESC_COLOR_SHIFT 7
#define CQ_DESC_Q_NUM_BITS 10
#define CQ_DESC_Q_NUM_MASK ((1 << CQ_DESC_Q_NUM_BITS) - 1)
#define CQ_DESC_COMP_NDX_BITS 12
Expand All @@ -58,7 +59,7 @@ static inline void cq_desc_dec(const struct cq_desc *desc_arg,
const struct cq_desc *desc = desc_arg;
const u8 type_color = desc->type_color;

*color = (type_color >> CQ_DESC_TYPE_BITS) & CQ_DESC_COLOR_MASK;
*color = (type_color >> CQ_DESC_COLOR_SHIFT) & CQ_DESC_COLOR_MASK;

/*
* Make sure color bit is read from desc *before* other fields
Expand Down

0 comments on commit 40d6b31

Please sign in to comment.