[PATCH v3 3/8] net: stmmac: use SPEED_UNKNOWN/DUPLEX_UNKNOWN

2017-02-15 Thread Corentin Labbe
It is better to use DUPLEX_UNKNOWN instead of just "-1". Using 0 for an invalid speed is bad since 0 is a valid value for speed. So this patch replace 0 by SPEED_UNKNOWN. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro --- drivers/ne

[PATCH v3 4/8] net: stmmac: set speed at SPEED_UNKNOWN in case of broken speed

2017-02-15 Thread Corentin Labbe
In case of invalid speed given, stmmac_adjust_link() still record it as current speed. This patch modify the default case to set speed as SPEED_UNKNOWN if not 10/100/1000. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro --- drivers/net/ethernet

[PATCH v3 7/8] net: stmmac: reduce indentation by adding a continue

2017-02-15 Thread Corentin Labbe
As suggested by Joe Perches, replacing the "if phydev" logic permit to reduce indentation in the for loop. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 82 +++--

[PATCH v3 8/8] net: stmmac: invert the logic for dumping regs

2017-02-15 Thread Corentin Labbe
It is easier to follow the logic by removing the not operator Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro --- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[PATCH v3 5/8] net: stmmac: run stmmac_hw_fix_mac_speed when speed is valid

2017-02-15 Thread Corentin Labbe
This patch mutualise a bit by running stmmac_hw_fix_mac_speed() after the switch in case of valid speed. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ++--- 1 file changed, 2 insertions

[PATCH v3 6/8] net: stmmac: split the stmmac_adjust_link 10/100 case

2017-02-15 Thread Corentin Labbe
The 10/100 case have too many ifcase. This patch split it for removing an if. Signed-off-by: Corentin Labbe Acked-by: Giuseppe Cavallaro Reviewed-by: Giuseppe Cavallaro --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions

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

2017-02-16 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 3a17555..72f974d 100644

[PATCH 19/21] ARM: dts: sun50i-a64: enable dwmac-sun8i on the BananaPi M64

2017-02-16 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 18/21] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64 plus

2017-02-16 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 20/21] ARM: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-02-16 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 da92c25

[PATCH 16/21] ARM64: dts: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-02-16 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 14/21] ARM: dts: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high

2017-02-16 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 15/21] ARM64: dts: sun50i-a64: Add dt node for the syscon control module

2017-02-16 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 17/21] ARM: dts: sun50i-a64: enable dwmac-sun8i on pine64

2017-02-16 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 13/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus

2017-02-16 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 12/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange PI One

2017-02-16 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 08/21] ARM: dts: sun8i-h3: add dwmac-sun8i rgmii pins

2017-02-16 Thread Corentin Labbe
This patch add pinctrl node for dwmac-sun8i on H3. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 61d56d2..59ed40e 100644 --- a/arch/arm

[PATCH 09/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Banana Pi M2+

2017-02-16 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 11/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi 2

2017-02-16 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 07/21] ARM: dts: sun8i-h3: add dwmac-sun8i ethernet driver

2017-02-16 Thread Corentin Labbe
From: LABBE Corentin The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on the Allwinner H3 SoC Device-tree. The SoC H3 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts

[PATCH 10/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange PI PC

2017-02-16 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 06/21] ARM: dts: sun8i-h3: Add dt node for the syscon control module

2017-02-16 Thread Corentin Labbe
From: LABBE Corentin This patch add the dt node for the syscon register present on the Allwinner H3. 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/sun8i-h3.dtsi | 6 ++ 1 file

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

2017-02-16 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 03/21] net-next: stmmac: add optional setup function

2017-02-16 Thread Corentin Labbe
Instead of ading more ifthen login 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 | 7 ++- include/linux/stmmac.h

[PATCH 04/21] ARM: sun8i: dt: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-02-16 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| 86 ++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings

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

