Re: [PATCH net-next] net: dsa: lantiq_gswip: Add support for dumping the registers

2021-04-13 Thread Hauke Mehrtens
On 4/13/21 12:24 AM, Martin Blumenstingl wrote: Hi Andrew, On Mon, Apr 12, 2021 at 1:16 AM Andrew Lunn wrote: On Sun, Apr 11, 2021 at 10:55:11PM +0200, Martin Blumenstingl wrote: Add support for .get_regs_len and .get_regs so it is easier to find out about the state of the ports on the GSWIP

Re: [PATCH net-next] net: dsa: lantiq_gswip: Add support for dumping the registers

2021-04-11 Thread Hauke Mehrtens
current port status (as well as the result of the auto polling mechanism). Other global and per-port registers which are also considered useful are included as well. Acked-by: Hauke Mehrtens Signed-off-by: Martin Blumenstingl --- drivers/net/dsa/lantiq_gswip.c | 83

Re: [PATCH RFC net 2/2] net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits

2021-04-07 Thread Hauke Mehrtens
On 4/7/21 2:32 AM, Andrew Lunn wrote: case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII_ID: case PHY_INTERFACE_MODE_RGMII_RXID: case PHY_INTERFACE_MODE_RGMII_TXID: miicfg |= GSWIP_MII_CFG_MODE_RGMII; + + if (phylink_autoneg_

Re: [PATCH RFC net 2/2] net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits

2021-04-06 Thread Hauke Mehrtens
ew of the GSWIP_MII_CFG register. Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Cc: sta...@vger.kernel.org Suggested-by: Hauke Mehrtens Acked-by: Hauke Mehrtens Signed-off-by: Martin Blumenstingl --- drivers/net/dsa/lantiq_gswip.c | 22

Re: lantiq_xrx200: Ethernet MAC with multiple TX queues

2021-03-24 Thread Hauke Mehrtens
On 3/24/21 10:09 PM, Florian Fainelli wrote: On 3/24/2021 1:13 PM, Vladimir Oltean wrote: Hi Martin, On Wed, Mar 24, 2021 at 09:04:16PM +0100, Martin Blumenstingl wrote: Hello, the PMAC (Ethernet MAC) IP built into the Lantiq xRX200 SoCs has support for multiple (TX) queues. This MAC is con

Re: [PATCH v3 2/3] net: dsa: lantiq: verify compatible strings against hardware

2021-03-21 Thread Hauke Mehrtens
On 3/21/21 6:39 PM, Aleksander Jan Bajkowski wrote: Verify compatible string against hardware. Signed-off-by: Aleksander Jan Bajkowski Acked-by: Hauke Mehrtens

Re: [PATCH v3 1/3] net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330

2021-03-21 Thread Hauke Mehrtens
-off-by: Aleksander Jan Bajkowski Acked-by: Hauke Mehrtens

Re: [PATCH 2/2] net: dsa: lantiq_gswip: Fix GSWIP_MII_CFG(p) register access

2021-01-02 Thread Hauke Mehrtens
because there's really only three (one for each of the following ports: 0, 1, 5). Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Cc: sta...@vger.kernel.org Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens --- drivers/net/dsa/lant

Re: [PATCH 1/2] net: dsa: lantiq_gswip: Enable GSWIP_MII_CFG_EN also for internal PHYs

2021-01-02 Thread Hauke Mehrtens
Add Lantiq / Intel DSA driver for vrx200") Cc: sta...@vger.kernel.org Suggested-by: Hauke Mehrtens Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/dsa/lantiq_gs

Re: [PATCH] net: lantiq_etop: check the result of request_irq()

2020-12-21 Thread Hauke Mehrtens
On 12/21/20 7:04 PM, Andrew Lunn wrote: On Tue, Dec 22, 2020 at 12:59:08AM +0900, Masahiro Yamada wrote: On Tue, Dec 22, 2020 at 12:26 AM Andrew Lunn wrote: On Mon, Dec 21, 2020 at 02:43:23PM +0900, Masahiro Yamada wrote: The declaration of request_irq() in is marked as __must_check. Witho

Re: [PATCH 1/2] net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330

2020-12-04 Thread Hauke Mehrtens
On 12/4/20 2:49 AM, Andrew Lunn wrote: static const struct of_device_id gswip_of_match[] = { { .compatible = "lantiq,xrx200-gswip", .data = &gswip_xrx200 }, + { .compatible = "lantiq,xrx300-gswip", .data = &gswip_xrx300 }, + { .compatible = "lantiq,xrx330-gswip", .data = &gs

Re: [PATCH 1/2] net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330

2020-12-03 Thread Hauke Mehrtens
Hi, This looks good. I haven't checked all the differences between the SoCs, but found some minor problems in the code for the port configuration. On 12/3/20 11:03 PM, Aleksander Jan Bajkowski wrote: From: Aleksander Jan Bajkowski This patch allows you to use all phs on GRX300 and GRX330.

Re: [PATCH v2] net: lantiq: Wait for the GPHY firmware to be ready

2020-11-15 Thread Hauke Mehrtens
by: Martin Blumenstingl Acked-by: Hauke Mehrtens --- Changes since v1: - move the msleep() closer to the actual loop over all GPHY instances as suggested by Andrew - added Andrew's Reviewed-by (thank you!) drivers/net/dsa/lantiq_gswip.c | 11 +++ 1 file changed, 11 insertions

Re: [PATCH v2] net: lantiq: Add locking for TX DMA channel

2020-09-26 Thread Hauke Mehrtens
On 9/24/20 3:01 AM, David Miller wrote: > From: Hauke Mehrtens > Date: Tue, 22 Sep 2020 23:41:12 +0200 > >> The TX DMA channel data is accessed by the xrx200_start_xmit() and the >> xrx200_tx_housekeeping() function from different threads. Make sure the >> accesses ar

[PATCH v2] net: lantiq: Add locking for TX DMA channel

2020-09-22 Thread Hauke Mehrtens
xrx200_start_xmit(). Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c index affec78cc0f5..36847ff93918 100644 --- a/drivers/net/ethernet

Re: [PATCH] net: lantiq: Add locking for TX DMA channel

2020-09-22 Thread Hauke Mehrtens
On 9/22/20 2:18 AM, David Miller wrote: > From: Hauke Mehrtens > Date: Tue, 22 Sep 2020 00:31:13 +0200 > >> The TX DMA channel data is accessed by the xrx200_start_xmit() and the >> xrx200_tx_housekeeping() function from different threads. Make sure the >> accesse

[PATCH] net: lantiq: Add locking for TX DMA channel

2020-09-21 Thread Hauke Mehrtens
The TX DMA channel data is accessed by the xrx200_start_xmit() and the xrx200_tx_housekeeping() function from different threads. Make sure the accesses are synchronized by using locking around the accesses. Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 19

Re: [PATCH v2 4/4] net: lantiq: Disable IRQs only if NAPI gets scheduled

2020-09-14 Thread Hauke Mehrtens
On 9/14/20 10:54 PM, Jakub Kicinski wrote: > On Sat, 12 Sep 2020 21:36:29 +0200 Hauke Mehrtens wrote: >> The napi_schedule() call will only schedule the NAPI if it is not >> already running. To make sure that we do not deactivate interrupts >> without scheduling NAPI only deac

[PATCH v2 4/4] net: lantiq: Disable IRQs only if NAPI gets scheduled

2020-09-12 Thread Hauke Mehrtens
The napi_schedule() call will only schedule the NAPI if it is not already running. To make sure that we do not deactivate interrupts without scheduling NAPI only deactivate the interrupts in case NAPI also gets scheduled. Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c

[PATCH v2 3/4] net: lantiq: Use napi_complete_done()

2020-09-12 Thread Hauke Mehrtens
Use napi_complete_done() and activate the interrupts when this function returns true. This way the generic NAPI code can take care of activating the interrupts. Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH v2 1/4] net: lantiq: Wake TX queue again

2020-09-12 Thread Hauke Mehrtens
RX200 Ethernet driver") Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c index 1645e4e7ebdb..1feb9fc710e0 100644 --- a/drivers/ne

[PATCH v2 0/4] net: lantiq: Fix bugs in NAPI handling

2020-09-12 Thread Hauke Mehrtens
This fixes multiple bugs in the NAPI handling. Changes since: v1: - removed stable tag from "net: lantiq: use netif_tx_napi_add() for TX NAPI" - Check the NAPI budged in "net: lantiq: Use napi_complete_done()" - Add extra fix "net: lantiq: Disable IRQs only if NA

[PATCH v2 2/4] net: lantiq: use netif_tx_napi_add() for TX NAPI

2020-09-12 Thread Hauke Mehrtens
netif_tx_napi_add() should be used for NAPI in the TX direction instead of the netif_napi_add() function. Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers

Re: [PATCH 3/3] net: lantiq: Use napi_complete_done()

2020-08-17 Thread Hauke Mehrtens
On 8/16/20 8:07 PM, Eric Dumazet wrote: > > > On 8/15/20 11:33 AM, Hauke Mehrtens wrote: >> Use napi_complete_done() and activate the interrupts when this function >> returns true. This way the generic NAPI code can take care of activating >> the interrupts. >>

[PATCH 1/3] net: lantiq: Wake TX queue again

2020-08-15 Thread Hauke Mehrtens
RX200 Ethernet driver") Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c index 1645e4e7ebdb..1feb9fc710e0 100644 --- a/drivers/ne

[PATCH 2/3] net: lantiq: use netif_tx_napi_add() for TX NAPI

2020-08-15 Thread Hauke Mehrtens
netif_tx_napi_add() should be used for NAPI in the TX direction instead of the netif_napi_add() function. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 2 +- 1 file changed, 1

[PATCH 3/3] net: lantiq: Use napi_complete_done()

2020-08-15 Thread Hauke Mehrtens
Use napi_complete_done() and activate the interrupts when this function returns true. This way the generic NAPI code can take care of activating the interrupts. Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions

Re: [PATCH net v1] net: dsa: lantiq_gswip: fix and improve the unsupported interface error

2020-06-07 Thread Hauke Mehrtens
mprove > the cases where someone made a mistake. > > Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") > Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens > --- > drivers/net/dsa/lantiq_gswip.c | 3 ++- > 1 file changed, 2 i

[PATCH v3 2/5] net: dsa: lantiq: Add VLAN unaware bridge offloading

2019-05-05 Thread Hauke Mehrtens
MAC learning table port map, one bit for each port number tagged port map, one bit for each port number Signed-off-by: Hauke Mehrtens Reviewed-by: Florian Fainelli --- drivers/net/dsa/lantiq_gswip.c | 475 - 1 file changed, 468 insertions(+), 7 deletions(-) diff

[PATCH v3 3/5] net: dsa: lantiq: Add VLAN aware bridge offloading

2019-05-05 Thread Hauke Mehrtens
port is already in a bridge, this would make the driver more complicated. The VLANs are only defined on bridge entries, so we will not add anything into the hardware when the port joins a bridge if it is doing VLAN filtering, but only when an allowed VLAN is added. Signed-off-by: Hauke Mehrtens

[PATCH v3 0/5] net: dsa: lantiq: Add bridge offloading

2019-05-05 Thread Hauke Mehrtens
This adds bridge offloading for the Intel / Lantiq GSWIP 2.1 switch. Changes since: v2: - Added Fixes tag to patch 1 - Fixed typo - added GSWIP_TABLE_MAC_BRIDGE_STATIC and made use of it - used GSWIP_TABLE_MAC_BRIDGE in more places v1: - fix typo signle -> single Hauke Mehrtens (5):

[PATCH v3 1/5] net: dsa: lantiq: Allow special tags only on CPU port

2019-05-05 Thread Hauke Mehrtens
rx200)" Signed-off-by: Hauke Mehrtens Reviewed-by: Florian Fainelli --- drivers/net/dsa/lantiq_gswip.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index d8328866908c..0a2259cb09df 100644 --- a/drive

[PATCH v3 4/5] net: dsa: lantiq: Add fast age function

2019-05-05 Thread Hauke Mehrtens
Fast aging per port is not supported directly by the hardware, it is only possible to configure a global aging time. Do the fast aging by iterating over the MAC forwarding table and remove all dynamic entries for a given port. Signed-off-by: Hauke Mehrtens Reviewed-by: Florian Fainelli

[PATCH v3 5/5] net: dsa: lantiq: Add Forwarding Database access

2019-05-05 Thread Hauke Mehrtens
This adds functions to add and remove static entries to and from the forwarding database and dump the full forwarding database. Signed-off-by: Hauke Mehrtens Reviewed-by: Florian Fainelli --- drivers/net/dsa/lantiq_gswip.c | 98 ++ 1 file changed, 98 insertions

Re: [PATCH v2 5/5] net: dsa: lantiq: Add Forwarding Database access

2019-05-05 Thread Hauke Mehrtens
On 5/5/19 11:22 PM, Florian Fainelli wrote: > > > On 5/5/2019 2:15 PM, Hauke Mehrtens wrote: >> This adds functions to add and remove static entries to and from the >> forwarding database and dump the full forwarding database. >> >> Signed-off-by:

Re: [PATCH v2 3/5] net: dsa: lantiq: Add VLAN aware bridge offloading

2019-05-05 Thread Hauke Mehrtens
On 5/5/19 11:27 PM, Florian Fainelli wrote: > > > On 5/5/2019 2:15 PM, Hauke Mehrtens wrote: >> The VLAN aware bridge offloading is similar to the VLAN unaware >> offloading, this makes it possible to offload the VLAN bridge >> functionalities. >> >> The

Re: [PATCH v2 1/5] net: dsa: lantiq: Allow special tags only on CPU port

2019-05-05 Thread Hauke Mehrtens
On 5/5/19 11:17 PM, Florian Fainelli wrote: > > > On 5/5/2019 2:15 PM, Hauke Mehrtens wrote: >> Allow the special tag in ingress only on the CPU port and not on all >> ports. A packet with a special tag could circumvent the hardware >> forwarding and should only be al

[PATCH v2 4/5] net: dsa: lantiq: Add fast age function

2019-05-05 Thread Hauke Mehrtens
Fast aging per port is not supported directly by the hardware, it is only possible to configure a global aging time. Do the fast aging by iterating over the MAC forwarding table and remove all dynamic entries for a given port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c

[PATCH v2 1/5] net: dsa: lantiq: Allow special tags only on CPU port

2019-05-05 Thread Hauke Mehrtens
Allow the special tag in ingress only on the CPU port and not on all ports. A packet with a special tag could circumvent the hardware forwarding and should only be allowed on the CPU port where Linux controls the port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 6

[PATCH v2 5/5] net: dsa: lantiq: Add Forwarding Database access

2019-05-05 Thread Hauke Mehrtens
This adds functions to add and remove static entries to and from the forwarding database and dump the full forwarding database. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 98 ++ 1 file changed, 98 insertions(+) diff --git a/drivers/net

[PATCH v2 2/5] net: dsa: lantiq: Add VLAN unaware bridge offloading

2019-05-05 Thread Hauke Mehrtens
MAC learning table port map, one bit for each port number tagged port map, one bit for each port number Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 476 - 1 file changed, 469 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa

[PATCH v2 0/5] net: dsa: lantiq: Add bridge offloading

2019-05-05 Thread Hauke Mehrtens
This adds bridge offloading for the Intel / Lantiq GSWIP 2.1 switch. Changes since: v1: - fix typo signle -> single Hauke Mehrtens (5): net: dsa: lantiq: Allow special tags only on CPU port net: dsa: lantiq: Add VLAN unaware bridge offloading net: dsa: lantiq: Add VLAN aware bri

[PATCH v2 3/5] net: dsa: lantiq: Add VLAN aware bridge offloading

2019-05-05 Thread Hauke Mehrtens
port is already in a bridge, this would make the driver more complicated. The VLANs are only defined on bridge entries, so we will not add anything into the hardware when the port joins a bridge if it is doing VLAN filtering, but only when an allowed VLAN is added. Signed-off-by: Hauke Mehrtens

Re: [PATCH 2/5] net: dsa: lantiq: Add VLAN unaware bridge offloading

2019-05-02 Thread Hauke Mehrtens
On 5/2/19 12:34 AM, Andrew Lunn wrote: > On Wed, May 01, 2019 at 10:45:03PM +0200, Hauke Mehrtens wrote: > > Hi Hauke > > /* Add the LAN port into a bridge with the CPU port by >> + * default. This prevents automatic forwarding of >> + * packages between the

[PATCH 2/5] net: dsa: lantiq: Add VLAN unaware bridge offloading

2019-05-01 Thread Hauke Mehrtens
the port of the destination MAC address it only takes the entries which have the same flow ID of the ingress packet. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 476 - 1 file changed, 469 insertions(+), 7 deletions(-) diff --git a/drivers/net

[PATCH 4/5] net: dsa: lantiq: Add fast age function

2019-05-01 Thread Hauke Mehrtens
Fast aging per port is not supported directly by the hardware, it is only possible to configure a global aging time. Do the fast aging by iterating over the MAC forwarding table and remove all dynamic entries for a given port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c

[PATCH 5/5] net: dsa: lantiq: Add Forwarding Database access

2019-05-01 Thread Hauke Mehrtens
This adds functions to add and remove static entries to and from the forwarding database and dump the full forwarding database. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 98 ++ 1 file changed, 98 insertions(+) diff --git a/drivers/net

[PATCH 1/5] net: dsa: lantiq: Allow special tags only on CPU port

2019-05-01 Thread Hauke Mehrtens
Allow the special tag in ingress only on the CPU port and not on all ports. A packet with a special tag could circumvent the hardware forwarding and should only be allowed on the CPU port where Linux controls the port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 6

[PATCH 3/5] net: dsa: lantiq: Add VLAN aware bridge offloading

2019-05-01 Thread Hauke Mehrtens
port is already in a bridge, this would make the driver more complicated. The VLANs are only defined on bridge entries, so we will not add anything into the hardware when the port joins a bridge if it is doing VLAN filtering, but only when an allowed VLAN is added. Signed-off-by: Hauke Mehrtens

[PATCH 0/5] net: dsa: lantiq: Add bridge offloading

2019-05-01 Thread Hauke Mehrtens
This adds bridge offloading for the Intel / Lantiq GSWIP 2.1 switch. Hauke Mehrtens (5): net: dsa: lantiq: Allow special tags only on CPU port net: dsa: lantiq: Add VLAN unaware bridge offloading net: dsa: lantiq: Add VLAN aware bridge offloading net: dsa: lantiq: Add fast age function

[PATCH] MIPS: lantiq: Remove separate GPHY Firmware loader

2019-02-22 Thread Hauke Mehrtens
("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Hauke Mehrtens --- This should go through the MIPS tree, but any other tree should also be fine, I am not expecting any merge conflicts. .../bindings/mips/lantiq/rcu-gphy.txt | 36 --- .../devicetree/bin

[PATCH] net: lantiq: Do not use eth_change_mtu()

2019-02-22 Thread Hauke Mehrtens
eth_change_mtu() is not needed any more, the networking subsystem will call it automatically when this callback is not implemented. Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx200.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/lantiq_xrx200.c b

[PATCH] net: dsa: lantiq: Add GPHY firmware files

2019-02-22 Thread Hauke Mehrtens
This adds the file names of the FW files which this driver handles into the module description. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index

[PATCH] net: dsa: Remove documentation for port_fdb_prepare

2019-02-22 Thread Hauke Mehrtens
This callback was removed some time ago, also remove the documentation. Fixes: 1b6dd556c304 ("net: dsa: Remove prepare phase for FDB") Signed-off-by: Hauke Mehrtens --- Documentation/networking/dsa/dsa.txt | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) di

[PATCH] net: Fix for_each_netdev_feature on Big endian

2019-02-15 Thread Hauke Mehrtens
: fd867d51f ("net/core: generic support for disabling netdev features down stack") Cc: sta...@vger.kernel.org Signed-off-by: Hauke Mehrtens --- include/linux/netdev_features.h | 23 +-- net/core/dev.c | 4 ++-- 2 files changed, 23 insertions(+), 4 deletion

Re: [PATCH 3/3] net: dsa: lantiq_gswip: drop bogus drvdata check

2019-01-16 Thread Hauke Mehrtens
On 1/16/19 11:23 AM, Johan Hovold wrote: > The platform-device driver data is set on successful probe and will > never be NULL on remove (or we have much bigger problems). > > Signed-off-by: Johan Hovold Acked-by: Hauke Mehrtens > --- > drivers/net/dsa/lantiq_gswip.c

Re: [PATCH 2/3] net: dsa: lantiq_gswip: fix OF child-node lookups

2019-01-16 Thread Hauke Mehrtens
ntiq / Intel DSA driver for vrx200") > Cc: stable# 4.20 > Cc: Hauke Mehrtens > Signed-off-by: Johan Hovold Acked-by: Hauke Mehrtens > --- > drivers/net/dsa/lantiq_gswip.c | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) >

Re: [PATCH 1/3] net: dsa: lantiq_gswip: fix use-after-free on failed probe

2019-01-16 Thread Hauke Mehrtens
4fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") >> Cc: stable # 4.20 >> Cc: Hauke Mehrtens >> Signed-off-by: Johan Hovold >> --- >> drivers/net/dsa/lantiq_gswip.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >>

Re: [PATCH 1/3] net: dsa: lantiq_gswip: fix use-after-free on failed probe

2019-01-16 Thread Hauke Mehrtens
Cc: stable# 4.20 > Cc: Hauke Mehrtens > Signed-off-by: Johan Hovold Acked-by: Hauke Mehrtens > --- > drivers/net/dsa/lantiq_gswip.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gsw

[PATCH] net: dsa: lantiq: Fix path in MAINTAINERS file

2018-09-29 Thread Hauke Mehrtens
The MAINTAINERS file contained the wrong file name of the driver. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Reported-by: Joe Perches Signed-off-by: Hauke Mehrtens --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAI

[PATCH] net: dsa: lantiq_gswip: Depend on HAS_IOMEM

2018-09-25 Thread Hauke Mehrtens
l DSA driver for vrx200") Reported-by: kbuild test robot Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index 7c09d8f195ae..71bb3aebded4 100644 --- a/drivers/net/d

[PATCH net-next 1/5] dt-bindings: net: lantiq,xrx200-net: Use lower case in hex

2018-09-15 Thread Hauke Mehrtens
: net: Add lantiq, xrx200-net DT bindings") Signed-off-by: Hauke Mehrtens Cc: devicet...@vger.kernel.org --- Documentation/devicetree/bindings/net/lantiq,xrx200-net.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/lantiq,xrx200-

[PATCH net-next 3/5] net: lantiq: lantiq_xrx200: Move clock prepare to probe function

2018-09-15 Thread Hauke Mehrtens
system and deactivating the switch and mac and later accessing some registers in the cleanup while the clocks are disabled. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Hauke Mehrtens --- drivers/net/ethernet/lantiq_xrx

[PATCH net-next 4/5] net: dsa: lantiq_gswip: Minor code style improvements

2018-09-15 Thread Hauke Mehrtens
Use one code block when returning because the interface type is unsupported and also check if some unsupported port gets configured. In addition fix a double the and use dsa_is_cpu_port() instated of manually getting the CPU port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c

[PATCH net-next 0/5] net: lantiq: Minor fixes for vrx200 and gswip

2018-09-15 Thread Hauke Mehrtens
These are mostly minor fixes to problems addresses in the latests round of the review of the original series adding these driver, which were not applied before the patches got merged into net-next. In addition it fixes a data bus error on poweroff. Hauke Mehrtens (5): dt-bindings: net: lantiq

[PATCH net-next 5/5] net: dsa: tag_gswip: Add gswip to dsa_tag_protocol_to_str()

2018-09-15 Thread Hauke Mehrtens
The gswip tag was missing in the dsa_tag_protocol_to_str() function, add it. Fixes: 7969119293f5 ("net: dsa: Add Lantiq / Intel GSWIP tag support") Signed-off-by: Hauke Mehrtens --- net/dsa/dsa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/dsa.c b/net/dsa/d

[PATCH net-next 2/5] dt-bindings: net: dsa: lantiq,xrx200-gswip: Fix minor style fixes

2018-09-15 Thread Hauke Mehrtens
also work, this just adds some empty address space. * Change the reg size of the gphy-fw node Fixes: 86ce2bc73c7a ("dt-bindings: net: dsa: Add lantiq, xrx200-gswip DT bindings") Signed-off-by: Hauke Mehrtens Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/net/dsa/lantiq

Re: [PATCH net-next] net: lantiq: Fix return value check in xrx200_probe()

2018-09-15 Thread Hauke Mehrtens
ntel VRX200 Ethernet driver") > Signed-off-by: Wei Yongjun Acked-by: Hauke Mehrtens > --- > drivers/net/ethernet/lantiq_xrx200.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/lantiq_xrx200.c > b/drivers/net/ethernet/l

Re: [PATCH net-next] net: dsa: gswip: Fix copy-paste error in gswip_gphy_fw_probe()

2018-09-15 Thread Hauke Mehrtens
ot;) > Signed-off-by: Wei Yongjun Acked-by: Hauke Mehrtens > --- > drivers/net/dsa/lantiq_gswip.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c > index 9c28d0b..9c10570 100644

Re: [PATCH net-next] net: dsa: gswip: Fix return value check in gswip_probe()

2018-09-15 Thread Hauke Mehrtens
SA driver for vrx200") > Signed-off-by: Wei Yongjun Acked-by: Hauke Mehrtens > --- > drivers/net/dsa/lantiq_gswip.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c >

Re: [PATCH v2 net] MIPS: lantiq: dma: add dev pointer

2018-09-11 Thread Hauke Mehrtens
On 09/10/2018 02:45 PM, Andrew Lunn wrote: > On Sun, Sep 09, 2018 at 09:26:23PM +0200, Hauke Mehrtens wrote: >> dma_zalloc_coherent() now crashes if no dev pointer is given. >> Add a dev pointer to the ltq_dma_channel structure and fill it in the >> driver using it. &

Re: [PATCH v3 net-next 3/6] dt-bindings: net: Add lantiq,xrx200-net DT bindings

2018-09-11 Thread Hauke Mehrtens
On 09/10/2018 02:53 PM, Andrew Lunn wrote: > On Sun, Sep 09, 2018 at 10:16:44PM +0200, Hauke Mehrtens wrote: >> This adds the binding for the PMAC core between the CPU and the GSWIP >> switch found on the xrx200 / VR9 Lantiq / Intel SoC. >> >> Signed-off-by: Hau

Re: [PATCH v3 net-next 5/6] dt-bindings: net: dsa: Add lantiq,xrx200-gswip DT bindings

2018-09-11 Thread Hauke Mehrtens
On 09/11/2018 12:01 AM, Rob Herring wrote: > On Sun, Sep 09, 2018 at 10:20:27PM +0200, Hauke Mehrtens wrote: >> This adds the binding for the GSWIP (Gigabit switch) core found in the >> xrx200 / VR9 Lantiq / Intel SoC. >> >> This part takes care of the switch, MDIO b

[PATCH v3 net-next 6/6] net: dsa: Add Lantiq / Intel DSA driver for vrx200

2018-09-09 Thread Hauke Mehrtens
-off-by: Hauke Mehrtens --- MAINTAINERS |2 + arch/mips/lantiq/xway/sysctrl.c |8 +- drivers/net/dsa/Kconfig |8 + drivers/net/dsa/Makefile|1 + drivers/net/dsa/lantiq_gswip.c | 1169 +++ drivers/net/dsa

[PATCH v3 net-next 5/6] dt-bindings: net: dsa: Add lantiq,xrx200-gswip DT bindings

2018-09-09 Thread Hauke Mehrtens
This adds the binding for the GSWIP (Gigabit switch) core found in the xrx200 / VR9 Lantiq / Intel SoC. This part takes care of the switch, MDIO bus, and loading the FW into the embedded GPHYs. Signed-off-by: Hauke Mehrtens Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/net/dsa

[PATCH v3 net-next 1/6] MIPS: lantiq: Do not enable IRQs in dma open

2018-09-09 Thread Hauke Mehrtens
When a DMA channel is opened the IRQ should not get activated automatically, this allows it to pull data out manually without the help of interrupts. This is needed for a workaround in the vrx200 Ethernet driver. Signed-off-by: Hauke Mehrtens Acked-by: Paul Burton --- arch/mips/lantiq/xway

[PATCH v3 net-next 2/6] net: dsa: Add Lantiq / Intel GSWIP tag support

2018-09-09 Thread Hauke Mehrtens
the Ethernet header. This was tested with GSWIP 2.1 found in the VRX200 SoCs, other GSWIP versions use slightly different PMAC special tags. Signed-off-by: Hauke Mehrtens Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- MAINTAINERS | 6 +++ include/net/dsa.h | 1 + net

[PATCH v3 net-next 3/6] dt-bindings: net: Add lantiq,xrx200-net DT bindings

2018-09-09 Thread Hauke Mehrtens
This adds the binding for the PMAC core between the CPU and the GSWIP switch found on the xrx200 / VR9 Lantiq / Intel SoC. Signed-off-by: Hauke Mehrtens Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/net/lantiq,xrx200-net.txt | 21 + 1 file changed, 21

[PATCH v3 net-next 4/6] net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver

2018-09-09 Thread Hauke Mehrtens
later. Signed-off-by: Hauke Mehrtens --- MAINTAINERS | 1 + arch/mips/lantiq/xway/sysctrl.c | 6 +- drivers/net/ethernet/Kconfig | 7 + drivers/net/ethernet/Makefile| 1 + drivers/net/ethernet/lantiq_xrx200.c | 564

[PATCH v3 net-next 0/6] Add support for Lantiq / Intel vrx200 network

2018-09-09 Thread Hauke Mehrtens
* use readx_poll_timeout function and ETIMEOUT error code * integrate GPHY firmware loading into DSA driver * renamed to NET_DSA_LANTIQ_GSWIP * removed some needed casts * added of_device_id.data information about the detected switch * fixed John's email address Hauke Mehrtens (6): MIPS:

[PATCH v2 net] MIPS: lantiq: dma: add dev pointer

2018-09-09 Thread Hauke Mehrtens
dma_zalloc_coherent() now crashes if no dev pointer is given. Add a dev pointer to the ltq_dma_channel structure and fill it in the driver using it. This fixes a bug introduced in kernel 4.19. Signed-off-by: Hauke Mehrtens --- no changes since v1. This should go into kernel 4.19 and I have

Re: [PATCH v2 net-next 7/7] net: dsa: Add Lantiq / Intel DSA driver for vrx200

2018-09-06 Thread Hauke Mehrtens
On 09/03/2018 09:54 PM, Florian Fainelli wrote: > > > On 9/1/2018 5:05 AM, Hauke Mehrtens wrote: >> This adds the DSA driver for the GSWIP Switch found in the VRX200 SoC. >> This switch is integrated in the DSL SoC, this SoC uses a GSWIP version >> 2.1, there are

Re: [PATCH v2 net-next 4/7] dt-bindings: net: Add lantiq,xrx200-net DT bindings

2018-09-04 Thread Hauke Mehrtens
On 09/03/2018 09:46 PM, Florian Fainelli wrote: > > > On 9/1/2018 5:04 AM, Hauke Mehrtens wrote: >> This adds the binding for the PMAC core between the CPU and the GSWIP >> switch found on the xrx200 / VR9 Lantiq / Intel SoC. >> >> Signed-off-by: Hauke Mehrtens

Re: [PATCH v2 net-next 5/7] net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver

2018-09-04 Thread Hauke Mehrtens
Hi Florian, Thanks for the review. On 09/03/2018 09:24 PM, Florian Fainelli wrote: > > > On 9/1/2018 5:04 AM, Hauke Mehrtens wrote: >> This drives the PMAC between the GSWIP Switch and the CPU in the VRX200 >> SoC. This is currently only the very basic version of t

Re: [PATCH v2 net-next 7/7] net: dsa: Add Lantiq / Intel DSA driver for vrx200

2018-09-01 Thread Hauke Mehrtens
On 09/01/2018 02:05 PM, Hauke Mehrtens wrote: > This adds the DSA driver for the GSWIP Switch found in the VRX200 SoC. > This switch is integrated in the DSL SoC, this SoC uses a GSWIP version > 2.1, there are other SoCs using different versions of this IP block, but > this driver was

Re: [PATCH v2 net-next 1/7] MIPS: lantiq: dma: add dev pointer

2018-09-01 Thread Hauke Mehrtens
On 09/01/2018 04:57 PM, Andrew Lunn wrote: > On Sat, Sep 01, 2018 at 01:45:29PM +0200, Hauke Mehrtens wrote: >> dma_zalloc_coherent() now crashes if no dev pointer is given. >> Add a dev pointer to the ltq_dma_channel structure and fill it in the >> driver using it. &

[PATCH v2 net-next 7/7] net: dsa: Add Lantiq / Intel DSA driver for vrx200

2018-09-01 Thread Hauke Mehrtens
changed because the clocks are now used by a different driver. This should be cleaned up and a real common clock driver should provide the clocks instead. Signed-off-by: Hauke Mehrtens --- MAINTAINERS |2 + arch/mips/lantiq/xway/sysctrl.c |8 +- drivers/net/dsa/Kconfig

[PATCH v2 net-next 5/7] net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver

2018-09-01 Thread Hauke Mehrtens
later. Signed-off-by: Hauke Mehrtens --- MAINTAINERS | 1 + arch/mips/lantiq/xway/sysctrl.c | 6 +- drivers/net/ethernet/Kconfig | 7 + drivers/net/ethernet/Makefile| 1 + drivers/net/ethernet/lantiq_xrx200.c | 591

[PATCH v2 net-next 6/7] dt-bindings: net: dsa: Add lantiq,xrx200-gswip DT bindings

2018-09-01 Thread Hauke Mehrtens
This adds the binding for the GSWIP (Gigabit switch) core found in the xrx200 / VR9 Lantiq / Intel SoC. This part takes care of the switch, MDIO bus, and loading the FW into the embedded GPHYs. Signed-off-by: Hauke Mehrtens Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/net/dsa

[PATCH v2 net-next 4/7] dt-bindings: net: Add lantiq,xrx200-net DT bindings

2018-09-01 Thread Hauke Mehrtens
This adds the binding for the PMAC core between the CPU and the GSWIP switch found on the xrx200 / VR9 Lantiq / Intel SoC. Signed-off-by: Hauke Mehrtens Cc: devicet...@vger.kernel.org --- .../devicetree/bindings/net/lantiq,xrx200-net.txt | 21 + 1 file changed, 21

[PATCH v2 net-next 3/7] net: dsa: Add Lantiq / Intel GSWIP tag support

2018-09-01 Thread Hauke Mehrtens
the Ethernet header. This was tested with GSWIP 2.1 found in the VRX200 SoCs, other GSWIP versions use slightly different PMAC special tags. Signed-off-by: Hauke Mehrtens --- MAINTAINERS | 6 +++ include/net/dsa.h | 1 + net/dsa/Kconfig | 3 ++ net/dsa/Makefile| 1 + net

[PATCH v2 net-next 2/7] MIPS: lantiq: Do not enable IRQs in dma open

2018-09-01 Thread Hauke Mehrtens
When a DMA channel is opened the IRQ should not get activated automatically, this allows it to pull data out manually without the help of interrupts. This is needed for a workaround in the vrx200 Ethernet driver. Signed-off-by: Hauke Mehrtens Acked-by: Paul Burton --- arch/mips/lantiq/xway

[PATCH v2 net-next 1/7] MIPS: lantiq: dma: add dev pointer

2018-09-01 Thread Hauke Mehrtens
dma_zalloc_coherent() now crashes if no dev pointer is given. Add a dev pointer to the ltq_dma_channel structure and fill it in the driver using it. This fixes a bug introduced in kernel 4.19. Signed-off-by: Hauke Mehrtens --- arch/mips/include/asm/mach-lantiq/xway/xway_dma.h | 1 + arch/mips

[PATCH v2 net-next 0/7] Add support for Lantiq / Intel vrx200 network

2018-09-01 Thread Hauke Mehrtens
PHY firmware loading into DSA driver * renamed to NET_DSA_LANTIQ_GSWIP * removed some needed casts * added of_device_id.data information about the detected switch * fixed John's email address Hauke Mehrtens (7): MIPS: lantiq: dma: add dev pointer MIPS: lantiq: Do not enable IRQs in

Re: [PATCH 3/4] net: lantiq: Add Lantiq / Intel vrx200 Ethernet driver

2018-07-29 Thread Hauke Mehrtens
On 07/29/2018 06:40 PM, Andrew Lunn wrote: >> I am thinking about merging this into the switch driver, then we do not >> have to configure the dependency any more. > > Hi Hauke > > Are there any PHYs which are not part of the switch? The embedded PHYs are only connected to the switch in this SoC

Re: [PATCH 4/4] net: dsa: Add Lantiq / Intel DSA driver for vrx200

2018-07-29 Thread Hauke Mehrtens
On 07/25/2018 06:12 PM, Andrew Lunn wrote: >> LANTIQ MIPS ARCHITECTURE >> M: John Crispin >> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig >> index 2b81b97e994f..f1280aa3f9bd 100644 >> --- a/drivers/net/dsa/Kconfig >> +++ b/drivers/net/dsa/Kconfig >> @@ -23,6 +23,14 @@ config N

Re: [PATCH 3/4] net: lantiq: Add Lantiq / Intel vrx200 Ethernet driver

2018-07-29 Thread Hauke Mehrtens
On 07/29/2018 05:51 PM, Andrew Lunn wrote: > On Sun, Jul 29, 2018 at 04:03:10PM +0200, Hauke Mehrtens wrote: >> On 07/25/2018 05:28 PM, Andrew Lunn wrote: >>>> + /* Make sure the firmware of the embedded GPHY is loaded before, >>>> + * otherwise they will

Re: [PATCH 3/4] net: lantiq: Add Lantiq / Intel vrx200 Ethernet driver

2018-07-29 Thread Hauke Mehrtens
On 07/25/2018 05:28 PM, Andrew Lunn wrote: >> +/* Make sure the firmware of the embedded GPHY is loaded before, >> + * otherwise they will not be detectable on the MDIO bus. >> + */ >> +of_for_each_phandle(&it, err, np, "lantiq,phys", NULL, 0) { >> +phy_np = it.node; >>

Re: [PATCH 2/4] net: dsa: Add Lantiq / Intel GSWIP tag support

2018-07-29 Thread Hauke Mehrtens
On 07/25/2018 04:20 PM, Andrew Lunn wrote: > On Sat, Jul 21, 2018 at 09:13:56PM +0200, Hauke Mehrtens wrote: >> This handles the tag added by the PMAC on the VRX200 SoC line. >> >> The GSWIP uses internally a GSWIP special tag which is located after the >> Ethernet head

Re: [PATCH 1/4] MIPS: lantiq: Do not enable IRQs in dma open

2018-07-23 Thread Hauke Mehrtens
On 07/24/2018 02:19 AM, Paul Burton wrote: > Hi Hauke, > > On Sat, Jul 21, 2018 at 09:13:55PM +0200, Hauke Mehrtens wrote: >> When a DMA channel is opened the IRQ should not get activated >> automatically, this allows it to pull data out manually without the help >

  1   2   >