Re: [PATCH 4.14 stable v2 0/5] net: ip6 defrag: backport fixes

2019-04-25 Thread Lars Persson
On 4/23/19 7:48 PM, Peter Oskolkov wrote: Lars Persson reported that a label was unused in the previous version of this patchset, so I'm sending a v2 that fixes it. Sorry for the mess/v2. v2 changes: handle overlapping fragments the way it is done upstream. This is a backport of a

Re: [PATCH 4.14 stable 2/5] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-23 Thread Lars Persson
On Tue, Apr 23, 2019 at 12:29 AM Peter Oskolkov wrote: > > [ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] > > This is a refactoring patch: without changing runtime behavior, > it moves rbtree-related code from IPv4-specific files/functions > into .h/.c defrag files shared with IPv6 d

net: 4.9-stable regression in drivers/net/phy/micrel.c on 4.9.94

2018-04-17 Thread Lars Persson
Hi We run into a NULL pointer dereference crash when booting 4.9.94 on our Artpec-6 board with stmmac ethernet and Micrel KSZ9031 phy. I traced this to the patch d7ba3c00047d ("net: phy: micrel: Restore led_mode and clk_sel on resume") that was added in 4.9.94. This patch makes kszphy_resume() d

[PATCH net] stmmac: reset last TSO segment size after device open

2017-12-01 Thread Lars Persson
GMAC4") Signed-off-by: Lars Persson --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f63c2ddced3c..d7250539d0bd 100644 --- a/d

Re: [PATCH v2 1/2] synopsys: remove dwc_eth_qos driver

2017-01-10 Thread Lars Persson
> On 10 Jan 2017, at 15:52 , Joao Pinto wrote: > > This driver is no longer necessary since it was merged into stmmac. > > Signed-off-by: Joao Pinto > --- > changes v1 -> v2 (Lars Persson): > - Remove dwc_eth_qos from the Maintainers file > - Add po

Re: [PATCH 1/2] synopsys: remove dwc_eth_qos driver

2017-01-10 Thread Lars Persson
> On 10 Jan 2017, at 12:42 , Joao Pinto wrote: > > This driver is no longer necessary since it was merged into stmmac. > > Signed-off-by: Joao Pinto > --- > drivers/net/ethernet/Kconfig|1 - > drivers/net/ethernet/Makefile |1 - > drivers/net/ethernet/synops

Re: [PATCH v5 3/3] stmmac: adding new glue driver dwmac-dwc-qos-eth

2017-01-08 Thread Lars Persson
nopsys DWC Ethernet Quality-of-Service v4.10a driver"); > +MODULE_LICENSE("GPL v2"); > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 4e44f9c..00c0f8d 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -181,10 +181,19 @@ static int stmmac_dt_phy(struct plat_stmmacenet_data > *plat, > mdio = false; > } > > - /* If snps,dwmac-mdio is passed from DT, always register the MDIO */ > - for_each_child_of_node(np, plat->mdio_node) { > - if (of_device_is_compatible(plat->mdio_node, "snps,dwmac-mdio")) > + /* exception for dwmac-dwc-qos-eth glue logic */ > + if (of_device_is_compatible(np, "snps,dwc-qos-ethernet-4.10")) { > + plat->mdio_node = of_get_child_by_name(np, "mdio"); > + } else { > + /** > + * If snps,dwmac-mdio is passed from DT, always register > + * the MDIO > + */ > + for_each_child_of_node(np, plat->mdio_node) { > + if (of_device_is_compatible(plat->mdio_node, > + "snps,dwmac-mdio")) > break; > + } > } > > if (plat->mdio_node) { > -- > 2.9.3 > Hi You can add my reviewed-by also on the v6 that fixes the merge error. Reviewed-by: Lars Persson - Lars

Re: [PATCH v3 3/3] stmmac: adding new glue driver dwmac-dwc-qos-eth