2017-02-16 Thread Corentin Labbe
ining are DT patch enabling it. Regards Corentin Labbe Corentin Labbe (16): net-next: stmmac add optional init_phy function net-next: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr net-next: stmmac: add optional setup function ARM: sun8i: dt: Add DT bindings documentation for Allw

[PATCH 01/21] net-next: stmmac add optional init_phy function

2017-02-16 Thread Corentin Labbe
For dwmac-sun8i, some actions must be done for enabling attached PHY. Thoses actions must be done after stmmac_probe_config_dt() and at start of stmmac_init_phy(). The best way to handle that is to add an optional init_phy() function. Signed-off-by: Corentin Labbe --- drivers/net/ethernet

[PATCH 02/21] net-next: stmmac: export stmmac_set_mac_addr/stmmac_get_mac_addr

2017-02-16 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

Re: [linux-sunxi] [PATCH 03/21] net-next: stmmac: add optional setup function

2017-02-17 Thread Corentin Labbe
On Thu, Feb 16, 2017 at 09:38:33PM +0100, Peter Korsgaard wrote: > >>>>> "Corentin" == Corentin Labbe writes: > > > Instead of ading more ifthen login for adding a new mac_device_info > > s/login/logic/ > > -- > Bye, Peter Korsgaard Thanks, will fix it. Regards Corentin Labbe

Re: [PATCH 20/21] ARM: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-02-17 Thread Corentin Labbe
On Thu, Feb 16, 2017 at 08:08:27PM +0100, Maxime Ripard wrote: > Hi, > > On Thu, Feb 16, 2017 at 01:48:58PM +0100, Corentin Labbe wrote: > > From: LABBE Corentin > > > > Enable the dwmac-sun8i driver in the sunxi default configuration > > > > Signed-of

Re: [PATCH 08/21] ARM: dts: sun8i-h3: add dwmac-sun8i rgmii pins

2017-02-17 Thread Corentin Labbe
On Thu, Feb 16, 2017 at 08:06:32PM +0100, Maxime Ripard wrote: > On Thu, Feb 16, 2017 at 01:48:46PM +0100, Corentin Labbe wrote: > > This patch add pinctrl node for dwmac-sun8i on H3. > > > > Signed-off-by: Corentin Labbe > > --- > > arch/arm/boot/dts/sun8i-h3.

Re: [PATCH 04/21] ARM: sun8i: dt: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-02-17 Thread Corentin Labbe
On Thu, Feb 16, 2017 at 07:48:18PM +0100, Maxime Ripard wrote: > Hi, > > On Thu, Feb 16, 2017 at 01:48:42PM +0100, Corentin Labbe wrote: > > This patch adds documentation for Device-Tree bindings for the > > Allwinner dwmac-sun8i driver. > > > &

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

