Re: [PATCH net-next v3 0/7] Add support for QCA8334 switch

2018-05-24 Thread Michal Vokáč
On 23.5.2018 17:39, Florian Fainelli wrote: On 05/22/2018 11:20 PM, Michal Vokáč wrote: 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

[PATCH net-next v3 0/7] Add support for QCA8334 switch

2018-05-23 Thread Michal Vokáč
regarding SPDX and redundant parentheses. Changes in v3: - Rebased on latest net-next/master. - Corrected fixed-link documentation. 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

[PATCH net-next v3 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-23 Thread Michal Vokáč
Add support for the four-port variant of the Qualcomm QCA833x switch. The CPU port default link settings can be reconfigured using a fixed-link sub-node. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Rob Herring <r...@kernel.org> Reviewed-by: Andrew Lunn <

[PATCH net-next v3 2/7] net: dsa: qca8k: Add support for QCA8334 switch

2018-05-23 Thread Michal Vokáč
Add support for the four-port variant of the Qualcomm QCA833x switch. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- Changes in v3: - Add "Reviewed-by" tag from Andrew Changes in v2: - Add commit message drivers/ne

[PATCH net-next v3 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-23 Thread Michal Vokáč
Implement adjust_link function that allows to overwrite default CPU port setting using fixed-link device tree subnode. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- Chan

[PATCH net-next v3 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-23 Thread Michal Vokáč
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. Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family") Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed

[PATCH net-next v3 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-23 Thread Michal Vokáč
Replace the GPLv2 license boilerplate with the SPDX license identifier. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- Changes in v3: - none Changes in v2: - Add comm

[PATCH net-next v3 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-23 Thread Michal Vokáč
correct size of the bit field used to configure link speed. Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family") Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gma

[PATCH net-next v3 7/7] net: dsa: qca8k: Remove redundant parentheses

2018-05-23 Thread Michal Vokáč
Fix warning reported by checkpatch. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- Changes in v3: - none Changes in v2: - Fix typo in subject. - Add "Review

[PATCH net-next v2 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-22 Thread Michal Vokáč
Add support for the four-port variant of the Qualcomm QCA833x switch. The CPU port default link settings can be reconfigured using a fixed-link sub-node. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> --- Changes in v2: - Add commit message and document fixed-link b

[PATCH net-next v2 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-22 Thread Michal Vokáč
Implement adjust_link function that allows to overwrite default CPU port setting using fixed-link device tree subnode. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- Cha

[PATCH net-next v2 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-22 Thread Michal Vokáč
Replace the GPLv2 license boilerplate with the SPDX license identifier. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- Changes in v2: - Add commit message. - Add "

[PATCH net-next v2 7/7] net: dsa: qca8k: Remove redundant parentheses

2018-05-22 Thread Michal Vokáč
Fix warning reported by checkpatch. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- Changes in v2: - Fix typo in subject. - Add "Reviewed-by" tags from Andrew an

[PATCH net-next v2 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-22 Thread Michal Vokáč
correct size of the bit field used to configure link speed. Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family") Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> Reviewed-by: Florian Fainelli <f.faine...@gma

[PATCH net-next v2 2/7] net: dsa: qca8k: Add support for QCA8334 switch

2018-05-22 Thread Michal Vokáč
Add support for the four-port variant of the Qualcomm QCA833x switch. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> --- Changes in v2: - Add commit message. drivers/net/dsa/qca8k.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/q

[PATCH net-next v2 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-22 Thread Michal Vokáč
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. Fixes: 6b93fb46480a ("net-next: dsa: add new driver for qca8xxx family") Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> Reviewed

[PATCH net-next v2 0/7] Add support for QCA8334 switch

2018-05-22 Thread Michal Vokáč
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

Re: [PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-21 Thread Michal Vokáč
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.vo...@ysoft.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> I don't know if we need all people who contributed to that dri

Re: [PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses

2018-05-21 Thread Michal Vokáč
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.faine...@gmail.com> Thanks, I will fix it. Michal

Re: [PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-21 Thread Michal Vokáč
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

Re: [PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-21 Thread Michal Vokáč
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.vo...@ysoft.com> Re

Re: [PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-21 Thread Michal Vokáč
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.vo...@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

[PATCH net-next 3/7] net: dsa: qca8k: Enable RXMAC when bringing up a port

2018-05-21 Thread Michal Vokáč
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.vo...@ysoft.com> --- drivers/net/dsa/qca8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH net-next 4/7] net: dsa: qca8k: Force CPU port to its highest bandwidth

2018-05-21 Thread Michal Vokáč
correct size of the bit field used to configure link speed. Signed-off-by: Michal Vokáč <michal.vo...@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/q

[PATCH net-next 6/7] net: dsa: qca8k: Replace GPL boilerplate by SPDX

2018-05-21 Thread Michal Vokáč
Signed-off-by: Michal Vokáč <michal.vo...@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/n

[PATCH net-next 1/7] net: dsa: qca8k: Add QCA8334 binding documentation

2018-05-21 Thread Michal Vokáč
Signed-off-by: Michal Vokáč <michal.vo...@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

[PATCH net-next 7/7] net: dsa: qca8k: Remove rudundant parentheses

2018-05-21 Thread Michal Vokáč
Fix warning reported by checkpatch. Signed-off-by: Michal Vokáč <michal.vo...@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/q

[PATCH net-next 5/7] net: dsa: qca8k: Allow overwriting CPU port setting

2018-05-21 Thread Michal Vokáč
Implement adjust_link function that allows to overwrite default CPU port setting using fixed-link device tree subnode. Signed-off-by: Michal Vokáč <michal.vo...@ysoft.com> --- drivers/net/dsa/qca8k.c | 43 +++ drivers/net/dsa/qca8k.h | 1 + 2

[PATCH net-next 2/7] net: dsa: qca8k: Add support for QCA8334 switch

2018-05-21 Thread Michal Vokáč
Signed-off-by: Michal Vokáč <michal.vo...@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 +

[PATCH net-next 0/7] Add support for QCA8334 switch

2018-05-21 Thread Michal Vokáč
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

Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-05-16 Thread Michal Vokáč
On 16.5.2018 15:17, Andrew Lunn wrote: So as the fixed-link subnode is optional we still should force some sensible defaults if it is not used. Same as Marvell drives does. Can I say that we agreed that the current CPU port setting is not correct and the fastest link speed and duplex supported

Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-05-16 Thread Michal Vokáč
On 15.5.2018 18:17, Florian Fainelli wrote: I would like to have confirmed that I understand it correctly and that the problem is really in the driver not handling fixed-link. I would actually skip fixed-link, if you don't need it. Just hardwire the CPU port, like the Marvell driver does:

Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-05-15 Thread Michal Vokáč
On 10.5.2018 16:29, Andrew Lunn wrote: I would probably add code to dump all the qca8k registers. Compare the values for your working setup and your non-working setup. Hopefully they are not too different, and you can quickly get to the bits which matter. Perfect! Thanks to your suggestion I

Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-05-10 Thread Michal Vokáč
On 4.5.2018 15:30, Andrew Lunn wrote: I am out of ideas how to further debug this. Any additional adivce will be much appreciated. I would suggest looking at the statistics counters. ethtool -S. Try it for both the slave interfaces, and the master interface. The master interfaces statistics

Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-05-04 Thread Michal Vokáč
On 30.4.2018 15:20, Andrew Lunn wrote: Using rgmii-id for the port is not valid as the qca8k driver does not support that mode. It only supports rgmii and sgmii. I think this is actually not correct. When phy-mode is set to rgmii for port the qca8k driver configures internal delays in the

Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-04-27 Thread Michal Vokáč
On 26.4.2018 16:06, Andrew Lunn wrote: On Thu, Apr 26, 2018 at 03:37:33PM +0200, Michal Vokáč wrote: - Linux 4.9.84 (Freescale 4.9-1.0.x-imx branch) Hi Michal Please use mainline, not the freescale fork. For DSA, there is nothing you need in the freescale fork. Once it works with mainline

i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working

2018-04-26 Thread Michal Vokáč
Ahoj, Sorry for bothering you guys but I could not come up with a more appropriate place to ask my question. I would very much appreciate some adivce to the DSA/QCA8K driver usage. I am not (yet) very educated in networking internals so my wording may not be right and my expectations may be