All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch net-next 0/2] mlxsw: cosmetics
@ 2017-03-06 20:25 Jiri Pirko
  2017-03-06 20:25 ` [patch net-next 1/2] mlxsw: spectrum: Fix helper function and port variable names Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-06 20:25 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, mlxsw, ivecera

From: Jiri Pirko <jiri@mellanox.com>

Couple of cosmetic mlxsw patches

Ido Schimmel (1):
  mlxsw: pci: Remove unused bit

Jiri Pirko (1):
  mlxsw: spectrum: Fix helper function and port variable names

 drivers/net/ethernet/mellanox/mlxsw/cmd.h      | 12 ------------
 drivers/net/ethernet/mellanox/mlxsw/pci.c      |  2 --
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 23 ++++++++++++-----------
 3 files changed, 12 insertions(+), 25 deletions(-)

-- 
2.7.4

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

* [patch net-next 1/2] mlxsw: spectrum: Fix helper function and port variable names
  2017-03-06 20:25 [patch net-next 0/2] mlxsw: cosmetics Jiri Pirko
@ 2017-03-06 20:25 ` Jiri Pirko
  2017-03-06 20:25 ` [patch net-next 2/2] mlxsw: pci: Remove unused bit Jiri Pirko
  2017-03-09  7:17 ` [patch net-next 0/2] mlxsw: cosmetics David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-06 20:25 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, mlxsw, ivecera

From: Jiri Pirko <jiri@mellanox.com>

Commit dd82364c3ab9 ("mlxsw: Flip to the new dev walk API") did some
small changes in mlxsw code, but it did not respect the naming
conventions. So fix this now.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 16484f2..ae18067 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3326,13 +3326,13 @@ bool mlxsw_sp_port_dev_check(const struct net_device *dev)
 	return dev->netdev_ops == &mlxsw_sp_port_netdev_ops;
 }
 
-static int mlxsw_lower_dev_walk(struct net_device *lower_dev, void *data)
+static int mlxsw_sp_lower_dev_walk(struct net_device *lower_dev, void *data)
 {
-	struct mlxsw_sp_port **port = data;
+	struct mlxsw_sp_port **p_mlxsw_sp_port = data;
 	int ret = 0;
 
 	if (mlxsw_sp_port_dev_check(lower_dev)) {
-		*port = netdev_priv(lower_dev);
+		*p_mlxsw_sp_port = netdev_priv(lower_dev);
 		ret = 1;
 	}
 
@@ -3341,15 +3341,15 @@ static int mlxsw_lower_dev_walk(struct net_device *lower_dev, void *data)
 
 static struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find(struct net_device *dev)
 {
-	struct mlxsw_sp_port *port;
+	struct mlxsw_sp_port *mlxsw_sp_port;
 
 	if (mlxsw_sp_port_dev_check(dev))
 		return netdev_priv(dev);
 
-	port = NULL;
-	netdev_walk_all_lower_dev(dev, mlxsw_lower_dev_walk, &port);
+	mlxsw_sp_port = NULL;
+	netdev_walk_all_lower_dev(dev, mlxsw_sp_lower_dev_walk, &mlxsw_sp_port);
 
-	return port;
+	return mlxsw_sp_port;
 }
 
 static struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev)
@@ -3362,15 +3362,16 @@ static struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev)
 
 static struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev)
 {
-	struct mlxsw_sp_port *port;
+	struct mlxsw_sp_port *mlxsw_sp_port;
 
 	if (mlxsw_sp_port_dev_check(dev))
 		return netdev_priv(dev);
 
-	port = NULL;
-	netdev_walk_all_lower_dev_rcu(dev, mlxsw_lower_dev_walk, &port);
+	mlxsw_sp_port = NULL;
+	netdev_walk_all_lower_dev_rcu(dev, mlxsw_sp_lower_dev_walk,
+				      &mlxsw_sp_port);
 
-	return port;
+	return mlxsw_sp_port;
 }
 
 struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev)
-- 
2.7.4

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