2017-01-05 Thread Lars Persson
> On 04 Jan 2017, at 17:22 , Joao Pinto wrote: > > This patch adds a new glue driver called dwmac-dwc-qos-eth which > was based in the dwc_eth_qos as is. To assure retro-compatibility a slight > tweak was also added to stmmac_platform. > > Signed-off-by: Joao Pinto > --- > changes v2 -> v3: >

Re: Synopsys Ethernet QoS

2016-12-13 Thread Lars Persson
updating the DTB together with the kernel, >>> we will simply move to using the start using the stmmac driver, >>> with stmmac's DT binding. >>> >>> However, I've noticed that NVIDIA has extended the DWC EQoS DT binding, >>> I don't how easy it w

Re: Synopsys Ethernet QoS Driver

2016-11-23 Thread Lars Persson
> 23 nov. 2016 kl. 12:11 skrev Joao Pinto : > > Hi Peppe and Lars, > >> On 23-11-2016 10:59, Giuseppe CAVALLARO wrote: >> Hello Joao, Lars. >> >>> On 11/22/2016 3:16 PM, Joao Pinto wrote: > Ok, it makes sense. > Just for curiosity the target setup is the following: > https://www.you

Re: Synopsys Ethernet QoS Driver

2016-11-21 Thread Lars Persson
> 21 nov. 2016 kl. 16:06 skrev Joao Pinto : > >> On 21-11-2016 14:25, Giuseppe CAVALLARO wrote: >>> On 11/21/2016 2:28 PM, Lars Persson wrote: >>> >>> >>>> 21 nov. 2016 kl. 13:53 skrev Giuseppe CAVALLARO : >>>> >>>>

Re: Synopsys Ethernet QoS Driver

2016-11-21 Thread Lars Persson
> 21 nov. 2016 kl. 13:53 skrev Giuseppe CAVALLARO : > > Hello Joao > >> On 11/21/2016 1:32 PM, Joao Pinto wrote: >> Hello, >> >>> On 21-11-2016 05:29, Rayagond Kokatanur wrote: On Sat, Nov 19, 2016 at 7:26 PM, Rabin Vincent wrote: > On Fri, Nov 18, 2016 at 02:20:27PM +, Joao Pint

[PATCH net] dwc_eth_qos: do not register semi-initialized device

2016-09-08 Thread Lars Persson
We move register_netdev() to the end of dwceqos_probe() to close any races where the netdev callbacks are called before the initialization has finished. Reported-by: Pavel Andrianov Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 38

Re: A potential bug in drivers/net/ethernet/synopsys/dwc_eth_qos.ko

2016-09-05 Thread Lars Persson
Hi Pavel, Thanks for the notification. I agree that we should register the device after all initialization has completed. A patch will be sent shortly. BR, Lars On 09/05/2016 10:26 AM, Pavel Andrianov wrote: Hi! There is a potential bug in drivers/net/ethernet/synopsys/dwc_eth_qos.ko. In

Re: [PATCH V3] dt: net: enhance DWC EQoS binding to support Tegra186

