All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] Add support for QCA8334 switch
@ 2018-05-21 13:28 Michal Vokáč
  2018-05-21 13:28 ` [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation Michal Vokáč
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

This series basically adds support for a QCA8334 ethernet switch to the
qca8k driver. It is a four-port variant of the already supported seven
port QCA8337. Register map is the same for the whole familly and all chips
have the same device ID.

Major part of this series enhances the CPU port setting. Currently the CPU
port is not set to any sensible defaults compatible with the xGMII
interface. This series forces the CPU port to its maximum bandwidth and
also allows to adjust the new defaults using fixed-link device tree
sub-node.

Alongside these changes I fixed two checkpatch warnings regarding SPDX and
redundant parentheses.

Michal Vokáč (7):
  net: dsa: qca8k: Add QCA8334 binding documentation
  net: dsa: qca8k: Add support for QCA8334 switch
  net: dsa: qca8k: Enable RXMAC when bringing up a port
  net: dsa: qca8k: Force CPU port to its highest bandwidth
  net: dsa: qca8k: Allow overwriting CPU port setting
  net: dsa: qca8k: Replace GPL boilerplate by SPDX
  net: dsa: qca8k: Remove rudundant parentheses

 .../devicetree/bindings/net/dsa/qca8k.txt          |  5 +-
 drivers/net/dsa/qca8k.c                            | 64 ++++++++++++++++++----
 drivers/net/dsa/qca8k.h                            |  7 ++-
 3 files changed, 61 insertions(+), 15 deletions(-)

-- 
2.1.4

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

* [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 14:39   ` Andrew Lunn
  2018-05-21 14:47   ` Andrew Lunn
  2018-05-21 13:28 ` [PATCH net-next 2/7] net: dsa: qca8k: Add support for QCA8334 switch Michal Vokáč
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 Documentation/devicetree/bindings/net/dsa/qca8k.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
index 9c67ee4..3d73cd0 100644
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
@@ -2,7 +2,10 @@
 
 Required properties:
 
-- compatible: should be "qca,qca8337"
+- compatible: should be one of:
+    "qca,qca8334"
+    "qca,qca8337"
+
 - #size-cells: must be 0
 - #address-cells: must be 1
 
-- 
2.1.4

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

* [PATCH net-next 2/7] net: dsa: qca8k: Add support for QCA8334 switch
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
  2018-05-21 13:28 ` [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 13:28 ` [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port Michal Vokáč
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 drivers/net/dsa/qca8k.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 3684e56..6a3ffb2 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1010,6 +1010,7 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
 			 qca8k_suspend, qca8k_resume);
 
 static const struct of_device_id qca8k_of_match[] = {
+	{ .compatible = "qca,qca8334" },
 	{ .compatible = "qca,qca8337" },
 	{ /* sentinel */ },
 };
-- 
2.1.4

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