* [patch net-next 2/2] mlxsw: pci: Remove unused bit
  2017-03-06 20:25 [patch net-next 0/2] mlxsw: cosmetics Jiri Pirko
  2017-03-06 20:25 ` [patch net-next 1/2] mlxsw: spectrum: Fix helper function and port variable names Jiri Pirko
@ 2017-03-06 20:25 ` Jiri Pirko
  2017-03-09  7:17 ` [patch net-next 0/2] mlxsw: cosmetics David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-06 20:25 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, mlxsw, ivecera

From: Ido Schimmel <idosch@mellanox.com>

The overrun ignore bit isn't supported by the device's firmware and was
recently removed from the programmer's reference manual (PRM).

Remove it from the driver as well.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 ------------
 drivers/net/ethernet/mellanox/mlxsw/pci.c |  2 --
 2 files changed, 14 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/cmd.h b/drivers/net/ethernet/mellanox/mlxsw/cmd.h
index a1b4842..479511c 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/cmd.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/cmd.h
@@ -1043,13 +1043,6 @@ MLXSW_ITEM32(cmd_mbox, sw2hw_cq, cv, 0x00, 28, 4);
  */
 MLXSW_ITEM32(cmd_mbox, sw2hw_cq, c_eqn, 0x00, 24, 1);
 
-/* cmd_mbox_sw2hw_cq_oi
- * When set, overrun ignore is enabled. When set, updates of
- * CQ consumer counter (poll for completion) or Request completion
- * notifications (Arm CQ) DoorBells should not be rung on that CQ.
- */
-MLXSW_ITEM32(cmd_mbox, sw2hw_cq, oi, 0x00, 12, 1);
-
 /* cmd_mbox_sw2hw_cq_st
  * Event delivery state machine
  * 0x0 - FIRED
@@ -1132,11 +1125,6 @@ static inline int mlxsw_cmd_sw2hw_eq(struct mlxsw_core *mlxsw_core,
  */
 MLXSW_ITEM32(cmd_mbox, sw2hw_eq, int_msix, 0x00, 24, 1);
 
-/* cmd_mbox_sw2hw_eq_oi
- * When set, overrun ignore is enabled.
- */
-MLXSW_ITEM32(cmd_mbox, sw2hw_eq, oi, 0x00, 12, 1);
-
 /* cmd_mbox_sw2hw_eq_st
  * Event delivery state machine
  * 0x0 - FIRED
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
index a223c85..ffeb746 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
@@ -580,7 +580,6 @@ static int mlxsw_pci_cq_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
 
 	mlxsw_cmd_mbox_sw2hw_cq_cv_set(mbox, 0); /* CQE ver 0 */
 	mlxsw_cmd_mbox_sw2hw_cq_c_eqn_set(mbox, MLXSW_PCI_EQ_COMP_NUM);
-	mlxsw_cmd_mbox_sw2hw_cq_oi_set(mbox, 0);
 	mlxsw_cmd_mbox_sw2hw_cq_st_set(mbox, 0);
 	mlxsw_cmd_mbox_sw2hw_cq_log_cq_size_set(mbox, ilog2(q->count));
 	for (i = 0; i < MLXSW_PCI_AQ_PAGES; i++) {
@@ -755,7 +754,6 @@ static int mlxsw_pci_eq_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
 	}
 
 	mlxsw_cmd_mbox_sw2hw_eq_int_msix_set(mbox, 1); /* MSI-X used */
-	mlxsw_cmd_mbox_sw2hw_eq_oi_set(mbox, 0);
 	mlxsw_cmd_mbox_sw2hw_eq_st_set(mbox, 1); /* armed */
 	mlxsw_cmd_mbox_sw2hw_eq_log_eq_size_set(mbox, ilog2(q->count));
 	for (i = 0; i < MLXSW_PCI_AQ_PAGES; i++) {
-- 
2.7.4

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

* Re: [patch net-next 0/2] mlxsw: cosmetics
  2017-03-06 20:25 [patch net-next 0/2] mlxsw: cosmetics Jiri Pirko
  2017-03-06 20:25 ` [patch net-next 1/2] mlxsw: spectrum: Fix helper function and port variable names Jiri Pirko
  2017-03-06 20:25 ` [patch net-next 2/2] mlxsw: pci: Remove unused bit Jiri Pirko
@ 2017-03-09  7:17 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-09  7:17 UTC (permalink / raw)
  To: jiri; +Cc: netdev, idosch, mlxsw, ivecera

From: Jiri Pirko <jiri@resnulli.us>
Date: Mon,  6 Mar 2017 21:25:19 +0100

> Couple of cosmetic mlxsw patches

Series applied, thanks Jiri.

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

end of thread, other threads:[~2017-03-09  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 20:25 [patch net-next 0/2] mlxsw: cosmetics Jiri Pirko
2017-03-06 20:25 ` [patch net-next 1/2] mlxsw: spectrum: Fix helper function and port variable names Jiri Pirko
2017-03-06 20:25 ` [patch net-next 2/2] mlxsw: pci: Remove unused bit Jiri Pirko
2017-03-09  7:17 ` [patch net-next 0/2] mlxsw: cosmetics David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.