Re: set mtu size broken for dwmac-sun8i

2021-03-17 Thread Corentin Labbe
Le Wed, Mar 17, 2021 at 10:19:26AM +0100, Belisko Marek a écrit : > Hi, > > I'm hunting an issue when setting mtu failed for dwmac-sun8i driver. > Basically adding more debug shows that in stmmac_change_mtu > tx_fifo_size is 0 and in this case EINVAL is reported. Isaw there was > fix for similar d

Re: set mtu size broken for dwmac-sun8i

2021-03-17 Thread Corentin Labbe
Le Wed, Mar 17, 2021 at 12:37:48PM +0100, Belisko Marek a écrit : > On Wed, Mar 17, 2021 at 12:33 PM Corentin Labbe > wrote: > > > > Le Wed, Mar 17, 2021 at 10:19:26AM +0100, Belisko Marek a écrit : > > > Hi, > > > > > > I'm hunting an is

[PATCH] net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes

2021-03-19 Thread Corentin Labbe
-h5-nanopi-neo-plus2 Tested-on: sun50i-h6-pine-h64 Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i") Reported-by: Belisko Marek Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/eth

Re: dm9601: incorrect datasheet URL

2019-06-26 Thread Corentin Labbe
On Wed, Jun 26, 2019 at 04:12:48PM +0200, Arkadiusz Drabczyk wrote: > http://ptm2.cc.utu.fi/ftp/network/cards/DM9601/From_NET/DM9601-DS-P01-930914.pdf > is gone. In fact, document titled `DM9601-DS-P01-930914.pdf' is > nowhere to be found online these days but there is > http://pdf.datasheet.live/7

Re: [PATCH 2/3] ARM: sun8i: sunxi-h3-h5: add phy-is-integrated property to internal PHY

2017-08-16 Thread Corentin Labbe
On Fri, Aug 11, 2017 at 08:03:29AM -0700, Florian Fainelli wrote: > On August 11, 2017 6:25:26 AM PDT, Corentin Labbe > wrote: > >On Fri, Aug 11, 2017 at 04:22:11PM +0800, Chen-Yu Tsai wrote: > >> On Fri, Aug 11, 2017 at 4:19 PM, Corentin Labbe > >> wrote: > &

[PATCH v2 6/6] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-17 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 --- drivers/net/ethernet/stmicro

[PATCH v2 5/6] ARM: sun8i: orangepi-one: Set phy-is-integrated to the internal phy node

2017-08-17 Thread Corentin Labbe
This patch add the new phy-is-integrated property to the internal PHY node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi

[PATCH v2 4/6] ARM: sun8i: orangepi-2: Set phy-is-integrated to the internal phy node

2017-08-17 Thread Corentin Labbe
This patch add the new phy-is-integrated property to the internal PHY node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts

[PATCH v2 1/6] ARM: sun8i: orangepipc: Set phy-is-integrated to the internal phy node

2017-08-17 Thread Corentin Labbe
This patch add the new phy-is-integrated property to the internal PHY node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi

[PATCH v2 3/6] ARM: sun8i: nanopi-neo: Set phy-is-integrated to the internal phy node

2017-08-17 Thread Corentin Labbe
This patch add the new phy-is-integrated property to the internal PHY node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts

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

2017-08-17 Thread Corentin Labbe
ved phy-is-integrated from SoC dtsi to final board DT. Corentin Labbe (6): ARM: sun8i: orangepipc: Set phy-is-integrated to the internal phy node ARM: sun8i: beelink-x2: Set phy-is-integrated to the internal phy node ARM: sun8i: nanopi-neo: Set phy-is-integrated to the internal phy node ARM: sun8i:

[PATCH v2 2/6] ARM: sun8i: beelink-x2: Set phy-is-integrated to the internal phy node

2017-08-17 Thread Corentin Labbe
This patch add the new phy-is-integrated property to the internal PHY node. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts

Re: [PATCH v2 0/6] net: stmmac: Detect PHY location with phy-is-integrated

2017-08-18 Thread Corentin Labbe
On Thu, Aug 17, 2017 at 09:51:43AM +0200, Corentin Labbe wrote: > Hello > > The current way to find if the phy is internal is to compare DT phy-mode > and emac_variant/internal_phy. > But it will negate a possible future SoC where an external PHY use the > same phy mode than