2016-09-02 Thread Lars Persson
uot;, "snps,dwc-qos-ethernet-4.10": +- None. + - "snps,dwc-qos-ethernet-4.10" (deprecated): +- None. Optional properties: - dma-coherent: Present if dma operations are coherent - mac-address: See ethernet.txt in the same directory - local-mac-address: See ethernet.txt in the same directory +- phy-reset-gpios: Phandle and specifier for any GPIO used to reset the PHY. + See ../gpio/gpio.txt. - snps,en-lpi: If present it enables use of the AXI low-power interface - snps,write-requests: Number of write requests that the AXI port can issue. It depends on the SoC configuration. @@ -52,6 +142,7 @@ ethernet2@4001 { reg = <0x4001 0x4000>; phy-handle = <&phy2>; phy-mode = "gmii"; + phy-reset-gpios = <&gpioctlr 43 GPIO_ACTIVE_LOW>; snps,en-tx-lpi-clockgating; snps,en-lpi; Acked-by: Lars Persson

Re: [PATCH V2] dt: net: enhance DWC EQoS binding to support Tegra186

2016-09-01 Thread Lars Persson
On 08/31/2016 11:48 PM, Stephen Warren wrote: On 08/31/2016 03:15 AM, Lars Persson wrote: On 08/30/2016 10:50 PM, Stephen Warren wrote: On 08/30/2016 01:01 PM, Rob Herring wrote: On Wed, Aug 24, 2016 at 03:20:46PM -0600, Stephen Warren wrote: The Synopsys DWC EQoS is a configurable IP

Re: [PATCH V2] dt: net: enhance DWC EQoS binding to support Tegra186

2016-08-31 Thread Lars Persson
On 08/30/2016 10:50 PM, Stephen Warren wrote: On 08/30/2016 01:01 PM, Rob Herring wrote: On Wed, Aug 24, 2016 at 03:20:46PM -0600, Stephen Warren wrote: From: Stephen Warren The Synopsys DWC EQoS is a configurable IP block which supports multiple options for bus type, clocking and reset str

Re: [PATCH] dt: net: enhance DWC EQoS binding to support Tegra186

2016-08-24 Thread Lars Persson
Hi Stephen, Nice to see the driver used in other chips. I have some comments below. Best Regards, Lars On 08/23/2016 10:47 PM, Stephen Warren wrote: From: Stephen Warren The Synopsys DWC EQoS is a configurable IP block which supports multiple options for bus type, clocking and reset struct

[PATCH net] dwc_eth_qos: fix interrupt enable race

2016-08-23 Thread Lars Persson
the interrupt enable to after we've enable NAPI and the reclaim tasklet. Fixes: cd5e41234729 ("dwc_eth_qos: do phy_start before resetting hardware") Signed-off-by: Rabin Vincent Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 17 ++--- 1 f

[PATCH net v3] net: sched: do not requeue a NULL skb

2016-04-11 Thread Lars Persson
known if later packets also will fail in the validate path. Fixes: 55a93b3ea780 ("qdisc: validate skb without holding lock") Signed-off-by: Lars Persson --- v3: After a discussion with Eric and Cong I went back to v1 and added the likely() for the common path. --- net/sched/sch_generic

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Lars Persson
On 04/11/2016 04:22 PM, Eric Dumazet wrote: On Mon, 2016-04-11 at 15:38 +0200, Lars Persson wrote: I though it would be prudent because the queue can be non-empty even for the case of skb=NULL. So should it be there in this patch, another patch or not at all ? Then maybe change return code

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Lars Persson
On 04/11/2016 03:23 PM, Eric Dumazet wrote: On Mon, 2016-04-11 at 08:24 +0200, Lars Persson wrote: A failure in validate_xmit_skb_list() triggered an unconditional call to dev_requeue_skb with skb=NULL. This slowly grows the queue discipline's qlen count until all traffic through the

[PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-10 Thread Lars Persson
edule call conditional to avoid scheduling an empty queue. Fixes: 55a93b3ea780 ("qdisc: validate skb without holding lock") Signed-off-by: Lars Persson --- net/sched/sch_generic.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/sched/sch_generi

[PATCH net] net: sched: do not requeue a NULL skb

2016-04-06 Thread Lars Persson
A failure in validate_xmit_skb_list() triggered an unconditional call to dev_requeue_skb with skb=NULL. This slowly grows the queue discipline's qlen count until all traffic through the queue stops. Fixes: 55a93b3ea780 ("qdisc: validate skb without holding lock") Signed-off-b

Re: [PATCH v3 00/17] stmmac: enhance driver performances and update the version

2016-03-01 Thread Lars Persson
Hi Peppe We look forward to seeing the patches for 4.10a support. I hope that we can work together to have one driver supporting all chips with the 4.x GMACs. - Lars On 02/29/2016 05:50 PM, Giuseppe CAVALLARO wrote: Gents on top of these patches, there is a new train to enhance the stmmac

[PATCH net 4/5] dwc_eth_qos: use DWCEQOS_MSG_DEFAULT

2016-02-29 Thread Lars Persson
Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c index 3ca2d5c..6897c1d 100644 --- a/drivers/net/ethernet/synopsys

[PATCH net 1/5] dwc_eth_qos: fix race condition in dwceqos_start_xmit

2016-02-29 Thread Lars Persson
From: Rabin Vincent The xmit handler and the tx_reclaim tasklet had a race on the tx_free variable which could lead to a tx timeout if tx_free was updated after the tx complete interrupt. Signed-off-by: Rabin Vincent Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c

[PATCH net 2/5] dwc_eth_qos: release descriptors outside netif_tx_lock

2016-02-29 Thread Lars Persson
. Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c index 926db2d..53d48c0 100644 --- a/drivers/net

[PATCH net 5/5] dwc_eth_qos: do phy_start before resetting hardware

2016-02-29 Thread Lars Persson
o plug the race with the phy state machine we defer link speed setting until the hardware init has finished. Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/drivers/net/etherne

[PATCH net 3/5] dwc_eth_qos: use GFP_KERNEL in dma_alloc_coherent()

2016-02-29 Thread Lars Persson
From: Rabin Vincent Since we are in non-atomic context here we can pass GFP_KERNEL to dma_alloc_coherent(). This enables use of the CMA. Signed-off-by: Rabin Vincent Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH net 0/5] dwc_eth_qos: stability fixes and support for CMA

2016-02-29 Thread Lars Persson
. The memory allocation was improved to support use of the CMA as DMA allocator backend. Lars Persson (2): dwc_eth_qos: release descriptors outside netif_tx_lock dwc_eth_qos: do phy_start before resetting hardware Rabin Vincent (3): dwc_eth_qos: fix race condition in dwceqos_start_xmit

Re: [PATCH] ethernet: synopsys: SYNOPSYS_DWC_ETH_QOS should depend on HAS_DMA

2015-09-04 Thread Lars Persson
s/dwc_eth_qos.ko] > undefined! > ERROR: "dma_map_single" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] > undefined! > > Signed-off-by: Geert Uytterhoeven Acked-by: Lars Persson > --- > drivers/net/ethernet/synopsys/Kconfig | 2 +- > 1 file changed, 1 i

[PATCH net-next 1/4] dwc_eth_qos: Add Synopsys DWC Ethernet QoS bindings

2015-07-28 Thread Lars Persson
Add device tree binding documentation for the Synopsys DWC Ethernet QoS driver supporting revision 4.10a of the hardware IP. Signed-off-by: Lars Persson --- .../bindings/net/snps,dwc-qos-ethernet.txt | 75 ++ 1 file changed, 75 insertions(+) create mode 100644

[PATCH net-next 4/4] dwc_eth_qos: Add maintainer info

2015-07-28 Thread Lars Persson
Add maintainer information for the Synopsys DWC Ethernet QOS driver. Signed-off-by: Lars Persson --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a226416..0c78766 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8903,6 +8903,13 @@ F

[PATCH net-next 2/4] dwc_eth_qos: Add support for Synopsys DWC Ethernet QoS

2015-07-28 Thread Lars Persson
This patch adds a platform driver for the new generation of the gigabit ethernet IP from Synopsys. It is developed for version 4.10a of the IP core. Signed-off-by: Lars Persson --- drivers/net/ethernet/synopsys/Kconfig | 27 + drivers/net/ethernet/synopsys/Makefile |5

[PATCH net-next 0/4] dwc_eth_qos: Add support for Synopsys DWC Ethernet QoS

2015-07-28 Thread Lars Persson
total available feature set. Currently it supports: * TSO * Checksum offload for RX and TX. * Energy efficient ethernet. * GMII phy interface. * The statistics module. * Single RX and TX queue. Lars Persson (4): dwc_eth_qos: Add Synopsys DWC Ethernet QoS bindings dwc_eth_qos: Add support for

[PATCH net-next 3/4] dwc_eth_qos: Add the synopsys folder to the build system.

2015-07-28 Thread Lars Persson
Signed-off-by: Lars Persson --- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig index f3bb178..05aa759 100644 --- a/drivers/net/ethernet/Kconfig +++ b/drivers/net