public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] namespace collision fix and update FW version check on cxgb4
@ 2014-01-07 11:28 Hariprasad Shenai
  2014-01-07 11:28 ` [PATCH net-next 1/2] cxgb4: Fix namespace collision issue Hariprasad Shenai
  2014-01-07 11:28 ` [PATCH net-next 2/2] cxgb4: Changed FW check version to match FW binary version Hariprasad Shenai
  0 siblings, 2 replies; 5+ messages in thread
From: Hariprasad Shenai @ 2014-01-07 11:28 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, nirranjan, kumaras, santosh, hariprasad

Hi

This patch series provides namespace collision fix for cxgb4 driver.
Also updated FW version check for cxgb4 driver.

Patch series is created against David Miller's net-next tree.

We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.

Thanks,
Hari

Hariprasad Shenai (2):
  cxgb4: Fix namespace collision issue.
  cxgb4: Changed FW check version to match FW binary version

 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h |  12 ++--
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 100 ++++++++++++++---------------
 2 files changed, 54 insertions(+), 58 deletions(-)

-- 
1.8.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next 1/2] cxgb4: Fix namespace collision issue.
  2014-01-07 11:28 [PATCH net-next 0/2] namespace collision fix and update FW version check on cxgb4 Hariprasad Shenai
@ 2014-01-07 11:28 ` Hariprasad Shenai
  2014-01-07 20:48   ` David Miller
  2014-01-07 11:28 ` [PATCH net-next 2/2] cxgb4: Changed FW check version to match FW binary version Hariprasad Shenai
  1 sibling, 1 reply; 5+ messages in thread
From: Hariprasad Shenai @ 2014-01-07 11:28 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, nirranjan, kumaras, santosh, hariprasad

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h |   4 --
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 100 ++++++++++++++---------------
 2 files changed, 50 insertions(+), 54 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index b97e35c..0d5b365 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -918,9 +918,6 @@ static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd,
 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
 		       unsigned int data_reg, const u32 *vals,
 		       unsigned int nregs, unsigned int start_idx);
-void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
-		      unsigned int data_reg, u32 *vals, unsigned int nregs,
-		      unsigned int start_idx);
 
 struct fw_filter_wr;
 
@@ -945,7 +942,6 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
 	       struct fw_hdr *card_fw, enum dev_state state, int *reset);
 int t4_prep_adapter(struct adapter *adapter);
 int t4_init_tp_params(struct adapter *adap);
-int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf);
 void t4_fatal_err(struct adapter *adapter);
 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index a396475..45bb037 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -111,7 +111,7 @@ void t4_set_reg_field(struct adapter *adapter, unsigned int addr, u32 mask,
  *	Reads registers that are accessed indirectly through an address/data
  *	register pair.
  */
-void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
+static void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
 			     unsigned int data_reg, u32 *vals,
 			     unsigned int nregs, unsigned int start_idx)
 {
@@ -3683,54 +3683,6 @@ int t4_prep_adapter(struct adapter *adapter)
 }
 
 /**
- *      t4_init_tp_params - initialize adap->params.tp
- *      @adap: the adapter
- *
- *      Initialize various fields of the adapter's TP Parameters structure.
- */
-int t4_init_tp_params(struct adapter *adap)
-{
-	int chan;
-	u32 v;
-
-	v = t4_read_reg(adap, TP_TIMER_RESOLUTION);
-	adap->params.tp.tre = TIMERRESOLUTION_GET(v);
-	adap->params.tp.dack_re = DELAYEDACKRESOLUTION_GET(v);
-
-	/* MODQ_REQ_MAP defaults to setting queues 0-3 to chan 0-3 */
-	for (chan = 0; chan < NCHAN; chan++)
-		adap->params.tp.tx_modq[chan] = chan;
-
-	/* Cache the adapter's Compressed Filter Mode and global Incress
-	 * Configuration.
-	 */
-	t4_read_indirect(adap, TP_PIO_ADDR, TP_PIO_DATA,
-			 &adap->params.tp.vlan_pri_map, 1,
-			 TP_VLAN_PRI_MAP);
-	t4_read_indirect(adap, TP_PIO_ADDR, TP_PIO_DATA,
-			 &adap->params.tp.ingress_config, 1,
-			 TP_INGRESS_CONFIG);
-
-	/* Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field
-	 * shift positions of several elements of the Compressed Filter Tuple
-	 * for this adapter which we need frequently ...
-	 */
-	adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN);
-	adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID);
-	adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT);
-	adap->params.tp.protocol_shift = t4_filter_field_shift(adap,
-							       F_PROTOCOL);
-
-	/* If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID
-	 * represents the presense of an Outer VLAN instead of a VNIC ID.
-	 */
-	if ((adap->params.tp.ingress_config & F_VNIC) == 0)
-		adap->params.tp.vnic_shift = -1;
-
-	return 0;
-}
-
-/**
  *      t4_filter_field_shift - calculate filter field shift
  *      @adap: the adapter
  *      @filter_sel: the desired field (from TP_VLAN_PRI_MAP bits)
@@ -3739,7 +3691,7 @@ int t4_init_tp_params(struct adapter *adap)
  *      Filter Tuple.  The filter field is specified via its selection bit
  *      within TP_VLAN_PRI_MAL (filter mode).  E.g. F_VLAN.
  */
-int t4_filter_field_shift(const struct adapter *adap, int filter_sel)
+static int t4_filter_field_shift(const struct adapter *adap, int filter_sel)
 {
 	unsigned int filter_mode = adap->params.tp.vlan_pri_map;
 	unsigned int sel;
@@ -3785,6 +3737,54 @@ int t4_filter_field_shift(const struct adapter *adap, int filter_sel)
 	return field_shift;
 }
 
+/**
+ *      t4_init_tp_params - initialize adap->params.tp
+ *      @adap: the adapter
+ *
+ *      Initialize various fields of the adapter's TP Parameters structure.
+ */
+int t4_init_tp_params(struct adapter *adap)
+{
+	int chan;
+	u32 v;
+
+	v = t4_read_reg(adap, TP_TIMER_RESOLUTION);
+	adap->params.tp.tre = TIMERRESOLUTION_GET(v);
+	adap->params.tp.dack_re = DELAYEDACKRESOLUTION_GET(v);
+
+	/* MODQ_REQ_MAP defaults to setting queues 0-3 to chan 0-3 */
+	for (chan = 0; chan < NCHAN; chan++)
+		adap->params.tp.tx_modq[chan] = chan;
+
+	/* Cache the adapter's Compressed Filter Mode and global Incress
+	 * Configuration.
+	 */
+	t4_read_indirect(adap, TP_PIO_ADDR, TP_PIO_DATA,
+			 &adap->params.tp.vlan_pri_map, 1,
+			 TP_VLAN_PRI_MAP);
+	t4_read_indirect(adap, TP_PIO_ADDR, TP_PIO_DATA,
+			 &adap->params.tp.ingress_config, 1,
+			 TP_INGRESS_CONFIG);
+
+	/* Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field
+	 * shift positions of several elements of the Compressed Filter Tuple
+	 * for this adapter which we need frequently ...
+	 */
+	adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN);
+	adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID);
+	adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT);
+	adap->params.tp.protocol_shift = t4_filter_field_shift(adap,
+							       F_PROTOCOL);
+
+	/* If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID
+	 * represents the presense of an Outer VLAN instead of a VNIC ID.
+	 */
+	if ((adap->params.tp.ingress_config & F_VNIC) == 0)
+		adap->params.tp.vnic_shift = -1;
+
+	return 0;
+}
+
 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf)
 {
 	u8 addr[6];
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net-next 2/2] cxgb4: Changed FW check version to match FW binary version
  2014-01-07 11:28 [PATCH net-next 0/2] namespace collision fix and update FW version check on cxgb4 Hariprasad Shenai
  2014-01-07 11:28 ` [PATCH net-next 1/2] cxgb4: Fix namespace collision issue Hariprasad Shenai