[PATCH v3 4/4] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-08-18 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| 112 +++-- 1 file changed, 105 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree

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

2017-08-18 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 --- drivers/net/ethernet/stmicro

[PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-18 Thread Corentin Labbe
In case of a MDIO switch, 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 | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 1/4] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-08-18 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 | 28 +++- 1 file changed, 23

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

2017-08-18 Thread Corentin Labbe
a MDIO mux for creating distinction between integrated and external MDIO. - phy-is-integrated is not set in dtsi. Changes since v1: - Dropped phy-is-integrated documentation patch since another same patch was already merged - Moved phy-is-integrated from SoC dtsi to final board DT. Corentin Labbe

Re: [PATCH v3 4/4] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-08-19 Thread Corentin Labbe
On Sat, Aug 19, 2017 at 12:57:07AM +0800, Chen-Yu Tsai wrote: > On Fri, Aug 18, 2017 at 8:21 PM, Corentin Labbe > wrote: > > This patch add documentation about the MDIO switch used on sun8i-h3-emac > > for integrated PHY. > > > > Signed-off-by: Corentin Labbe > &

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-19 Thread Corentin Labbe
On Sat, Aug 19, 2017 at 01:05:21AM +0800, Chen-Yu Tsai wrote: > On Fri, Aug 18, 2017 at 8:21 PM, Corentin Labbe > wrote: > > In case of a MDIO switch, the registered MDIO node should be > > the parent of the PHY. Otherwise of_phy_connect will fail. > > > >

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-19 Thread Corentin Labbe
On Sat, Aug 19, 2017 at 10:38:36PM +0200, Andrew Lunn wrote: > On Sat, Aug 19, 2017 at 08:50:25PM +0200, Corentin Labbe wrote: > > On Sat, Aug 19, 2017 at 01:05:21AM +0800, Chen-Yu Tsai wrote: > > > On Fri, Aug 18, 2017 at 8:21 PM, Corentin Labbe > > > wrote: > >

[WARNING] stmmac: refcount_t: saturated; leaking memory