2017-02-17 Thread Corentin Labbe
int *synopsys_id) > > +{ > > + struct mac_device_info *mac; > > + > > + mac = kzalloc(sizeof(const struct mac_device_info), GFP_KERNEL); > > + if (!mac) > > + return NULL; > > Do you ever free that memory? > Good catch, I believed that the "stmmac framework" would free it. I will send a fix for this memory leak. [...] > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c > > b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c > > index 5ff6bc4..11db658 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c > > @@ -450,6 +450,9 @@ static void stmmac_ethtool_gregs(struct net_device *dev, > > for (i = 0; i < 22; i++) > > reg_space[i + 55] = > > readl(priv->ioaddr + (DMA_BUS_MODE + (i * 4))); > > + } else if (priv->plat->has_sun8i) { > > Surely we don't want to add a new flag to the common structure for > every new platform supported. > > Can't you base that on the compatible instead? This part will be fixed with the debugfs speaked early in the mail. But yes I have tried to avoid use of has_sun8i at maximum. > > Thanks a lot for your work, > Maxime > Thanks for the review Corentin Labbe

[PATCH RFC] net: stmmac: unify registers dumps methods

2017-02-20 Thread Corentin Labbe
htool". Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/common.h | 4 +- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 10 +-- .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c| 16 ++--- .../net/ethernet/stmicro/stmmac/dwmac100_core.c| 30 ++

[PATCH RFC] net: stmmac: unify registers dumps methods

2017-02-20 Thread Corentin Labbe
. What do you think about this issue ? Corentin Labbe (1): net: stmmac: unify registers dumps methods drivers/net/ethernet/stmicro/stmmac/common.h | 4 +- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 10 +-- .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c| 16 ++--- .../net/eth

Re: [PATCH 04/21] ARM: sun8i: dt: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-02-20 Thread Corentin Labbe
On Thu, Feb 16, 2017 at 12:58:46PM -0800, Florian Fainelli wrote: > On 02/16/2017 04:48 AM, Corentin Labbe wrote: > > + > > +Optional properties: > > +- allwinner,tx-delay: TX clock delay chain value. Range value is 0-0x07. > > Default is 0) > > +- allwinner,rx-

Re: [PATCH v4 13/18] arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-04-24 Thread Corentin Labbe
On Wed, Apr 12, 2017 at 02:41:53PM +0200, Maxime Ripard wrote: > On Wed, Apr 12, 2017 at 01:13:55PM +0200, Corentin Labbe wrote: > > The dwmac-sun8i is an Ethernet MAC that supports 10/100/1000 Mbit > > connections. It is very similar to the device found in the Allwinner > &

net: pcnet32: [BUG] IRQ disabled when resizing ring buffer

2017-04-25 Thread Corentin Labbe
81 48 c7 c6 32 a6 9c 81 48 89 df e8 80 a7 18 00 e9 33 ff ff ff <0f> ff e9 a2 f7 ff ff 0f ff 66 90 e92d f6 ff ff 0f ff 66 0f 1f [ 8862.793881] ---[ end trace ecb86a2cf3a149f7 ]--- Regards Corentin Labbe

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

2017-05-01 Thread Corentin Labbe
. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v4: - Re-ordered by alphabetical order some DT nodes - Fixed arm64 patch prefix - Simplified power/unpower_phy functions by testing the use of internal_phy - Added a patch for adding dwmac-sun8i to arm64 defconfig - Fix a ty

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

2017-05-01 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 v5 04/20] dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon

2017-05-01 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the syscon present in allwinner devices. Signed-off-by: Corentin Labbe --- .../devicetree/bindings/misc/allwinner,syscon.txt | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree

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

2017-05-01 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 v5 06/20] arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module

2017-05-01 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 v5 09/20] arm: sun8i: orangepi-zero: Enable dwmac-sun8i

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

[PATCH v5 11/20] arm: sun8i: orangepi-2: Enable dwmac-sun8i

2017-05-01 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 v5 14/20] arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver

2017-05-01 Thread Corentin Labbe
level. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index d7341ba..18b3642 100644

[PATCH v5 12/20] arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high

2017-05-01 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 v5 15/20] arm64: allwinner: pine64: Enable dwmac-sun8i

2017-05-01 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 v5 13/20] arm64: allwinner: sun50i-a64: Add dt node for the syscon control module

2017-05-01 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 v5 08/20] arm: sun8i: orangepi-pc: Enable dwmac-sun8i

2017-05-01 Thread Corentin Labbe
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/boot/dts/sun8i-h3

[PATCH v5 07/20] arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver

2017-05-01 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 v5 10/20] arm: sun8i: orangepi-one: Enable dwmac-sun8i

2017-05-01 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 v5 05/20] net: stmmac: Add dwmac-sun8i

2017-05-01 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 v5 02/20] net: stmmac: add optional setup function

2017-05-01 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| 1

[PATCH v5 20/20] arm64: defconfig: Enable dwmac-sun8i driver on defconfig

2017-05-01 Thread Corentin Labbe
Enable the dwmac-sun8i ethernet driver as a module in the ARM64 defconfig. Signed-off-by: Corentin Labbe --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index ce07285..4575fbb 100644 --- a/arch