* [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
  2018-05-21 13:28 ` [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation Michal Vokáč
  2018-05-21 13:28 ` [PATCH net-next 2/7] net: dsa: qca8k: Add support for QCA8334 switch Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 14:40   ` Andrew Lunn
  2018-05-21 15:17   ` Florian Fainelli
  2018-05-21 13:28 ` [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth Michal Vokáč
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

When a port is brought up/down do not enable/disable only the TXMAC
but the RXMAC as well. This is essential for the CPU port to work.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 drivers/net/dsa/qca8k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 6a3ffb2..0d224f3 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -516,7 +516,7 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode)
 static void
 qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable)
 {
-	u32 mask = QCA8K_PORT_STATUS_TXMAC;
+	u32 mask = QCA8K_PORT_STATUS_TXMAC | QCA8K_PORT_STATUS_RXMAC;
 
 	pr_debug("qca: port %i set status %i\n", port, enable);
 
-- 
2.1.4

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

* [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
                   ` (2 preceding siblings ...)
  2018-05-21 13:28 ` [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 14:42   ` Andrew Lunn
  2018-05-21 15:19   ` Florian Fainelli
  2018-05-21 13:28 ` [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting Michal Vokáč
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

By default autonegotiation is enabled to configure MAC on all ports.
For the CPU port autonegotiation can not be used so we need to set
some sensible defaults manually.

This patch forces the default setting of the CPU port to 1000Mbps/full
duplex which is the chip maximum capability.

Also correct size of the bit field used to configure link speed.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 drivers/net/dsa/qca8k.c | 6 +++++-
 drivers/net/dsa/qca8k.h | 6 ++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 0d224f3..14a108b38 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -537,6 +537,7 @@ qca8k_setup(struct dsa_switch *ds)
 {
 	struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
 	int ret, i, phy_mode = -1;
+	u32 mask;
 
 	pr_debug("qca: setup\n");
 
@@ -564,7 +565,10 @@ qca8k_setup(struct dsa_switch *ds)
 	if (ret < 0)
 		return ret;
 
-	/* Enable CPU Port */
+	/* Enable CPU Port, force it to maximum bandwidth and full-duplex */
+	mask = QCA8K_PORT_STATUS_SPEED_1000 | QCA8K_PORT_STATUS_TXFLOW |
+	       QCA8K_PORT_STATUS_RXFLOW | QCA8K_PORT_STATUS_DUPLEX;
+	qca8k_write(priv, QCA8K_REG_PORT_STATUS(QCA8K_CPU_PORT), mask);
 	qca8k_reg_set(priv, QCA8K_REG_GLOBAL_FW_CTRL0,
 		      QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN);
 	qca8k_port_set_status(priv, QCA8K_CPU_PORT, 1);
diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
index 1cf8a92..5bda165 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -51,8 +51,10 @@
 #define QCA8K_GOL_MAC_ADDR0				0x60
 #define QCA8K_GOL_MAC_ADDR1				0x64
 #define QCA8K_REG_PORT_STATUS(_i)			(0x07c + (_i) * 4)
-#define   QCA8K_PORT_STATUS_SPEED			GENMASK(2, 0)
-#define   QCA8K_PORT_STATUS_SPEED_S			0
+#define   QCA8K_PORT_STATUS_SPEED			GENMASK(1, 0)
+#define   QCA8K_PORT_STATUS_SPEED_10			0
+#define   QCA8K_PORT_STATUS_SPEED_100			0x1
+#define   QCA8K_PORT_STATUS_SPEED_1000			0x2
 #define   QCA8K_PORT_STATUS_TXMAC			BIT(2)
 #define   QCA8K_PORT_STATUS_RXMAC			BIT(3)
 #define   QCA8K_PORT_STATUS_TXFLOW			BIT(4)
-- 
2.1.4

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

* [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
                   ` (3 preceding siblings ...)
  2018-05-21 13:28 ` [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 14:46   ` Andrew Lunn
  2018-05-21 15:20   ` Florian Fainelli
  2018-05-21 13:28 ` [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX Michal Vokáč
  2018-05-21 13:28 ` [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses Michal Vokáč
  6 siblings, 2 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

Implement adjust_link function that allows to overwrite default CPU port
setting using fixed-link device tree subnode.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 drivers/net/dsa/qca8k.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 drivers/net/dsa/qca8k.h |  1 +
 2 files changed, 44 insertions(+)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 14a108b38..7eba987 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -636,6 +636,47 @@ qca8k_setup(struct dsa_switch *ds)
 	return 0;
 }
 
+static void
+qca8k_adjust_link(struct dsa_switch *ds, int port, struct phy_device *phy)
+{
+	struct qca8k_priv *priv = ds->priv;
+	u32 reg;
+
+	/* Force fixed-link setting for CPU port, skip others. */
+	if (!phy_is_pseudo_fixed_link(phy))
+		return;
+
+	/* Set port speed */
+	switch (phy->speed) {
+	case 10:
+		reg = QCA8K_PORT_STATUS_SPEED_10;
+		break;
+	case 100:
+		reg = QCA8K_PORT_STATUS_SPEED_100;
+		break;
+	case 1000:
+		reg = QCA8K_PORT_STATUS_SPEED_1000;
+		break;
+	default:
+		dev_dbg(priv->dev, "port%d link speed %dMbps not supported.\n",
+			port, phy->speed);
+		return;
+	}
+
+	/* Set duplex mode */
+	if (phy->duplex == DUPLEX_FULL)
+		reg |= QCA8K_PORT_STATUS_DUPLEX;
+
+	/* Force flow control */
+	if (dsa_is_cpu_port(ds, port))
+		reg |= QCA8K_PORT_STATUS_RXFLOW | QCA8K_PORT_STATUS_TXFLOW;
+
+	/* Force link down before changing MAC options */
+	qca8k_port_set_status(priv, port, 0);
+	qca8k_write(priv, QCA8K_REG_PORT_STATUS(port), reg);
+	qca8k_port_set_status(priv, port, 1);
+}
+
 static int
 qca8k_phy_read(struct dsa_switch *ds, int phy, int regnum)
 {
@@ -909,6 +950,7 @@ qca8k_get_tag_protocol(struct dsa_switch *ds, int port)
 static const struct dsa_switch_ops qca8k_switch_ops = {
 	.get_tag_protocol	= qca8k_get_tag_protocol,
 	.setup			= qca8k_setup,
+	.adjust_link            = qca8k_adjust_link,
 	.get_strings		= qca8k_get_strings,
 	.phy_read		= qca8k_phy_read,
 	.phy_write		= qca8k_phy_write,
@@ -942,6 +984,7 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
 		return -ENOMEM;
 
 	priv->bus = mdiodev->bus;
+	priv->dev = &mdiodev->dev;
 
 	/* read the switches ID register */
 	id = qca8k_read(priv, QCA8K_REG_MASK_CTRL);
diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
index 5bda165..613fe5c5 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -167,6 +167,7 @@ struct qca8k_priv {
 	struct ar8xxx_port_status port_sts[QCA8K_NUM_PORTS];
 	struct dsa_switch *ds;
 	struct mutex reg_mutex;
+	struct device *dev;
 };
 
 struct qca8k_mib_desc {
-- 
2.1.4

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

* [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
                   ` (4 preceding siblings ...)
  2018-05-21 13:28 ` [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 14:47   ` Andrew Lunn
  2018-05-21 15:20   ` Florian Fainelli
  2018-05-21 13:28 ` [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses Michal Vokáč
  6 siblings, 2 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 drivers/net/dsa/qca8k.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 7eba987..c834893 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
  * Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
  * Copyright (c) 2015, The Linux Foundation. All rights reserved.
  * Copyright (c) 2016 John Crispin <john@phrozen.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #define DEBUG
-- 
2.1.4

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

* [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses
  2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
                   ` (5 preceding siblings ...)
  2018-05-21 13:28 ` [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX Michal Vokáč
@ 2018-05-21 13:28 ` Michal Vokáč
  2018-05-21 14:48   ` Andrew Lunn
  2018-05-21 15:21   ` Florian Fainelli
  6 siblings, 2 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-21 13:28 UTC (permalink / raw)
  To: netdev, michal.vokac
  Cc: linux-kernel, devicetree, f.fainelli, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

Fix warning reported by checkpatch.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 drivers/net/dsa/qca8k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index c834893..c0da402 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -513,7 +513,7 @@ qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable)
 	pr_debug("qca: port %i set status %i\n", port, enable);
 
 	/* Port 0 and 6 have no internal PHY */
-	if ((port > 0) && (port < 6))
+	if (port > 0 && port < 6)
 		mask |= QCA8K_PORT_STATUS_LINK_AUTO;
 
 	if (enable)
-- 
2.1.4

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

* Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation
  2018-05-21 13:28 ` [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation Michal Vokáč
@ 2018-05-21 14:39   ` Andrew Lunn
  2018-05-21 14:47   ` Andrew Lunn
  1 sibling, 0 replies; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:39 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:07PM +0200, Michal Vokáč wrote:

Hi Michal

It is normal to have some commit message, even if it is the subject
said differently.

     Andrew

> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> ---
>  Documentation/devicetree/bindings/net/dsa/qca8k.txt | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
> index 9c67ee4..3d73cd0 100644
> --- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
> @@ -2,7 +2,10 @@
>  
>  Required properties:
>  
> -- compatible: should be "qca,qca8337"
> +- compatible: should be one of:
> +    "qca,qca8334"
> +    "qca,qca8337"
> +
>  - #size-cells: must be 0
>  - #address-cells: must be 1
>  
> -- 
> 2.1.4
> 

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

* Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port
  2018-05-21 13:28 ` [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port Michal Vokáč
@ 2018-05-21 14:40   ` Andrew Lunn
  2018-05-21 15:17   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:40 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:09PM +0200, Michal Vokáč wrote:
> When a port is brought up/down do not enable/disable only the TXMAC
> but the RXMAC as well. This is essential for the CPU port to work.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth
  2018-05-21 13:28 ` [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth Michal Vokáč
@ 2018-05-21 14:42   ` Andrew Lunn
  2018-05-21 15:19   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:42 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:10PM +0200, Michal Vokáč wrote:
> By default autonegotiation is enabled to configure MAC on all ports.
> For the CPU port autonegotiation can not be used so we need to set
> some sensible defaults manually.
> 
> This patch forces the default setting of the CPU port to 1000Mbps/full
> duplex which is the chip maximum capability.
> 
> Also correct size of the bit field used to configure link speed.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting
  2018-05-21 13:28 ` [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting Michal Vokáč
@ 2018-05-21 14:46   ` Andrew Lunn
  2018-05-21 15:20   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:46 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:11PM +0200, Michal Vokáč wrote:
> Implement adjust_link function that allows to overwrite default CPU port
> setting using fixed-link device tree subnode.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation
  2018-05-21 13:28 ` [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation Michal Vokáč
  2018-05-21 14:39   ` Andrew Lunn
@ 2018-05-21 14:47   ` Andrew Lunn
  2018-05-22  5:16     ` Michal Vokáč
  1 sibling, 1 reply; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:47 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:07PM +0200, Michal Vokáč wrote:
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Hi Michal

It would be good to document that fixed-link can be used.

   Andrew

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

* Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX
  2018-05-21 13:28 ` [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX Michal Vokáč
@ 2018-05-21 14:47   ` Andrew Lunn
  2018-05-21 15:20   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:47 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:12PM +0200, Michal Vokáč wrote:
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses
  2018-05-21 13:28 ` [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses Michal Vokáč
@ 2018-05-21 14:48   ` Andrew Lunn
  2018-05-21 15:21   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Andrew Lunn @ 2018-05-21 14:48 UTC (permalink / raw)
  To: Michal Vokáč
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On Mon, May 21, 2018 at 03:28:13PM +0200, Michal Vokáč wrote:
> Fix warning reported by checkpatch.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port
  2018-05-21 13:28 ` [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port Michal Vokáč
  2018-05-21 14:40   ` Andrew Lunn
@ 2018-05-21 15:17   ` Florian Fainelli
  2018-05-22  5:28     ` Michal Vokáč
  1 sibling, 1 reply; 25+ messages in thread
From: Florian Fainelli @ 2018-05-21 15:17 UTC (permalink / raw)
  To: Michal Vokáč, netdev, michal.vokac
  Cc: linux-kernel, devicetree, vivien.didelot, andrew, mark.rutland,
	robh+dt, davem



On 05/21/2018 06:28 AM, Michal Vokáč wrote:
> When a port is brought up/down do not enable/disable only the TXMAC
> but the RXMAC as well. This is essential for the CPU port to work.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Should this have:

Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family")?
-- 
Florian

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

* Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth
  2018-05-21 13:28 ` [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth Michal Vokáč
  2018-05-21 14:42   ` Andrew Lunn
@ 2018-05-21 15:19   ` Florian Fainelli
  2018-05-22  5:30     ` Michal Vokáč
  1 sibling, 1 reply; 25+ messages in thread
From: Florian Fainelli @ 2018-05-21 15:19 UTC (permalink / raw)
  To: Michal Vokáč, netdev, michal.vokac
  Cc: linux-kernel, devicetree, vivien.didelot, andrew, mark.rutland,
	robh+dt, davem



On 05/21/2018 06:28 AM, Michal Vokáč wrote:
> By default autonegotiation is enabled to configure MAC on all ports.
> For the CPU port autonegotiation can not be used so we need to set
> some sensible defaults manually.
> 
> This patch forces the default setting of the CPU port to 1000Mbps/full
> duplex which is the chip maximum capability.
> 
> Also correct size of the bit field used to configure link speed.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Likewise, would not we want to have a:

Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family")

tag here as well?
-- 
Florian

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

* Re: [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting
  2018-05-21 13:28 ` [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting Michal Vokáč
  2018-05-21 14:46   ` Andrew Lunn
@ 2018-05-21 15:20   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2018-05-21 15:20 UTC (permalink / raw)
  To: Michal Vokáč, netdev, michal.vokac
  Cc: linux-kernel, devicetree, vivien.didelot, andrew, mark.rutland,
	robh+dt, davem



On 05/21/2018 06:28 AM, Michal Vokáč wrote:
> Implement adjust_link function that allows to overwrite default CPU port
> setting using fixed-link device tree subnode.
> 
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX
  2018-05-21 13:28 ` [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX Michal Vokáč
  2018-05-21 14:47   ` Andrew Lunn
@ 2018-05-21 15:20   ` Florian Fainelli
  2018-05-22  5:49     ` Michal Vokáč
  1 sibling, 1 reply; 25+ messages in thread
From: Florian Fainelli @ 2018-05-21 15:20 UTC (permalink / raw)
  To: Michal Vokáč, netdev, michal.vokac
  Cc: linux-kernel, devicetree, vivien.didelot, andrew, mark.rutland,
	robh+dt, davem



On 05/21/2018 06:28 AM, Michal Vokáč wrote:
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

I don't know if we need all people who contributed to that driver to
agree on that, this is not a license change, so it should be okay I presume?

-- 
Florian

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

* Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses
  2018-05-21 13:28 ` [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses Michal Vokáč
  2018-05-21 14:48   ` Andrew Lunn
@ 2018-05-21 15:21   ` Florian Fainelli
  2018-05-22  5:52     ` Michal Vokáč
  1 sibling, 1 reply; 25+ messages in thread
From: Florian Fainelli @ 2018-05-21 15:21 UTC (permalink / raw)
  To: Michal Vokáč, netdev, michal.vokac
  Cc: linux-kernel, devicetree, vivien.didelot, andrew, mark.rutland,
	robh+dt, davem



On 05/21/2018 06:28 AM, Michal Vokáč wrote:
> Fix warning reported by checkpatch.

Nit in the subject: should be redundant, with that:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation
  2018-05-21 14:47   ` Andrew Lunn
@ 2018-05-22  5:16     ` Michal Vokáč
  0 siblings, 0 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-22  5:16 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: netdev, michal.vokac, linux-kernel, devicetree, f.fainelli,
	vivien.didelot, mark.rutland, robh+dt, davem

On 21.5.2018 16:47, Andrew Lunn wrote:
> On Mon, May 21, 2018 at 03:28:07PM +0200, Michal Vokáč wrote:
>> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> 
> Hi Michal
> 
> It would be good to document that fixed-link can be used.

OK, I will document that and add a commit message as well as you
mentioned before.

Thanks,
Michal

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

* Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port
  2018-05-21 15:17   ` Florian Fainelli
@ 2018-05-22  5:28     ` Michal Vokáč
  0 siblings, 0 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-22  5:28 UTC (permalink / raw)
  To: Florian Fainelli, netdev
  Cc: michal.vokac, linux-kernel, devicetree, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

On 21.5.2018 17:17, Florian Fainelli wrote:
> 
> On 05/21/2018 06:28 AM, Michal Vokáč wrote:
>> When a port is brought up/down do not enable/disable only the TXMAC
>> but the RXMAC as well. This is essential for the CPU port to work.
>>
>> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Should this have:
> 
> Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family")?

Yes, I think it is a good idea to can add this. Will do it in v2.

Thanks,
Michal

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

* Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth
  2018-05-21 15:19   ` Florian Fainelli
@ 2018-05-22  5:30     ` Michal Vokáč
  0 siblings, 0 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-22  5:30 UTC (permalink / raw)
  To: Florian Fainelli, netdev
  Cc: michal.vokac, linux-kernel, devicetree, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

On 21.5.2018 17:19, Florian Fainelli wrote:
> 
> On 05/21/2018 06:28 AM, Michal Vokáč wrote:
>> By default autonegotiation is enabled to configure MAC on all ports.
>> For the CPU port autonegotiation can not be used so we need to set
>> some sensible defaults manually.
>>
>> This patch forces the default setting of the CPU port to 1000Mbps/full
>> duplex which is the chip maximum capability.
>>
>> Also correct size of the bit field used to configure link speed.
>>
>> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Likewise, would not we want to have a:
> 
> Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family")
> 
> tag here as well?

Good point, I will add this in v2.

Thanks,
Michal

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

* Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX
  2018-05-21 15:20   ` Florian Fainelli
@ 2018-05-22  5:49     ` Michal Vokáč
  0 siblings, 0 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-22  5:49 UTC (permalink / raw)
  To: Florian Fainelli, netdev
  Cc: michal.vokac, linux-kernel, devicetree, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

On 21.5.2018 17:20, Florian Fainelli wrote:
> 
> On 05/21/2018 06:28 AM, Michal Vokáč wrote:
>> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> I don't know if we need all people who contributed to that driver to
> agree on that, this is not a license change, so it should be okay I presume?

I did that with the same idea on my mind, that this is not a license change.
Prior to the change I also went through the log and reviewed few commits that
did exactly the same thing and did not receive Ack or something from the
original authors nor further contributors.

Just one example:

4ac0d3f ("eeprom: at24: use SPDX identifier instead of GPL boiler-plate")

Thanks,
Michal

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

* Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses
  2018-05-21 15:21   ` Florian Fainelli
@ 2018-05-22  5:52     ` Michal Vokáč
  0 siblings, 0 replies; 25+ messages in thread
From: Michal Vokáč @ 2018-05-22  5:52 UTC (permalink / raw)
  To: Florian Fainelli, netdev
  Cc: michal.vokac, linux-kernel, devicetree, vivien.didelot, andrew,
	mark.rutland, robh+dt, davem

On 21.5.2018 17:21, Florian Fainelli wrote:
> 
> On 05/21/2018 06:28 AM, Michal Vokáč wrote:
>> Fix warning reported by checkpatch.
> 
> Nit in the subject: should be redundant, with that:
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks, I will fix it.

Michal

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

end of thread, other threads:[~2018-05-22  5:52 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-21 13:28 [PATCH net-next 0/7] Add support for QCA8334 switch Michal Vokáč
2018-05-21 13:28 ` [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation Michal Vokáč
2018-05-21 14:39   ` Andrew Lunn
2018-05-21 14:47   ` Andrew Lunn
2018-05-22  5:16     ` Michal Vokáč
2018-05-21 13:28 ` [PATCH net-next 2/7] net: dsa: qca8k: Add support for QCA8334 switch Michal Vokáč
2018-05-21 13:28 ` [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port Michal Vokáč
2018-05-21 14:40   ` Andrew Lunn
2018-05-21 15:17   ` Florian Fainelli
2018-05-22  5:28     ` Michal Vokáč
2018-05-21 13:28 ` [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth Michal Vokáč
2018-05-21 14:42   ` Andrew Lunn
2018-05-21 15:19   ` Florian Fainelli
2018-05-22  5:30     ` Michal Vokáč
2018-05-21 13:28 ` [PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting Michal Vokáč
2018-05-21 14:46   ` Andrew Lunn
2018-05-21 15:20   ` Florian Fainelli
2018-05-21 13:28 ` [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX Michal Vokáč
2018-05-21 14:47   ` Andrew Lunn
2018-05-21 15:20   ` Florian Fainelli
2018-05-22  5:49     ` Michal Vokáč
2018-05-21 13:28 ` [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses Michal Vokáč
2018-05-21 14:48   ` Andrew Lunn
2018-05-21 15:21   ` Florian Fainelli
2018-05-22  5:52     ` Michal Vokáč

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.