diff options
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/cq_desc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/enic/cq_desc.h b/drivers/net/enic/cq_desc.h index c036a8bfd043..1eb289f773bf 100644 --- a/drivers/net/enic/cq_desc.h +++ b/drivers/net/enic/cq_desc.h | |||
@@ -44,9 +44,10 @@ struct cq_desc { | |||
44 | u8 type_color; | 44 | u8 type_color; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | #define CQ_DESC_TYPE_BITS 7 | 47 | #define CQ_DESC_TYPE_BITS 4 |
48 | #define CQ_DESC_TYPE_MASK ((1 << CQ_DESC_TYPE_BITS) - 1) | 48 | #define CQ_DESC_TYPE_MASK ((1 << CQ_DESC_TYPE_BITS) - 1) |
49 | #define CQ_DESC_COLOR_MASK 1 | 49 | #define CQ_DESC_COLOR_MASK 1 |
50 | #define CQ_DESC_COLOR_SHIFT 7 | ||
50 | #define CQ_DESC_Q_NUM_BITS 10 | 51 | #define CQ_DESC_Q_NUM_BITS 10 |
51 | #define CQ_DESC_Q_NUM_MASK ((1 << CQ_DESC_Q_NUM_BITS) - 1) | 52 | #define CQ_DESC_Q_NUM_MASK ((1 << CQ_DESC_Q_NUM_BITS) - 1) |
52 | #define CQ_DESC_COMP_NDX_BITS 12 | 53 | #define CQ_DESC_COMP_NDX_BITS 12 |
@@ -58,7 +59,7 @@ static inline void cq_desc_dec(const struct cq_desc *desc_arg, | |||
58 | const struct cq_desc *desc = desc_arg; | 59 | const struct cq_desc *desc = desc_arg; |
59 | const u8 type_color = desc->type_color; | 60 | const u8 type_color = desc->type_color; |
60 | 61 | ||
61 | *color = (type_color >> CQ_DESC_TYPE_BITS) & CQ_DESC_COLOR_MASK; | 62 | *color = (type_color >> CQ_DESC_COLOR_SHIFT) & CQ_DESC_COLOR_MASK; |
62 | 63 | ||
63 | /* | 64 | /* |
64 | * Make sure color bit is read from desc *before* other fields | 65 | * Make sure color bit is read from desc *before* other fields |