Patchwork [3/5] enic: mask off some reserved bits in CQ descriptor for future use

login
register
mail settings
Submitter Scott Feldman
Date Nov. 22, 2008, 12:34 a.m.
Message ID <20081122003408.15540.33764.stgit@palito_client100.nuovasystems.com>
Download mbox | patch
Permalink /patch/10171/
State Accepted
Delegated to: David Miller
Headers show

Comments

Scott Feldman - Nov. 22, 2008, 12:34 a.m.
enic: mask off some reserved bits in CQ descriptor for future use



Signed-off-by: Scott Feldman <scofeldm@cisco.com>
---
 drivers/net/enic/cq_desc.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 22, 2008, 5:28 a.m.
From: Scott Feldman <scofeldm@cisco.com>
Date: Fri, 21 Nov 2008 16:34:08 -0800

> enic: mask off some reserved bits in CQ descriptor for future use
> 
> 
> Signed-off-by: Scott Feldman <scofeldm@cisco.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/enic/cq_desc.h b/drivers/net/enic/cq_desc.h
index c036a8b..1eb289f 100644
--- a/drivers/net/enic/cq_desc.h
+++ b/drivers/net/enic/cq_desc.h
@@ -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
@@ -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