[PATCH v5 18/20] arm: sunxi: Enable dwmac-sun8i driver on sunxi_defconfig

2017-05-01 Thread Corentin Labbe
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..504e022 100644 --- a/arch

[PATCH v5 19/20] arm: multi_v7: Enable dwmac-sun8i driver on multi_v7_defconfig

2017-05-01 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 2685e03..6da6af8 100644

[PATCH v5 16/20] arm64: allwinner: pine64-plus: Enable dwmac-sun8i

2017-05-01 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 v5 17/20] arm64: allwinner: bananapi-m64: Enable dwmac-sun8i

2017-05-01 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

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

2017-05-01 Thread Corentin Labbe
On Mon, May 01, 2017 at 04:45:41PM +0200, Andrew Lunn wrote: > On Mon, May 01, 2017 at 10:28:46PM +0800, Chen-Yu Tsai wrote: > > On Mon, May 1, 2017 at 10:01 PM, Andrew Lunn wrote: > > > On Mon, May 01, 2017 at 02:45:00PM +0200, Corentin Labbe wrote: > > >> Hello &

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-03 Thread Corentin Labbe
On Wed, May 03, 2017 at 10:13:56AM +0200, Giuseppe CAVALLARO wrote: > Hello Thomas > > this was initially set by using the hw->link.port; both the core_init > and adjust callback > should invoke the hook and tuning the PS bit according to the speed and > mode. > So maybe the ->set_ps is superflu

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

2017-05-05 Thread Corentin Labbe
On Mon, May 01, 2017 at 02:45:00PM +0200, Corentin Labbe wrote: > Hello > > This patch series add the driver for dwmac-sun8i which handle the Ethernet MAC > present on Allwinner H3/H5/A83T/A64 SoCs. > > This driver is the continuation of the sun8i-emac driver. > Durin

[PATCH v4 00/10] net-next: ethernet: add sun8i-emac driver

2016-10-07 Thread Corentin Labbe
code refactoring Corentin Labbe (9): ethernet: add sun8i-emac driver MAINTAINERS: Add myself as maintainer of sun8i-emac ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac ARM: dts: sun8i-h3: Add dt node for the syscon control module ARM: dts: sun8i-h3: add sun8i-emac eth

[PATCH v4 02/10] MAINTAINERS: Add myself as maintainer of sun8i-emac

2016-10-07 Thread Corentin Labbe
This patch add myself as maintainer of the sun8i-emac driver. Signed-off-by: Corentin Labbe --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 40f4629..e197d82 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -582,6 +582,12 @@ S: Maintained F

[PATCH v4 03/10] ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac

2016-10-07 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Allwinner sun8i-emac driver. Signed-off-by: Corentin Labbe --- .../bindings/net/allwinner,sun8i-emac.txt | 70 ++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v4 09/10] ARM: sunxi: Enable sun8i-emac driver on sunxi_defconfig

2016-10-07 Thread Corentin Labbe
Enable the sun8i-emac 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 714da33..153707a 100644 --- a/arch/arm

[PATCH v4 01/10] ethernet: add sun8i-emac driver

2016-10-07 Thread Corentin Labbe
This patch add support for sun8i-emac ethernet MAC hardware. It could be found in Allwinner H3/A83T/A64 SoCs. It supports 10/100/1000 Mbit/s speed with half/full duplex. It can use an internal PHY (MII 10/100) or an external PHY via RGMII/RMII. Signed-off-by: Corentin Labbe --- drivers/net

[PATCH v4 05/10] ARM: dts: sun8i-h3: add sun8i-emac ethernet driver

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