@ 2014-01-07 11:28 ` Hariprasad Shenai
  1 sibling, 0 replies; 5+ messages in thread
From: Hariprasad Shenai @ 2014-01-07 11:28 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, nirranjan, kumaras, santosh, hariprasad

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index 0d5b365..ddf7f8b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -50,13 +50,13 @@
 #include "cxgb4_uld.h"
 
 #define T4FW_VERSION_MAJOR 0x01
-#define T4FW_VERSION_MINOR 0x06
-#define T4FW_VERSION_MICRO 0x18
+#define T4FW_VERSION_MINOR 0x09
+#define T4FW_VERSION_MICRO 0x17
 #define T4FW_VERSION_BUILD 0x00
 
 #define T5FW_VERSION_MAJOR 0x01
-#define T5FW_VERSION_MINOR 0x08
-#define T5FW_VERSION_MICRO 0x1C
+#define T5FW_VERSION_MINOR 0x09
+#define T5FW_VERSION_MICRO 0x17
 #define T5FW_VERSION_BUILD 0x00
 
 #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__)
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/2] cxgb4: Fix namespace collision issue.
  2014-01-07 11:28 ` [PATCH net-next 1/2] cxgb4: Fix namespace collision issue Hariprasad Shenai
@ 2014-01-07 20:48   ` David Miller
  2014-01-08 11:19     ` Hariprasad S
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2014-01-07 20:48 UTC (permalink / raw)
  To: hariprasad; +Cc: netdev, dm, leedom, nirranjan, kumaras, santosh

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Tue,  7 Jan 2014 16:58:07 +0530

> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
  ...

> -int t4_init_tp_params(struct adapter *adap)

There is no reason that an already exported function must be moved
to solve a namespace issue.

If you want to move this function for another reason, fine, but do
it in a seperate change with a clear description of that reason in
your commit message.

I'm not applying this series.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/2] cxgb4: Fix namespace collision issue.
  2014-01-07 20:48   ` David Miller
@ 2014-01-08 11:19     ` Hariprasad S
  0 siblings, 0 replies; 5+ messages in thread
From: Hariprasad S @ 2014-01-08 11:19 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, dm, leedom, nirranjan, kumaras, santosh

On Tue, Jan 07, 2014 at 15:48:13 -0500, David Miller wrote:
> From: Hariprasad Shenai <hariprasad@chelsio.com>
> Date: Tue,  7 Jan 2014 16:58:07 +0530
> 
> > Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
>   ...
> 
> > -int t4_init_tp_params(struct adapter *adap)
> 
> There is no reason that an already exported function must be moved
> to solve a namespace issue.
> 
> If you want to move this function for another reason, fine, but do
> it in a seperate change with a clear description of that reason in
> your commit message.
> 
> I'm not applying this series.

I will drop this patch series. I will send an independent patch for FW version
check.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-08 11:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 11:28 [PATCH net-next 0/2] namespace collision fix and update FW version check on cxgb4 Hariprasad Shenai
2014-01-07 11:28 ` [PATCH net-next 1/2] cxgb4: Fix namespace collision issue Hariprasad Shenai
2014-01-07 20:48   ` David Miller
2014-01-08 11:19     ` Hariprasad S
2014-01-07 11:28 ` [PATCH net-next 2/2] cxgb4: Changed FW check version to match FW binary version Hariprasad Shenai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox