Re: [PATCH] net: stmmac: Handle possible fixed-link with need_mdio_ids

2017-08-26 Thread Corentin Labbe
On Fri, Aug 25, 2017 at 09:45:23AM -0700, Florian Fainelli wrote: > On 08/25/2017 09:28 AM, Andrew Lunn wrote: > > On Fri, Aug 25, 2017 at 04:42:08PM +0200, Corentin Labbe wrote: > >> In case of fixed link, there are no mdio node. > >> This patch add a test for fixed-l

[PATCH v4 3/5] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-08-26 Thread Corentin Labbe
This patch add documentation about the MDIO switch used on sun8i-h3-emac for integrated PHY. Signed-off-by: Corentin Labbe --- .../devicetree/bindings/net/dwmac-sun8i.txt| 117 - 1 file changed, 112 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree

[PATCH v4 5/5] net: stmmac: Register parent MDIO in case of fake mdio-mux

2017-08-26 Thread Corentin Labbe
In case of a fake MDIO switch/mux (like Allwinner H3), the registered MDIO node should be the parent of the PHY. Otherwise of_phy_connect will fail. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH v4 0/5] net: stmmac: Detect PHY location with phy-is-integrated

2017-08-26 Thread Corentin Labbe
h since another same patch was already merged - Moved phy-is-integrated from SoC dtsi to final board DT. Corentin Labbe (5): net: stmmac: Handle possible fixed-link with need_mdio_ids ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac dt-bindings: net: dwmac-sun

[PATCH v4 4/5] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-26 Thread Corentin Labbe
property. Since the internal_phy variable does not need anymore to contain the xMII mode used by the internal PHY, it is still used for knowing the presence of an internal PHY, so it is modified to a boolean soc_has_internal_phy. Signed-off-by: Corentin Labbe Acked-by: Chen-Yu Tsai Reviewed-by

[PATCH v4 2/5] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-08-26 Thread Corentin Labbe
Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 22 +- 1 file changed, 21 insertions

[PATCH v4 1/5] net: stmmac: Handle possible fixed-link with need_mdio_ids

2017-08-26 Thread Corentin Labbe
In case of fixed link, there are no mdio node. This patch add a test for fixed-link for bypassing MDIO node register that match need_mdio_ids. Note that this do not change behaviour for MDIO snps,dwmac-mdio nodes. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac

Re: [PATCH v4 4/5] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-29 Thread Corentin Labbe
On Sat, Aug 26, 2017 at 11:20:51PM +0200, Andrew Lunn wrote: > Hi Corentin > > I think we have now all agreed this is an mdio-mux, plus it is also an > MII mux. We should represent that in device tree. This patchset does > this. However, as it is now, the mux structure in DT is ignored. All > it d

Re: [PATCH] net: stmmac: dwmac-sun8i: Use reset exclusive

2017-08-30 Thread Corentin Labbe
On Fri, Aug 25, 2017 at 07:12:33PM +0200, Maxime Ripard wrote: > On Fri, Aug 25, 2017 at 05:17:33PM +0200, Corentin Labbe wrote: > > On Fri, Aug 25, 2017 at 04:48:32PM +0200, Maxime Ripard wrote: > > > On Fri, Aug 25, 2017 at 04:38:05PM +0200, Corentin Labbe wrote: > > >

[PATCH 5/5] net: mdio-mux: fix unbalanced put_device

2017-08-30 Thread Corentin Labbe
nch of "if (mux_bus)". Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 9a889a529b9c..0b7d3d30ae97 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/

[PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers

2017-08-30 Thread Corentin Labbe
This patch fix an old information that mdio-mux-mmioreg can only handle 8bit registers. This is not true anymore. Signed-off-by: Corentin Labbe --- drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index

[PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message

2017-08-30 Thread Corentin Labbe
This patch fix checkpatch warning about unnecessary 'out of memory' message. Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index b18ad7082b88..5e08e8946

[PATCH 0/5] net: mdio-mux: Misc fix

2017-08-30 Thread Corentin Labbe
Hello This patch series fix minor problems found when working on the dwmac-sun8i syscon mdio-mux. Regards Corentin Labbe (5): net: mdio-mux: Fix NULL Comparison style net: mdio-mux: Remove unnecessary 'out of memory' message net: mdio-mux: printing driver version is useless

[PATCH 3/5] net: mdio-mux: printing driver version is useless

2017-08-30 Thread Corentin Labbe
Remove the driver version information because this information is not useful in an upstream kernel driver. Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 5e08e89465c5

[PATCH 1/5] net: mdio-mux: Fix NULL Comparison style

2017-08-30 Thread Corentin Labbe
This patch fix checkpatch warning about NULL Comparison style. Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 942ceaf3fd3f..b18ad7082b88 100644

Re: [PATCH 0/5] net: mdio-mux: Misc fix

2017-09-01 Thread Corentin Labbe
On Wed, Aug 30, 2017 at 09:01:19PM +0200, Andrew Lunn wrote: > On Wed, Aug 30, 2017 at 07:46:46PM +0200, Corentin Labbe wrote: > > Hello > > > > This patch series fix minor problems found when working on the > > dwmac-sun8i syscon mdio-mux. > > Hi Corentin

[PATCH v2 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message

2017-09-01 Thread Corentin Labbe
This patch fix checkpatch warning about unnecessary 'out of memory' message. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn --- drivers/net/phy/mdio-mux.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index b1

[PATCH v2 5/5] net: mdio-mux: fix unbalanced put_device

2017-09-01 Thread Corentin Labbe
nch of "if (mux_bus)". Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 282828551bdd..6f75e9f27fed 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/

[PATCH v2 3/5] net: mdio-mux: printing driver version is useless

2017-09-01 Thread Corentin Labbe
Remove the driver version information because this information is not useful in an upstream kernel driver. Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index

[PATCH v2 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers

2017-09-01 Thread Corentin Labbe
This patch fix an old information that mdio-mux-mmioreg can only handle 8bit registers. This is not true anymore. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn --- drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/Kconfig b

[PATCH v2 0/5] net: mdio-mux: Misc fix

2017-09-01 Thread Corentin Labbe
Hello This patch series fix minor problems found when working on the dwmac-sun8i syscon mdio-mux. Regards Changes since v1: - Removed obsolete comment about of_mdio_find_bus/put_device - removed more DRV_VERSION Corentin Labbe (5): net: mdio-mux: Fix NULL Comparison style net: mdio-mux

[PATCH v2 1/5] net: mdio-mux: Fix NULL Comparison style

2017-09-01 Thread Corentin Labbe
This patch fix checkpatch warning about NULL Comparison style. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn --- drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index

[PATCH 0/1] net: mdio-mux: add mdio_mux parameter to mdio_mux_init()

2017-09-04 Thread Corentin Labbe
acceptable. Regards Corentin Labbe (1): net: mdio-mux: add mdio_mux parameter to mdio_mux_init() drivers/net/phy/mdio-mux-bcm-iproc.c | 2 +- drivers/net/phy/mdio-mux-gpio.c | 2 +- drivers/net/phy/mdio-mux-mmioreg.c | 3 ++- drivers/net/phy/mdio-mux.c | 7 --- include/linux/

[PATCH 1/1] net: mdio-mux: add mdio_mux parameter to mdio_mux_init()

2017-09-04 Thread Corentin Labbe
direct owning device. For example a mdio-mux which is a subnode of a real device. Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux-bcm-iproc.c | 2 +- drivers/net/phy/mdio-mux-gpio.c | 2 +- drivers/net/phy/mdio-mux-mmioreg.c | 3 ++- drivers/net/phy/mdio-mux.c | 7

[PATCH] netxen: remove writeq/readq function definitions

2017-06-02 Thread Corentin Labbe
Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which already have them. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/net/ethernet/qlogic

Re: [linux-sunxi] [PATCH] net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted

2017-06-05 Thread Corentin Labbe
all able to successfully probe the > EMAC without cable plugged and then use the connection after a cable is > hot-plugged in. > > Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i") > Signed-off-by: Icenowy Zheng Thanks for the fix. Tested-by: Corentin Labbe Sin

[PATCH v2 18/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on the BananaPi M64

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner

[PATCH v2 20/20] ARM: sunxi: Enable dwmac-sun8i driver on multi_v7_defconfig

2017-03-14 Thread Corentin Labbe
Enable the dwmac-sun8i driver in the multi_v7 default configuration Signed-off-by: Corentin Labbe --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 36c1b39..380919f 100644

[PATCH v2 13/20] ARM: dts: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high

2017-03-14 Thread Corentin Labbe
On the Orange Pi PC Plus, the polarity of the LEDs on the RJ45 Ethernet port were changed from active low to active high. Signed-off-by: Chen-Yu Tsai Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch

[PATCH v2 12/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI plus. It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 35 1 file changed

[PATCH v2 06/20] ARM: dts: sunxi-h3-h5: Add dt node for the syscon control module

2017-03-14 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner H3/H5 Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock.. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 6 ++ 1 file changed, 6

[PATCH v2 07/20] ARM: dts: sunxi-h3-h5: add dwmac-sun8i ethernet driver

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 33

[PATCH v2 08/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Banana Pi M2+

2017-03-14 Thread Corentin Labbe
From: LABBE Corentin The dwmac-sun8i hardware is present on the Banana Pi M2+ It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 37

[PATCH v2 09/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange PI PC

2017-03-14 Thread Corentin Labbe
From: LABBE Corentin The dwmac-sun8i hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm

[PATCH v2 03/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-03-14 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe --- .../devicetree/bindings/net/dwmac-sun8i.txt| 77 ++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v2 02/20] net-next: stmmac: add optional setup function

2017-03-14 Thread Corentin Labbe
Instead of ading more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- include/linux/stmmac.h| 3

[PATCH v2 00/20] net-next: stmmac: add dwmac-sun8i ethernet driver

2017-03-14 Thread Corentin Labbe
. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v1: - added TX/RX delay units - splitted syscon documentation in its own patch - regulator is now disabled after clk_prepare_enable(gmac->tx_clk) error - Fixed a memory leak on mac_device_info - Use now generic pin config

[PATCH v2 01/20] net-next: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr

2017-03-14 Thread Corentin Labbe
Thoses symbol will be needed for the dwmac-sun8i ethernet driver. For letting it to be build as module, they need to be exported. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH v2 04/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner syscon

2017-03-14 Thread Corentin Labbe
Signed-off-by: Corentin Labbe --- .../devicetree/bindings/misc/allwinner,syscon.txt | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/allwinner,syscon.txt diff --git a/Documentation/devicetree/bindings/misc/allwinner

[PATCH v2 19/20] ARM: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-03-14 Thread Corentin Labbe
From: LABBE Corentin Enable the dwmac-sun8i driver in the sunxi default configuration Signed-off-by: Corentin Labbe --- arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 5cd5dd70

[PATCH v2 15/20] ARM64: dts: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-03-14 Thread Corentin Labbe
level. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 +++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 3b09af2..57d69e5 100644

[PATCH v2 17/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64 plus

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 plus. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts

[PATCH v2 16/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 It uses an external PHY via RMII. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b

[PATCH v2 14/20] ARM64: dts: sun50i-a64: Add dt node for the syscon control module

2017-03-14 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner A64. Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++ 1 file changed

[PATCH v2 05/20] net-next: stmmac: Add dwmac-sun8i

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i is a heavy hacked version of stmmac hardware by allwinner. In fact the only common part is the descriptor management and the first register function. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/Kconfig| 11 + drivers/net/ethernet/stmicro/stmmac

[PATCH v2 10/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi 2

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI 2. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi

[PATCH v2 11/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange PI One

2017-03-14 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3

[PATCH] netfilter: logging copyrights is useless

2017-03-15 Thread Corentin Labbe
Logging copyrights does not add any useful information in logs. This patch remove such logging Signed-off-by: Corentin Labbe --- net/ipv4/netfilter/arp_tables.c | 1 - net/ipv4/netfilter/ip_tables.c | 1 - net/ipv6/netfilter/ip6_tables.c | 1 - net/netfilter/nf_tables_api.c | 1 - net

linux-next-20170320 break stmmac on dwmac-sunxi

2017-03-20 Thread Corentin Labbe
Hello Just pushed next-20170320 to my boards and stmmac stop working on both intree dwmac-sunxi and my dev dwmac-sun8i. It seems that interrupts never fire, and transmit queue timeout. I will try to bisect this problem but perhaps other people could try to reproduce it. Regards Corentin Labbe

Re: linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB)

2017-03-21 Thread Corentin Labbe
On Tue, Mar 21, 2017 at 10:13:08AM +, Joao Pinto wrote: > > Hi Heiner and Corentin, > > Às 9:58 PM de 3/20/2017, Heiner Kallweit escreveu: > > As reported by Corentin Labbe before: > > stmmac in the latest next kernel is broken also on meson8b. > > > >

Re: [v5,net-next,2/9] net: stmmac: configure mtl rx and tx algorithms

2017-03-21 Thread Corentin Labbe
On Tue, Mar 21, 2017 at 02:10:47PM +, Joao Pinto wrote: > ++Adding Corentin > > Às 2:08 PM de 3/21/2017, Thierry Reding escreveu: > > On Tue, Mar 21, 2017 at 01:58:36PM +, Joao Pinto wrote: > >> Às 12:24 PM de 3/21/2017, Thierry Reding escreveu: > >>> On Tue, Mar 21, 2017 at 12:02:03PM +00

Re: [PATCH v3 net-next] net: stmmac: fix dma operation mode config for older versions

2017-03-22 Thread Corentin Labbe
dma op mode config for multiple > queues") > Reported-by: Corentin Labbe > Reviewed-by: Thierry Reding > Signed-off-by: Joao Pinto > --- > changes v2->v3: > - Commit ID and title should be under a 'Fixes' tag > changes v1->v2: > - commit id did not

Re: [PATCH 2/3] net: stmmac: Restore DT backwards-compatibility

2017-03-22 Thread Corentin Labbe
snps,mtl-tx-config properties, we fall back > + * to one RX and TX queues each. > + */ > + plat->rx_queues_to_use = 1; > + plat->tx_queues_to_use = 1; > + > rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0); > if (!rx_node

[PATCH] net: stmmac: add set_mac to the stmmac_ops

2017-03-22 Thread Corentin Labbe
call to this pointer. Since dwmac4_ops is const, set_mac cannot be modified after, and so dwmac4_ops is duplioacted like dwmac4_dma_ops. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 1

stmmac: Performance regression after commit aff3d9eff843 "net: stmmac: enable multiple buffers"

2017-03-23 Thread Corentin Labbe
lost after. Reverting aff3d9eff84399e433c4aca65a9bb236581bc082 fix the issue. I still try to found which part of this patch mades the performance lower. Regards Corentin Labbe

Re: stmmac: Performance regression after commit aff3d9eff843 "net: stmmac: enable multiple buffers"

2017-03-23 Thread Corentin Labbe
On Thu, Mar 23, 2017 at 10:12:18AM +, Joao Pinto wrote: > > Hi Corentin, > > Às 10:08 AM de 3/23/2017, Corentin Labbe escreveu: > > Hello > > > > Using next-20170323 produce a huge performance regression on my sunxi > > boards. > > On dwmac-sun8i,

[PATCH v2] net: stmmac: add set_mac to the stmmac_ops

2017-03-23 Thread Corentin Labbe
call to this pointer. Since dwmac4_ops is const, set_mac cannot be modified after, and so dwmac4_ops is duplioacted like dwmac4_dma_ops. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 1

Re: [v2,net-next,1/3] net: stmmac: enable multiple buffers

2017-03-24 Thread Corentin Labbe
q->priv_data; > > >> +u32 tx_count = priv->dma_cap.number_tx_queues; > > > > > > I changed this to priv->plat->tx_queues_to_use as used elsewhere to make > > > sure we don't try to clean up non-initialized TX queues. This seems to > > > solve an issue that would occasionally happen after the TX queue timed > > > out, but the fundamental issue is still there. > > > > Yes, you are correct. It should be priv->plat->tx_queues_to_use instead of > > "u32 > > tx_count = priv->dma_cap.number_tx_queues;"... sorry for that, but in my > > setup > > is the same value. Could you please make a patch for it? > > Yes, I can submit a patch for that. > > After some more testing I did get a couple (roughly 2 out of 10) > successful boots (I'm booting over NFS using the EQOS), and given that > this pointed towards something related to uninitialized data, I changed > all occurrences of kmalloc_array() with kcalloc() and that I've gotten > 10 successful reboots out of 10. > > I still can't pinpoint why this is now necessary since previously the > kmalloc_array() was working just fine. The only thing I can think of is > that we're not properly initializing all fields of the new queue > structures, since that's the only thing that's changed with this commit. > > I haven't investigated in detail yet, but from nothing so far has jumped > out at me. > > Thierry I have tried this change, but it made the situation worse on dwmac-sunxi (no network at all). Joao, perhaps it's time to revert the faulty (and very huge) patch and rework it by splitting at least in two: - adding RX queue / adding TX queue And more if possible (like just adding an unused queue parameter) or a patch just for adding stmmac_free_tx_buffers() for example. I think it will help to find where the problem is. And this time I will test them before applying:) Regards Corentin Labbe

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-25 Thread Corentin Labbe
On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: > For cores that have more than 1 TX queue configured, the kernel would crash, > since only one TX queue is permitted by default. > > Signed-off-by: Joao Pinto > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- > 1 file c

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Corentin Labbe
On Mon, Mar 27, 2017 at 10:04:57AM +0100, Joao Pinto wrote: > Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: > > On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: > >> For cores that have more than 1 TX queue configured, the kernel would > >> crash, >

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Corentin Labbe
On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: > Hi David, > > Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: > > On Fri, Mar 24, 2017 at 05:16:45PM +, Joao Pinto wrote: > >> For cores that have more than 1 TX queue configured, the kernel would > &g

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Corentin Labbe
On Mon, Mar 27, 2017 at 06:06:05PM +0100, Joao Pinto wrote: > Às 6:00 PM de 3/27/2017, Corentin Labbe escreveu: > > On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: > >> Hi David, > >> > >> Às 7:26 AM de 3/25/2017, Corentin Labbe escreveu: > >&

Re: [PATCH net-next 2/2] net: stmmac: fix number of tx queues in stmmac_poll

2017-03-27 Thread Corentin Labbe
On Mon, Mar 27, 2017 at 06:44:22PM +0100, Joao Pinto wrote: > Às 6:28 PM de 3/27/2017, David Miller escreveu: > > From: Corentin Labbe > > Date: Mon, 27 Mar 2017 19:00:58 +0200 > > > >> On Mon, Mar 27, 2017 at 04:26:48PM +0100, Joao Pinto wrote: > >>>

[PATCH] Revert "net: stmmac: enable multiple buffers"

2017-03-28 Thread Corentin Labbe
The commit aff3d9eff843 ("net: stmmac: enable multiple buffers") breaks numerous boards. while some patch exists for fixing some of it, dwmac-sunxi is still broken with it. Since this patch is very huge, it will be better to split it in smaller part. Signed-off-by: Corentin Labbe --

Re: [PATCH] Revert "net: stmmac: enable multiple buffers"

2017-03-28 Thread Corentin Labbe
On Tue, Mar 28, 2017 at 10:11:23PM -0700, David Miller wrote: > > Did you even test all 3 of Thierry's patches? > > I want you to do that before we revert. > Yes I tested all 3, dwmac-sunxi is still broken with them

Re: [PATCH] [net-next] stmmac: use netif_set_real_num_{rx,tx}_queues

2017-03-30 Thread Corentin Labbe
On Tue, Mar 28, 2017 at 06:01:05PM -0700, David Miller wrote: > From: Arnd Bergmann > Date: Tue, 28 Mar 2017 11:48:21 +0200 > > > A driver must not access the two fields directly but should instead use > > the helper functions to set the values and keep a consistent internal > > state: > > > > e

[PATCH] selftests: add a generic testsuite for ethernet device

2017-03-31 Thread Corentin Labbe
This patch add a generic testsuite for testing ethernet network device driver. Signed-off-by: Corentin Labbe --- tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/netdevice.sh | 185 +++ 2 files changed, 186 insertions(+), 1 deletion

[PATCH] selftests: add a generic testsuite for ethernet device

2017-03-31 Thread Corentin Labbe
, so that an already used network interface will not be modified (mac/IP address for example). Regards Corentin Labbe (1): selftests: add a generic testsuite for ethernet device tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/netdevice.sh | 185

[PATCH v3 20/20] ARM: sunxi: Enable dwmac-sun8i driver on multi_v7_defconfig

2017-04-03 Thread Corentin Labbe
Enable the dwmac-sun8i driver in the multi_v7 default configuration Signed-off-by: Corentin Labbe --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 2196206..0af325b 100644

[PATCH v3 17/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64 plus

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 plus. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe --- .../arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts

[PATCH v3 19/20] ARM: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-04-03 Thread Corentin Labbe
From: LABBE Corentin Enable the dwmac-sun8i driver in the sunxi default configuration Signed-off-by: Corentin Labbe --- arch/arm/configs/sunxi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 5cd5dd70

[PATCH v3 16/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the pine64 It uses an external PHY via RMII. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b

[PATCH v3 18/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on the BananaPi M64

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner

[PATCH v3 14/20] ARM64: dts: sun50i-a64: Add dt node for the syscon control module

2017-04-03 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner A64. Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++ 1 file changed

[PATCH v3 15/20] ARM64: dts: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-04-03 Thread Corentin Labbe
level. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 +++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1683a1f..dcf9ca4 100644

[PATCH v3 09/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange PI PC

2017-04-03 Thread Corentin Labbe
From: LABBE Corentin The dwmac-sun8i hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm

[PATCH v3 08/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Banana Pi M2+

2017-04-03 Thread Corentin Labbe
From: LABBE Corentin The dwmac-sun8i hardware is present on the Banana Pi M2+ It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 38

[PATCH v3 13/20] ARM: dts: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high

2017-04-03 Thread Corentin Labbe
On the Orange Pi PC Plus, the polarity of the LEDs on the RJ45 Ethernet port were changed from active low to active high. Signed-off-by: Chen-Yu Tsai Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch

[PATCH v3 07/20] ARM: dts: sunxi-h3-h5: add dwmac-sun8i ethernet driver

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 34

[PATCH v3 12/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI plus. It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 36 1 file changed

[PATCH v3 05/20] net: stmmac: Add dwmac-sun8i

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i is a heavy hacked version of stmmac hardware by allwinner. In fact the only common part is the descriptor management and the first register function. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/Kconfig| 11 + drivers/net/ethernet/stmicro/stmmac

[PATCH v3 10/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi 2

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI 2. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi

[PATCH v3 11/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange PI One

2017-04-03 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3

[PATCH v3 06/20] ARM: dts: sunxi-h3-h5: Add dt node for the syscon control module

2017-04-03 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner H3/H5 Only two register are present in this syscon and the only one useful is the one dedicated to EMAC clock.. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 6 ++ 1 file changed, 6

[PATCH v3 04/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner syscon

2017-04-03 Thread Corentin Labbe
Signed-off-by: Corentin Labbe --- .../devicetree/bindings/misc/allwinner,syscon.txt | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/allwinner,syscon.txt diff --git a/Documentation/devicetree/bindings/misc/allwinner

[PATCH v3 03/20] dt-bindings: net: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-04-03 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Allwinner dwmac-sun8i driver. Signed-off-by: Corentin Labbe Acked-by: Rob Herring --- .../devicetree/bindings/net/dwmac-sun8i.txt| 77 ++ 1 file changed, 77 insertions(+) create mode 100644

[PATCH v3 00/20] net-next: stmmac: add dwmac-sun8i ethernet driver

2017-04-03 Thread Corentin Labbe
. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v2: - corrected order of syscon compatible - added compatible = "ethernet-phy-ieee802.3-c22 to PHY - added set_mac function Changes since v1: - added TX/RX delay units - splitted syscon documentation in its own patch -

[PATCH v3 01/20] net: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr

2017-04-03 Thread Corentin Labbe
Thoses symbol will be needed for the dwmac-sun8i ethernet driver. For letting it to be build as module, they need to be exported. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH v3 02/20] net: stmmac: add optional setup function

2017-04-03 Thread Corentin Labbe
Instead of adding more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- include/linux/stmmac.h| 3

Re: [PATCH] selftests: add a generic testsuite for ethernet device

2017-04-03 Thread Corentin Labbe
On Fri, Mar 31, 2017 at 04:12:41PM +0200, Andrew Lunn wrote: > On Fri, Mar 31, 2017 at 02:57:52PM +0200, Corentin Labbe wrote: > > This patch add a generic testsuite for testing ethernet network device > > driver. > > > > Signed-off-by: Corentin Labbe > > ---

Re: [PATCH] selftests: add a generic testsuite for ethernet device

2017-04-04 Thread Corentin Labbe
On Mon, Apr 03, 2017 at 03:27:41PM +0200, Andrew Lunn wrote: > > By ifnum, you mean by the order that "ip link" gives ? > > I've not checked if it remains in order as interfaces are hot > plugged/unplugged. But i guess you are running tests direct after > boot, and unplugs/replugs are unlikely? >

[PATCH v2] selftests: add a generic testsuite for ethernet device

2017-04-04 Thread Corentin Labbe
This patch add a generic testsuite for testing ethernet network device driver. Signed-off-by: Corentin Labbe --- Changes since v1: - Test for starting master interface - Changed printing format to "RESULT: $netdev: line" - Use "ip link" to get device list tools/testing/se

Re: [PATCH v2] selftests: add a generic testsuite for ethernet device

2017-04-04 Thread Corentin Labbe
On Tue, Apr 04, 2017 at 04:43:19PM +0200, Niklas Cassel wrote: > On 04/04/2017 03:32 PM, Corentin Labbe wrote: > > This patch add a generic testsuite for testing ethernet network device > > driver. > > > > Signed-off-by: Corentin Labbe > > --- > > > &

Re: [PATCH 0/4 v2 net-next] net: stmmac: adding multiple buffers

2017-04-05 Thread Corentin Labbe
On Wed, Apr 05, 2017 at 05:43:00PM +0100, Joao Pinto wrote: > This patch adds multiple buffers to stmmac in a more fragmented > way, in order to make problem debug easier. > > I would kindly request to people to test this patch in their HWs in > order to check if everything's functional. Thank you

Re: [PATCH 0/4 v2 net-next] net: stmmac: adding multiple buffers

2017-04-07 Thread Corentin Labbe
s(+), 450 deletions(-) > > -- > 2.9.3 > For whole serie, Tested-by: Corentin Labbe

Re: [PATCH v3 16/20] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64

2017-04-07 Thread Corentin Labbe
On Mon, Apr 03, 2017 at 01:38:47PM +0200, Maxime Ripard wrote: > On Mon, Apr 03, 2017 at 11:14:40AM +0200, Corentin Labbe wrote: > > The dwmac-sun8i hardware is present on the pine64 > > It uses an external PHY via RMII. > > > > Signed-off-by: Corentin Labbe >

Re: [PATCH v3 02/20] net: stmmac: add optional setup function

2017-04-07 Thread Corentin Labbe
On Mon, Apr 03, 2017 at 02:32:33PM +0200, Giuseppe CAVALLARO wrote: > Hello Corentin > > On 4/3/2017 11:14 AM, Corentin Labbe wrote: > > Instead of adding more ifthen logic for adding a new mac_device_info > > setup function, it is easier to add a function pointer to th

Re: [PATCH v3 04/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner syscon

2017-04-07 Thread Corentin Labbe
On Mon, Apr 03, 2017 at 01:19:54PM +0200, Maxime Ripard wrote: > On Mon, Apr 03, 2017 at 11:14:28AM +0200, Corentin Labbe wrote: > > Signed-off-by: Corentin Labbe > > --- > > .../devicetree/bindings/misc/allwinner,syscon.txt | 19 > > +++ > &g

Re: Network driver "test suite"

2017-04-12 Thread Corentin Labbe
On Wed, Apr 12, 2017 at 10:16:17AM +1000, Benjamin Herrenschmidt wrote: > Hi folks ! > > Does anybody knows of an existing kind of automated "test suite" for a > network/ethernet driver ? > > IE. Something we could run both on the "tested" driver and a cross-over > "known good" peer (possibly th

Re: [PATCH v3 01/20] net: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr

2017-04-12 Thread Corentin Labbe
On Mon, Apr 03, 2017 at 02:39:03PM +0200, Giuseppe CAVALLARO wrote: > Hello Alex > > do you can check if this has to be done for ST platforms? > I do not remember that it was necessary when build as module so > I cannot expect this should be only for dwmac-sun8i. > > Regards > peppe > dwmac-sun

<    1   2   3   4   5   >