[PATCH v4 06/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI PC

2016-10-07 Thread Corentin Labbe
The sun8i-emac 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/boot/dts/sun8i-h3-orangepi

[PATCH v4 04/10] ARM: dts: sun8i-h3: Add dt node for the syscon control module

2016-10-07 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner H3. 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/sun8i-h3.dtsi | 5 + 1 file changed, 5 insertions

[PATCH v4 07/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI One

2016-10-07 Thread Corentin Labbe
From: Hans de Goede The sun8i-emac hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac node. Signed-off-by: Hans de Goede Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 1 file changed, 8

[PATCH v4 08/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange Pi 2

2016-10-07 Thread Corentin Labbe
The sun8i-emac 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-2

[PATCH v4 10/10] ARM: sunxi: Enable sun8i-emac driver on multi_v7_defconfig

2016-10-07 Thread Corentin Labbe
Enable the sun8i-emac 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 5845910..f44d633 100644

[PATCH 1/5] irda: irproc.c: Remove unneeded linux/miscdevice.h include

2016-12-15 Thread Corentin Labbe
irproc.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe --- net/irda/irproc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/irda/irproc.c b/net/irda/irproc.c index b9ac598..77cfdde 100644 --- a/net/irda/irproc.c +++ b/net/irda

[PATCH 3/5] irnet: ppp: move IRNET_MINOR to include/linux/miscdevice.h

2016-12-15 Thread Corentin Labbe
This patch move the define for IRNET_MINOR to include/linux/miscdevice.h It is better that all minor number definitions are in the same place. Signed-off-by: Corentin Labbe --- include/linux/miscdevice.h | 1 + net/irda/irnet/irnet_ppp.h | 1 - 2 files changed, 1 insertion(+), 1 deletion

[PATCH 5/5] irda: irnet: add member name to the miscdevice declaration

2016-12-15 Thread Corentin Labbe
Since the struct miscdevice have many members, it is dangerous to init it without members name relying only on member order. This patch add member name to the init declaration. Signed-off-by: Corentin Labbe --- net/irda/irnet/irnet_ppp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH 4/5] irda: irnet: Remove unused IRNET_MAJOR define

2016-12-15 Thread Corentin Labbe
The IRNET_MAJOR define is not used, so this patch remove it. Signed-off-by: Corentin Labbe --- net/irda/irnet/irnet_ppp.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h index 18fcead..ec092c9 100644 --- a/net/irda/irnet/irnet_ppp.h

[PATCH 2/5] irda: irnet: Move linux/miscdevice.h include

2016-12-15 Thread Corentin Labbe
The only use of miscdevice is irda_ppp so no need to include linux/miscdevice.h for all irda files. This patch move the linux/miscdevice.h include to irnet_ppp.h Signed-off-by: Corentin Labbe --- net/irda/irnet/irnet.h | 1 - net/irda/irnet/irnet_ppp.h | 1 + 2 files changed, 1 insertion

[PATCH v3 7/9] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI One

2016-09-09 Thread Corentin Labbe
From: Hans de Goede The sun8i-emac hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac and phy nodes. Signed-off-by: Hans de Goede Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 10 ++ 1 file changed

[PATCH v3 4/9] ARM: dts: sun8i-h3: Add dt node for the syscon control module

2016-09-09 Thread Corentin Labbe
This patch add the dt node for the syscon register present on the Allwinner H3. 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/sun8i-h3.dtsi | 5 + 1 file changed, 5 insertions

[PATCH v3 5/9] ARM: dts: sun8i-h3: add sun8i-emac ethernet driver

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

[PATCH v3 0/9] net-next: ethernet: add sun8i-emac driver

2016-09-09 Thread Corentin Labbe
tools stats strings - Removed all unneeded __packked and __aligned - Added tuning of RX/TX ring size via ethtool - Corrected use of sk/skb naming - Added some wmb when needed - Moved irq claim/free to emac_open/close - Lots of code refactoring Corentin Labbe (8): ethernet: sun8i-emac: add pm_ru

[PATCH v3 3/9] ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac

2016-09-09 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Allwinner sun8i-emac driver. Signed-off-by: Corentin Labbe --- .../bindings/net/allwinner,sun8i-emac.txt | 64 ++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v3 6/9] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI PC

2016-09-09 Thread Corentin Labbe
The sun8i-emac hardware is present on the Orange PI PC. It uses the internal PHY. This patch create the needed emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH v3 1/9] ethernet: add sun8i-emac driver