2017-08-21 Thread Corentin Labbe
Hello I got on all my stmmac boards the following warning: [12605.062840] [ cut here ] [12605.062956] WARNING: CPU: 0 PID: 15637 at /linux-next/lib/refcount.c:77 refcount_add_not_zero+0xa8/0xb8 [12605.062972] refcount_t: saturated; leaking memory. [12605.062987] Modules l

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Corentin Labbe
On Mon, Aug 21, 2017 at 04:23:21PM +0200, Andrew Lunn wrote: > > All muxes are mostly always represented the same way afaik, or do you > > want to simply introduce a new compatible / property? > > + mdio-mux { > + compatible = "allwinner,sun8i-h3-mdio-switch"; > +

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Corentin Labbe
On Tue, Aug 22, 2017 at 09:40:24AM -0700, Florian Fainelli wrote: > On 08/22/2017 08:39 AM, Chen-Yu Tsai wrote: > > On Mon, Aug 21, 2017 at 10:23 PM, Andrew Lunn wrote: > >>> All muxes are mostly always represented the same way afaik, or do you > >>> want to simply introduce a new compatible / pro

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Corentin Labbe
On Tue, Aug 22, 2017 at 11:35:01AM -0700, Florian Fainelli wrote: > On 08/22/2017 11:11 AM, Corentin Labbe wrote: > > On Tue, Aug 22, 2017 at 09:40:24AM -0700, Florian Fainelli wrote: > >> On 08/22/2017 08:39 AM, Chen-Yu Tsai wrote: > >>> On Mon, Aug 21, 2017 a

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-24 Thread Corentin Labbe
On Wed, Aug 23, 2017 at 09:31:53AM -0700, Florian Fainelli wrote: > On 08/23/2017 12:49 AM, Maxime Ripard wrote: > > Hi Florian, > > > > On Tue, Aug 22, 2017 at 11:35:01AM -0700, Florian Fainelli wrote: > > So I think what you are saying is either impossible or engineering-wise > > a very

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-24 Thread Corentin Labbe
On Thu, Aug 24, 2017 at 10:21:24AM +0200, Corentin Labbe wrote: > On Wed, Aug 23, 2017 at 09:31:53AM -0700, Florian Fainelli wrote: > > On 08/23/2017 12:49 AM, Maxime Ripard wrote: > > > Hi Florian, > > > > > > On Tue, Aug 22, 2017 at 11:35:01AM -0700, Florian

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

2017-08-25 Thread Corentin Labbe
The current dwmac_sun8i module cannot be rmmod/modprobe due to that the reset controller was not released when removed. This patch remove ambiguity, by using of_reset_control_get_exclusive and add the missing reset_control_put(). Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro

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

2017-08-25 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. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

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

2017-08-25 Thread Corentin Labbe
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: > > The current dwmac_sun8i module cannot be rmmod/modprobe due to that > > the reset controller was not released when removed. > > > > This

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

[PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering

2019-05-13 Thread Corentin Labbe
) Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index ac19bf62db70..9d3112beb19f 100644 --- a/drive

Re: [RFC net-next v2 00/14] net: stmmac: Selftests

2019-05-15 Thread Corentin Labbe
t; Cc: David S. Miller > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > Cc: Corentin Labbe > Cc: Andrew Lunn > > Corentin Labbe (1): > net: ethernet: stmmac: dwmac-sun8i: Enable control of loopback > > Jose Abreu (13): > net: stmmac: Add MAC loopback

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-10-08 Thread Corentin Labbe
On Thu, Sep 28, 2017 at 09:37:08AM +0200, Corentin Labbe wrote: > On Wed, Sep 27, 2017 at 04:02:10PM +0200, Andrew Lunn wrote: > > Hi Corentin > > > > > +Required properties for the mdio-mux node: > > > + - compatible = "mdio-mux" > > &g

[PATCH v7 06/10] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-10-18 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 | 33 +++-- 1 file changed, 27

[PATCH v7 10/10] of: mdio: Prevent of_mdiobus_register from scanning mdio-mux nodes

2017-10-18 Thread Corentin Labbe
] mdio_bus stmmac-0: scan phy mdio-mux at address 1 [...] [ 18.176420] mdio_bus stmmac-0: scan phy mdio-mux at address 30 [ 18.176452] mdio_bus stmmac-0: scan phy mdio-mux at address 31 Since mdio-mux nodes are not PHY, this patch a way to to not scan them. Signed-off-by: Corentin Labbe --- drivers

[PATCH v7 09/10] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-10-18 Thread Corentin Labbe
The Allwinner H3 SoC have two distinct MDIO bus, only one could be active at the same time. The selection of the active MDIO bus are done via some bits in the EMAC register of the system controller. This patch implement this MDIO switch via a custom MDIO-mux. Signed-off-by: Corentin Labbe

[PATCH v7 08/10] net: stmmac: snps,dwmac-mdio MDIOs are automatically registered

2017-10-18 Thread Corentin Labbe
d to be in need_mdio_ids. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 8a280b48e3a9..9e616da07

[PATCH v7 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-10-18 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| 139 +++-- 1 file changed, 127 insertions(+), 12 deletions(-) diff --git a/Documentation

[PATCH v7 04/10] net: stmmac: sun8i: Restore the compatibles

2017-10-18 Thread Corentin Labbe
sun8i: Remove the compatibles") Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 39

[PATCH v7 07/10] arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio

2017-10-18 Thread Corentin Labbe
stmmac bindings docs said that its mdio node must have compatible = "snps,dwmac-mdio"; Since dwmac-sun8i does not have any good reasons to not doing it, all their MDIO node must have it. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 1 + 1 file

[PATCH v7 03/10] arm64: dts: allwinner: Restore EMAC changes

2017-10-18 Thread Corentin Labbe
inner: Revert EMAC changes") Signed-off-by: Corentin Labbe --- .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 16 .../boot/dts/allwinner/sun50i-a64-pine64-plus.dts| 15 +++ arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 17

[PATCH v7 02/10] arm: dts: sunxi: Restore EMAC changes

2017-10-18 Thread Corentin Labbe
evert EMAC changes") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 9 arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 19 + arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 19 + arch/arm/boot/dts/sun8i

[PATCH v7 01/10] dt-bindings: net: Restore sun8i dwmac binding

2017-10-18 Thread Corentin Labbe
ot;dt-bindings: net: Revert sun8i dwmac binding") Signed-off-by: Corentin Labbe --- .../devicetree/bindings/net/dwmac-sun8i.txt| 84 ++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dwmac-sun8i.txt diff --git a/Doc

[PATCH v7 00/10] net: stmmac: dwmac-sun8i: Handle integrated PHY

2017-10-18 Thread Corentin Labbe
e another same patch was already merged - Moved phy-is-integrated from SoC dtsi to final board DT. Corentin Labbe (10): dt-bindings: net: Restore sun8i dwmac binding arm: dts: sunxi: Restore EMAC changes arm64: dts: allwinner: Restore EMAC changes net: stmmac: sun8i: Restore the compatibles

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-20 Thread Corentin Labbe
On Tue, Sep 19, 2017 at 09:49:52PM -0500, Rob Herring wrote: > On Thu, Sep 14, 2017 at 2:19 PM, Andrew Lunn wrote: > >> > Is the MDIO controller "allwinner,sun8i-h3-emac" or "snps,dwmac-mdio"? > >> > If the latter, then I think the node is fine, but then the mux should be > >> > a child node of it

[PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from scanning mdio-mux nodes

2017-09-27 Thread Corentin Labbe
] mdio_bus stmmac-0: scan phy mdio-mux at address 1 [...] [ 18.176420] mdio_bus stmmac-0: scan phy mdio-mux at address 30 [ 18.176452] mdio_bus stmmac-0: scan phy mdio-mux at address 31 Since mdio-mux nodes are not PHY, this patch a way to to not scan them. Signed-off-by: Corentin Labbe --- drivers

[PATCH v6 10/11] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs

2017-09-27 Thread Corentin Labbe
The Allwinner H3 SoC have two distinct MDIO bus, only one could be active at the same time. The selection of the active MDIO bus are done via some bits in the EMAC register of the system controller. This patch implement this MDIO switch via a custom MDIO-mux. Signed-off-by: Corentin Labbe

[PATCH v6 09/11] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-09-27 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 v6 07/11] arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio

2017-09-27 Thread Corentin Labbe
stmmac bindings docs said that its mdio node must have compatible = "snps,dwmac-mdio"; Since dwmac-sun8i does not have any good reasons to not doing it, all their MDIO node must have it. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 1 + 1 file

[PATCH v6 06/11] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-09-27 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 | 31 +-- 1 file changed, 25

[PATCH v6 08/11] net: stmmac: snps,dwmac-mdio MDIOs are automatically registered

2017-09-27 Thread Corentin Labbe
d to be in need_mdio_ids. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 8a280b48e3a9..9e616da07

[PATCH v6 03/11] arm64: dts: allwinner: Restore EMAC changes

2017-09-27 Thread Corentin Labbe
This patch restore arm64 DT about dwmac-sun8i This reverts commit 87e1f5e8bb4b ("arm64: dts: allwinner: Revert EMAC changes") Signed-off-by: Corentin Labbe --- .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 16 .../boot/dts/allwinner/sun50i-a64-pine64-plus.d

[PATCH v6 02/11] arm: dts: sunxi: Restore EMAC changes

2017-09-27 Thread Corentin Labbe
This patch restore arm DT about dwmac-sun8i This reverts commit fe45174b72ae ("arm: dts: sunxi: Revert EMAC changes") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 9 arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 19 +

[PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-27 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| 138 +++-- 1 file changed, 126 insertions(+), 12 deletions(-) diff --git a/Documentation

[PATCH v6 04/11] net: stmmac: sun8i: Restore the compatibles

2017-09-27 Thread Corentin Labbe
This patch restore compatibles about dwmac-sun8i This reverts commit ad4540cc5aa3 ("net: stmmac: sun8i: Remove the compatibles") Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/ne

[PATCH v6 00/11] net: stmmac: dwmac-sun8i: Handle integrated PHY

2017-09-27 Thread Corentin Labbe
. Changes since v1: - Dropped phy-is-integrated documentation patch since another same patch was already merged - Moved phy-is-integrated from SoC dtsi to final board DT. Corentin Labbe (11): dt-bindings: net: Restore sun8i dwmac binding arm: dts: sunxi: Restore EMAC changes arm64: dts: a

[PATCH v6 01/11] dt-bindings: net: Restore sun8i dwmac binding

2017-09-27 Thread Corentin Labbe
This patch restore dt-bindings documentation about dwmac-sun8i This reverts commit 8aa33ec2f481 ("dt-bindings: net: Revert sun8i dwmac binding") Signed-off-by: Corentin Labbe --- .../devicetree/bindings/net/dwmac-sun8i.txt| 84 ++ 1 file changed, 84

Re: [PATCH v6 06/11] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-09-27 Thread Corentin Labbe
On Wed, Sep 27, 2017 at 12:16:22PM +0200, Maxime Ripard wrote: > On Wed, Sep 27, 2017 at 07:34:09AM +0000, Corentin Labbe wrote: > > 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 selectio

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-28 Thread Corentin Labbe
On Wed, Sep 27, 2017 at 09:53:15PM -0700, Florian Fainelli wrote: > > > On 09/27/2017 12:34 AM, Corentin Labbe wrote: > > This patch add documentation about the MDIO switch used on sun8i-h3-emac > > for integrated PHY. > > > > Signed-off-by: Corentin Labbe >

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-28 Thread Corentin Labbe
On Wed, Sep 27, 2017 at 04:02:10PM +0200, Andrew Lunn wrote: > Hi Corentin > > > +Required properties for the mdio-mux node: > > + - compatible = "mdio-mux" > > This is too generic. Please add a more specific compatible for this > particular mux. You can keep "mdio-mux", since that is what the M

Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-10-04 Thread Corentin Labbe
On Thu, Sep 28, 2017 at 09:37:08AM +0200, Corentin Labbe wrote: > On Wed, Sep 27, 2017 at 04:02:10PM +0200, Andrew Lunn wrote: > > Hi Corentin > > > > > +Required properties for the mdio-mux node: > > > + - compatible = "mdio-mux" > > &g

Re: [PATCH net 0/3] net: stmmac: Misc fixes

2019-01-30 Thread Corentin Labbe
On Wed, Jan 30, 2019 at 03:54:18PM +0100, Jose Abreu wrote: > Some misc fixes for stmmac targeting -net. > > Cc: Joao Pinto > Cc: David S. Miller > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > > Jose Abreu (3): > net: stmmac: Fallback to Platform Data clock in Watchdog conversion > net

[BUG] net: sungem: device driver frees DMA memory with wrong function

2018-12-23 Thread Corentin Labbe
Hello During a boot on a qemu machine, I hit the following problem: [ 21.613659] [ cut here ] [ 21.614039] DMA-API: gem :00:0f.0: device driver frees DMA memory with wrong function [device address=0x185c5402] [size=408 bytes] [mapped as page] [unmapped as

Re: [BUG] net: sungem: device driver frees DMA memory with wrong function

2019-01-02 Thread Corentin Labbe
On Fri, Dec 28, 2018 at 12:36:21AM -0800, Christoph Hellwig wrote: > Please try this patch: > The error type change to "DMA-API: gem :00:0f.0: device driver failed to check map error" (I will send patch for fixing this). Note that I used the patch from your just sent DMA series (since the pa

[BUG] net: stmmac: dwmac-sun8i broken in linux-next

2018-05-16 Thread Corentin Labbe
Hello The dwmac-sun8i driver is broken in next-20180515, symptom are no RX and TX errors as shown by ifconfig: eth0: flags=4163 mtu 1500 inet 192.168.1.204 netmask 255.255.255.0 broadcast 192.168.1.255 ether 96:75:ff:0d:f6:d8 txqueuelen 1000 (Ethernet) RX packets 0 b

Re: [PATCH v3 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-18 Thread Corentin Labbe
On Fri, May 18, 2018 at 02:55:57PM +0100, Jose Abreu wrote: > This targets to uniformize the handling of the different GMAC versions in > stmmac_main.c file and also tune-up the HW. > > Currently there are some if/else conditions in the main source file which > calls different callbacks depending

Re: [PATCH net-next] net: stmmac: Populate missing callbacks in HWIF initialization

2018-05-18 Thread Corentin Labbe
not previously populated by HW specific setup. > > Signed-off-by: Jose Abreu > Fixes: 5f0456b43140 ("net: stmmac: Implement logic to automatically > select HW Interface") > Reported-by: Corentin Labbe > Cc: Corentin Labbe > Cc: David S. Miller > Cc: Joao Pinto

Re: [PATCH v3 net-next 00/12] net: stmmac: Clean-up and tune-up

2018-05-18 Thread Corentin Labbe
On Fri, May 18, 2018 at 03:23:44PM +0100, Jose Abreu wrote: > Hi Corentin, > > On 18-05-2018 15:12, Corentin Labbe wrote: > > On Fri, May 18, 2018 at 02:55:57PM +0100, Jose Abreu wrote: > >> This targets to uniformize the handling of the different GMAC versions in > >

[PATCH] net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling

2017-11-28 Thread Corentin Labbe
The driver expect "allwinner,leds-active-low" to be in PHY node, but the binding doc expect it to be in MAC node. Since all board DT use it also in MAC node, the driver need to search allwinner,leds-active-low in MAC node. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmi

Re: [PATCH] net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling

2017-11-29 Thread Corentin Labbe
On Tue, Nov 28, 2017 at 06:38:26PM +0100, Andrew Lunn wrote: > On Tue, Nov 28, 2017 at 05:48:22PM +0100, Corentin Labbe wrote: > > The driver expect "allwinner,leds-active-low" to be in PHY node, but > > the binding doc expect it to be in MAC node. > > > >

[PATCH] net: cadence: macb: disable NAPI on error

2020-06-10 Thread Corentin Labbe
led if macb_phylink_connect() fail. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Corentin Labbe --- drivers/net/ethernet/cadence/macb_main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/

Re: [linux-sunxi] [PATCH 4/5] arm64: allwinner: h6: add EMAC device nodes

2018-07-21 Thread Corentin Labbe
On Sun, Jul 22, 2018 at 01:39:54PM +0800, Icenowy Zheng wrote: > Allwinner H6 SoC has an EMAC like the one in A64. > > Add device tree nodes for the H6 DTSI file. > > Signed-off-by: Icenowy Zheng > --- > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 30 > 1 file changed, 3

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-06-27 Thread Corentin Labbe
On Tue, Jun 27, 2017 at 04:11:21PM +0800, Chen-Yu Tsai wrote: > On Tue, Jun 27, 2017 at 4:05 PM, Corentin Labbe > wrote: > > On Mon, Jun 26, 2017 at 01:18:23AM +0100, André Przywara wrote: > >> On 31/05/17 08:18, Corentin Labbe wrote: > >> > The dwmac-sun8i is

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-06-27 Thread Corentin Labbe
On Mon, Jun 26, 2017 at 01:18:23AM +0100, André Przywara wrote: > On 31/05/17 08:18, Corentin Labbe wrote: > > 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 > >

[PATCH 5/6] arm: sun8i: nanopi-neo: use internal phy-mode

2017-06-27 Thread Corentin Labbe
Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts

[PATCH 3/6] arm: sun8i: orangepi-zero: use internal phy-mode

2017-06-27 Thread Corentin Labbe
Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i

[PATCH 6/6] arm: sun8i: orangepi-2: use internal phy-mode

2017-06-27 Thread Corentin Labbe
Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts

[PATCH 4/6] arm: sun8i: orangepi-one: use internal phy-mode

2017-06-27 Thread Corentin Labbe
Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi

[PATCH 1/6] net: stmmac: support future possible different internal phy mode

2017-06-27 Thread Corentin Labbe
same mode than the internal one. Reported-by: André Przywara Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethern

[PATCH 2/6] arm: sun8i: orangepipc: use internal phy-mode

2017-06-27 Thread Corentin Labbe
Since the PHY used is internal, simply set phy-mode as internal. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-06-27 Thread Corentin Labbe
Ripard wrote: > >>> On Tue, Jun 27, 2017 at 10:02:45AM +0100, Andre Przywara wrote: > >>>> Hi, > >>>> > >>>> (CC:ing some people from that Rockchip dmwac series) > >>>> > >>>> On 27/06/17 09:21, Corentin Labbe wr

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-06-27 Thread Corentin Labbe
On Tue, Jun 27, 2017 at 07:29:37PM +0200, Maxime Ripard wrote: > On Tue, Jun 27, 2017 at 02:37:48PM +0200, Corentin Labbe wrote: > > On Tue, Jun 27, 2017 at 11:33:56AM +0100, Andre Przywara wrote: > > > Hi, > > > > > > On 27/06/17 11:23, Icenowy Zheng wrote: &g

Re: [PATCH 1/6] net: stmmac: support future possible different internal phy mode

2017-06-29 Thread Corentin Labbe
On Thu, Jun 29, 2017 at 12:23:49PM -0400, David Miller wrote: > From: Corentin Labbe > Date: Tue, 27 Jun 2017 11:28:01 +0200 > > > The current way to find if the phy is internal is to compare DT phy-mode > > and emac_variant/internal_phy. > > But it will negate a p

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

2017-06-30 Thread Corentin Labbe
On Thu, Jun 29, 2017 at 11:26:40AM +0300, Fathi Boudra wrote: > On 4 April 2017 at 16:32, Corentin Labbe wrote: > > This patch add a generic testsuite for testing ethernet network device > > driver. > > > > Signed-off-by: Corentin Labbe > > --- > > > &

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-06-30 Thread Corentin Labbe
On Tue, Jun 27, 2017 at 10:37:34AM -0700, Florian Fainelli wrote: > On 06/27/2017 10:29 AM, Maxime Ripard wrote: > > On Tue, Jun 27, 2017 at 02:37:48PM +0200, Corentin Labbe wrote: > >> On Tue, Jun 27, 2017 at 11:33:56AM +0100, Andre Przywara wrote: > >>> Hi, > >

Re: [PATCH v6 05/21] net-next: stmmac: Add dwmac-sun8i

2017-07-02 Thread Corentin Labbe
On Sat, Jul 01, 2017 at 02:42:14PM -0700, Florian Fainelli wrote: > On 30/06/2017 23:53, Corentin Labbe wrote: > > On Tue, Jun 27, 2017 at 10:37:34AM -0700, Florian Fainelli wrote: > >> On 06/27/2017 10:29 AM, Maxime Ripard wrote: > >>> On Tue, Jun 27, 2017 at 02

[PATCH 3/6] arm: sun8i: orangepi-one: revert "use internal phy-mode"

2017-07-02 Thread Corentin Labbe
Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit 4ac57180eab2 ("arm: sun8i: orangepi-one: use internal phy-mode") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 2 +- 1 file changed, 1

[PATCH 1/6] arm: sun8i: nanopi-neo: revert use internal phy-mode

2017-07-02 Thread Corentin Labbe
Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit bdcc005beac9 ("arm: sun8i: nanopi-neo: use internal phy-mode") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 2 +- 1 file changed, 1 inser

[PATCH 4/6] arm: sun8i: orangepi-zero: revert "use internal phy-mode"

2017-07-02 Thread Corentin Labbe
Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit 6066de6848d4 ("arm: sun8i: orangepi-zero: use internal phy-mode") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +- 1 file

[PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"

2017-07-02 Thread Corentin Labbe
Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode") Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-su

[PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode"

2017-07-02 Thread Corentin Labbe
Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit 5a79b4f2a5e7 ("arm: sun8i: orangepi-2: use internal phy-mode") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 2 +- 1 file changed, 1 inser

[PATCH 5/6] arm: sun8i: orangepipc: revert "use internal phy-mode"

2017-07-02 Thread Corentin Labbe
Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit 3432a86e641c ("arm: sun8i: orangepipc: use internal phy-mode") Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 2 +- 1 file changed, 1 inser

[PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode"

2017-07-02 Thread Corentin Labbe
hy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i I will send an additionnal patch for documenting more phy-mode = "internal" Corentin Labbe (6): arm: sun8i: nanopi-neo: revert use internal phy-mode arm: sun8i: orangepi-2: revert "use internal phy-mod

  1   2   3   4   5   >