2016-09-09 Thread Corentin Labbe
This patch add support for sun8i-emac ethernet MAC hardware. It could be found in Allwinner H3/A83T/A64 SoCs. It supports 10/100/1000 Mbit/s speed with half/full duplex. It can use an internal PHY (MII 10/100) or an external PHY via RGMII/RMII. Signed-off-by: Corentin Labbe --- drivers/net

[RFC PATCH 9/9] ethernet: sun8i-emac: add pm_runtime support

2016-09-09 Thread Corentin Labbe
This patch add pm_runtime support to sun8i-emac. For the moment, only basic support is added, (the device is marked as used when net/open) Signed-off-by: Corentin Labbe --- drivers/net/ethernet/allwinner/sun8i-emac.c | 62 - 1 file changed, 60 insertions(+), 2

[PATCH v3 2/9] MAINTAINERS: Add myself as maintainer of sun8i-emac

2016-09-09 Thread Corentin Labbe
This patch add myself as maintainer of the sun8i-emac driver. Signed-off-by: Corentin Labbe --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6781a3f..43f5be3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -582,6 +582,12 @@ S: Maintained F

[PATCH v3 8/9] ARM: sunxi: Enable sun8i-emac driver on sunxi_defconfig

2016-09-09 Thread Corentin Labbe
Enable the sun8i-emac 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 714da33..153707a 100644 --- a/arch/arm

[PATCH 1/2] net: stmmac: avoid Camelcase naming

2016-12-01 Thread Corentin Labbe
This patch simply rename regValue to value, like it was named in other mdio functions. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c

[PATCH 2/2] net: stmmac: unify mdio functions

2016-12-01 Thread Corentin Labbe
write functions. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/common.h | 6 + .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 6 + .../net/ethernet/stmicro/stmmac/dwmac100_core.c| 7 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 6

Re: [PATCH 1/2] net: stmmac: avoid Camelcase naming

2016-12-02 Thread Corentin Labbe
On Fri, Dec 02, 2016 at 09:44:48AM +0100, Giuseppe CAVALLARO wrote: > Hello Corentin > > patches look ok, I just wonder if you tested it in case of > the stmmac is connected to a transceiver. Let me consider it > a critical part of the driver to properly work. > > Regards > Peppe > I tested it

Re: [PATCH 3/5] net: thunderx: Fix configuration of L3/L4 length checking

2016-11-14 Thread Corentin Labbe
On Mon, Nov 14, 2016 at 04:24:44PM +0530, sunil.kovv...@gmail.com wrote: > From: Sunil Goutham > > This patch fixes enabling of HW verification of L3/L4 length and > TCP/UDP checksum which is currently being cleared. Also fixed VLAN > stripping config which is being cleared when multiqset is enab

[PATCH 2/3] net: stmmac: replace hardcoded function name by __func__

2016-11-16 Thread Corentin Labbe
From: LABBE Corentin Some printing have the function name hardcoded. It is better to use __func__ instead. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet

[PATCH 1/3] net: stmmac: replace all pr_xxx by their netdev_xxx counterpart

2016-11-16 Thread Corentin Labbe
duplicate with that dev_xxx displays. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 204 -- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 14 +- 2 files changed, 123 insertions(+), 95 deletions(-) diff --git a/drivers/net/eth

[PATCH 3/3] net: stmmac: replace if (netif_msg_type) by their netif_xxx counterpart

2016-11-16 Thread Corentin Labbe
From: LABBE Corentin As sugested by Joe Perches, we could replace all if (netif_msg_type(priv)) dev_xxx(priv->devices, ...) by the simpler macro netif_xxx(priv, hw, priv->dev, ...) Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.

<    1   2   3   4   5