[PATCH net] net: ethernet: ave: Replace alloc_etherdev() with devm_alloc_etherdev()

2020-09-28 Thread Kunihiko Hayashi
Use devm_alloc_etherdev() to simplify the code instead of alloc_etherdev(). Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 32 +++- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/socionext

Re: [PATCH] net: ethernet: ave: Fix error returns in ave_init

2020-07-16 Thread Kunihiko Hayashi
nmode_mask, priv->pinmode_val); if (ret) - return ret; + goto out_reset_assert; ave_global_reset(ndev); Thank you for pointing out. Reviewed-by: Kunihiko Hayashi --- Best Regards Kunihiko Hayashi

[PATCH net-next v2] dt-bindings: net: Convert UniPhier AVE4 controller to json-schema

2020-05-12 Thread Kunihiko Hayashi
Convert the UniPhier AVE4 controller binding to DT schema format. Signed-off-by: Kunihiko Hayashi --- Changes since v1: - Set true to phy-mode and phy-handle instead of $ref - Add mac-address and local-mac-address for existing dts warning .../bindings/net/socionext,uniphier-ave4.txt

Re: [PATCH net] dt-bindings: net: Convert UniPhier AVE4 controller to json-schema

2020-05-11 Thread Kunihiko Hayashi
Hi Rob, On 2020/05/12 11:01, Rob Herring wrote: On Tue, Apr 28, 2020 at 03:31:22PM +0900, Kunihiko Hayashi wrote: Convert the UniPhier AVE4 controller binding to DT schema format. This changes phy-handle property to required. Signed-off-by: Kunihiko Hayashi --- (snip) + phy-mode

Re: [PATCH net] dt-bindings: net: Convert UniPhier AVE4 controller to json-schema

2020-05-08 Thread Kunihiko Hayashi
Hi David, Rob, On 2020/05/02 7:21, David Miller wrote: From: Kunihiko Hayashi Date: Tue, 28 Apr 2020 15:31:22 +0900 Convert the UniPhier AVE4 controller binding to DT schema format. This changes phy-handle property to required. Signed-off-by: Kunihiko Hayashi DT folks, is it ok if I take

Re: [PATCH net] net: socionext: Fix a signedness bug in ave_probe()

2019-09-25 Thread Kunihiko Hayashi
Hi Dan, Thank you for pointing out. I've confirmed that this error handling works well with your patch. Reviewed-by: Kunihiko Hayashi Thank you, On Wed, 25 Sep 2019 13:57:50 +0300 wrote: > The "phy_mode" variable is an enum and in this context GCC treats it as > an unsi

[PATCH net] net: phy: realtek: Replace phy functions with non-locked version in rtl8211e_config_init()

2019-05-12 Thread Kunihiko Hayashi
_init() to avoid the deadlock issue. Fixes: f81dadbcf7fd ("net: phy: realtek: Add rtl8211e rx/tx delays config") Signed-off-by: Kunihiko Hayashi --- drivers/net/phy/realtek.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/realtek.c b/drivers/n

[PATCH net v2] net: phy: Fix the issue that netif always links up after resuming

2018-12-18 Thread Kunihiko Hayashi
tate has been preserved. This patch fixes the issue by calling phy_start_machine() in mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume(). Fixes: bc87922ff59d ("phy: Move PHY PM operations into phy_device") Suggested-by: Heiner Kallweit Signed-off-by: Kunihiko Hayashi --

Re: [PATCH net] net: phy: Fix the issue that netif always links up after resuming

2018-12-18 Thread Kunihiko Hayashi
Hi Heiner, On Tue, 18 Dec 2018 19:15:39 +0100 wrote: > On 18.12.2018 08:57, Kunihiko Hayashi wrote: > > Even though the link is down before entering hibernation, > > there is an issue that the network interface always links up after resuming > > from hibernation. > >

[PATCH net] net: phy: Fix the issue that netif always links up after resuming

2018-12-17 Thread Kunihiko Hayashi
tate has been preserved. This patch fixes the issue by calling phy_start_machine() in mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume(). Suggested-by: Heiner Kallweit Signed-off-by: Kunihiko Hayashi --- drivers/net/phy/phy_device.c | 7 ++- 1 file changed, 2 insertions(+), 5 d

Re: [RFC PATCH net v3] net: phy: Fix the issue that netif always links up after resuming

2018-12-17 Thread Kunihiko Hayashi
Hi Heiner, On Tue, 18 Dec 2018 07:44:33 +0100 wrote: > On 18.12.2018 07:25, Kunihiko Hayashi wrote: > > Hi Heiner, > > > > On Mon, 17 Dec 2018 19:43:31 +0100 wrote: > > > >> On 17.12.2018 19:41, Heiner Kallweit wrote: > >>> On 17.

Re: [RFC PATCH net v3] net: phy: Fix the issue that netif always links up after resuming

2018-12-17 Thread Kunihiko Hayashi
Hi Heiner, On Mon, 17 Dec 2018 19:43:31 +0100 wrote: > On 17.12.2018 19:41, Heiner Kallweit wrote: > > On 17.12.2018 07:41, Kunihiko Hayashi wrote: > >> Hi, > >> > >> Gentle ping... > >> Are there any comments about changes since v2? > >> &

Re: [RFC PATCH net v3] net: phy: Fix the issue that netif always links up after resuming

2018-12-16 Thread Kunihiko Hayashi
> > This patch adds a new convenient function to check whether the PHY is in > a started state, and expects to solve the issue by changing phydev->state > to PHY_UP and calling phy_start_machine() only when the PHY is started. > > Suggested-by: Heiner Kallweit > Signed-of

[RFC PATCH net v3] net: phy: Fix the issue that netif always links up after resuming

2018-12-03 Thread Kunihiko Hayashi
s started. Suggested-by: Heiner Kallweit Signed-off-by: Kunihiko Hayashi --- Changes since v2: - add mutex lock/unlock for changing phydev->state - check whether the mutex is locked in phy_is_started() Changes since v1: - introduce a new helper function phy_is_started() and use it instead of

Re: [RFC PATCH net v2] net: phy: Fix the issue that netif always links up after resuming

2018-12-02 Thread Kunihiko Hayashi
Hi Florian Heiner, On Fri, 30 Nov 2018 19:47:37 +0100 wrote: > On 30.11.2018 18:46, Florian Fainelli wrote: > > > > > > On 11/30/2018 1:25 AM, Kunihiko Hayashi wrote: > >> Even though the link is down before entering hibernation, > >> there is an issue

[RFC PATCH net v2] net: phy: Fix the issue that netif always links up after resuming

2018-11-30 Thread Kunihiko Hayashi
s started. Suggested-by: Heiner Kallweit Signed-off-by: Kunihiko Hayashi --- drivers/net/phy/phy.c| 2 +- drivers/net/phy/phy_device.c | 9 + include/linux/phy.h | 10 ++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/phy.c b/driver

Re: [RFC PATCH net] net: phy: fix the issue that netif always links up after resuming

2018-11-29 Thread Kunihiko Hayashi
Hi Heiner, On Fri, 30 Nov 2018 07:20:27 +0100 wrote: > On 30.11.2018 05:37, Kunihiko Hayashi wrote: > > Hi Heiner Florian, > > > > Thank you for your comments. > > > > On Thu, 29 Nov 2018 16:37:48 -0800 wrote: > > > >> > >> &g

Re: [RFC PATCH net] net: phy: fix the issue that netif always links up after resuming

2018-11-29 Thread Kunihiko Hayashi
Hi Heiner Florian, Thank you for your comments. On Thu, 29 Nov 2018 16:37:48 -0800 wrote: > > > On 11/29/2018 2:47 PM, Heiner Kallweit wrote: > > On 29.11.2018 09:12, Kunihiko Hayashi wrote: > >> Even though the link is down before entering hibernation, > &g

[RFC PATCH net] net: phy: fix the issue that netif always links up after resuming

2018-11-29 Thread Kunihiko Hayashi
ate is forcibly set to PHY_UP in mdio_bus_phy_restore(), and the link becomes up. This patch expects to solve the issue by changing phydev->state to PHY_UP only when the link is up. Signed-off-by: Kunihiko Hayashi --- drivers/net/phy/phy_device.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH net 0/3] fixup AVE ethernet driver

2018-11-29 Thread Kunihiko Hayashi
This series adds fixup for AVE ethernet driver that includes increse of descriptors, replacing macro for linux-next, and adding missing author information. Kunihiko Hayashi (3): net: ethernet: ave: Increase descriptors to improve performance net: ethernet: ave: Replace NET_IP_ALIGN with

[PATCH net 1/3] net: ethernet: ave: Increase descriptors to improve performance

2018-11-29 Thread Kunihiko Hayashi
To improve performance, this increases Rx descriptor to 256, Tx descriptor to 64, and adjusts NAPI weight to NAPI_POLL_WEIGHT. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net

[PATCH net 3/3] net: ethernet: ave: Add MODULE_AUTHOR and MAINTAINERS entry

2018-11-29 Thread Kunihiko Hayashi
Add missing MODULE_AUTHOR of ave driver and an entry to MAINTAINERS. Signed-off-by: Kunihiko Hayashi --- MAINTAINERS | 7 +++ drivers/net/ethernet/socionext/sni_ave.c | 1 + 2 files changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 380e43f

[PATCH net 2/3] net: ethernet: ave: Replace NET_IP_ALIGN with AVE_FRAME_HEADROOM

2018-11-29 Thread Kunihiko Hayashi
E_HEADROOM macro as hardware-specific value, and replaces NET_IP_ALIGN with it. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/ne

[PATCH net-next 1/3] net: ethernet: ave: Add suspend/resume support

2018-11-29 Thread Kunihiko Hayashi
This patch introduces suspend and resume functions to ave driver. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 44 1 file changed, 44 insertions(+) diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet

[PATCH net-next 2/3] net: ethernet: ave: Set initial wol state to disabled

2018-11-29 Thread Kunihiko Hayashi
to suspend: error -16 PM: Some devices failed to suspend, or early wake event detected In order to fix the above issue, this patch forces to set initial wol state to disabled as default. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 6 +- 1 file changed, 5

[PATCH net-next 0/3] Add suspend/resume support for AVE ethernet driver

2018-11-29 Thread Kunihiko Hayashi
This series adds support for suspend/resume to AVE ethernet driver. And to avoid the error that wol state of phy hardware is enabled by default, this sets initial wol state to disabled and add preservation the state in suspend/resume sequence. Kunihiko Hayashi (3): net: ethernet: ave: Add

[PATCH net-next 3/3] net: ethernet: ave: Preserve wol state in suspend/resume sequence

2018-11-29 Thread Kunihiko Hayashi
Since the wol state forces to be initialized after reset, the state should be preserved in suspend/resume sequence. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/socionext

Re: [PATCH] net: ethernet: ave: fix ave_start_xmit()'s return type

2018-04-24 Thread Kunihiko Hayashi
ng 'netdev_tx_t' in this driver too. > > Signed-off-by: Luc Van Oostenryck Thanks for fixing. I think it's preferable to add 'Fixes'. Fixes: 4c270b55a5af ("net: ethernet: socionext: add AVE ethernet driver") Acked-by: Kunihiko Hayashi Thank you, &

[PATCH net-next v2 2/3] dt-bindings: net: ave: add syscon-phy-mode property to configure phy-mode setting

2018-04-19 Thread Kunihiko Hayashi
Add "socionext,syscon-phy-mode" property to specify system controller that configures the settings about phy-mode. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt | 6 +- 1 file changed, 5 insert

[PATCH net-next v2 1/3] net: ethernet: ave: add multiple clocks and resets support as required property

2018-04-19 Thread Kunihiko Hayashi
t;net: ethernet: socionext: add AVE ethernet driver") Suggested-by: Masahiro Yamada Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring --- .../bindings/net/socionext,uniphier-ave4.txt | 13 ++- drivers/net/ethernet/socionext/sni_ave.c | 108 - 2 files ch

[PATCH net-next v2 0/3] ave: fix the activation issues for some UniPhier SoCs

2018-04-19 Thread Kunihiko Hayashi
the specified phy-mode - Add DT property support indicating system controller that has the feature for configurating phy-mode including built-in phy on LD11. v1: https://www.spinics.net/lists/netdev/msg494904.html Changes since v1: - Add 'Reviewed-by' lines Kunihiko Hayashi (3): net

[PATCH net-next v2 3/3] net: ethernet: ave: add support for phy-mode setting of system controller

2018-04-19 Thread Kunihiko Hayashi
,syscon-phy-mode = <&soc_glue 0>; }; ethernet@6520 { ... socionext,syscon-phy-mode = <&soc_glue 1>; }; Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada --- drivers/net/ethernet/socionext/Kconfig | 2 + drivers/net/ethernet/socionext/sni_ave.c | 150 ++

[PATCH net-next 2/3] dt-bindings: net: ave: add syscon-phy-mode property to configure phy-mode setting

2018-04-08 Thread Kunihiko Hayashi
Add "socionext,syscon-phy-mode" property to specify system controller that configures the settings about phy-mode. Signed-off-by: Kunihiko Hayashi --- Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) di

[PATCH net-next 0/3] ave: fix the activation issues for some UniPhier SoCs

2018-04-08 Thread Kunihiko Hayashi
the specified phy-mode - Add DT property support indicating system controller that has the feature for configurating phy-mode including built-in phy on LD11. Kunihiko Hayashi (3): net: ethernet: ave: add multiple clocks and resets support as required property dt-bindings: net: ave: add

[PATCH net-next 3/3] net: ethernet: ave: add support for phy-mode setting of system controller

2018-04-08 Thread Kunihiko Hayashi
,syscon-phy-mode = <&soc_glue 0>; }; ethernet@6520 { ... socionext,syscon-phy-mode = <&soc_glue 1>; }; Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada --- drivers/net/ethernet/socionext/Kconfig | 2 + drivers/net/ethernet/socionext/sni_ave.c | 150 ++

[PATCH net-next 1/3] net: ethernet: ave: add multiple clocks and resets support as required property

2018-04-08 Thread Kunihiko Hayashi
t;net: ethernet: socionext: add AVE ethernet driver") Suggested-by: Masahiro Yamada Signed-off-by: Kunihiko Hayashi --- .../bindings/net/socionext,uniphier-ave4.txt | 13 ++- drivers/net/ethernet/socionext/sni_ave.c | 108 - 2 files changed, 96 insertions(+), 2

[PATCH 2/2] net: ethernet: ave: add UniPhier PXs3 support

2018-03-23 Thread Kunihiko Hayashi
Add a compatible string and SoC data for ethernet controller on UniPhier PXs3 SoC. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext

[PATCH 0/2] net: ethernet: ave: add UniPhier PXs3 support

2018-03-23 Thread Kunihiko Hayashi
Add ethernet controller support on UniPhier PXs3 SoC. Kunihiko Hayashi (2): dt-bindings: net: ave: add PXs3 support net: ethernet: ave: add UniPhier PXs3 support Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt | 1 + drivers/net/ethernet/socionext/sni_ave.c

[PATCH 1/2] dt-bindings: net: ave: add PXs3 support

2018-03-23 Thread Kunihiko Hayashi
Add a compatible string for ethernet controller on UniPhier PXs3 SoC. Signed-off-by: Kunihiko Hayashi --- Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt b

[PATCH] net: ethernet: ave: enable Rx drop interrupt

2018-03-08 Thread Kunihiko Hayashi
This enables AVE_GI_RXDROP interrupt factor. This factor indicates depletion of Rx descriptors and the handler counts the number of dropped packets. Signed-off-by: Kunihiko Hayashi --- drivers/net/ethernet/socionext/sni_ave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: net: phy: question about phy_is_internal for generic-phy

2018-02-12 Thread Kunihiko Hayashi
7;ve checked our hardware configuration. There are internal and external MDIO buses, and the register selects between them. I'll consider to apply MDIO MUX layer to our MAC driver rather than phy_is_internal of generic-phy. Thank you, --- Best Regards, Kunihiko Hayashi

Re: net: phy: question about phy_is_internal for generic-phy

2018-02-08 Thread Kunihiko Hayashi
Hi Andrew, On Thu, 8 Feb 2018 13:51:44 +0100 wrote: > On Thu, Feb 08, 2018 at 07:09:25PM +0900, Kunihiko Hayashi wrote: > > Hello, > > > > Is there a way to specify "phy is internal" to generic phy driver, > > that is, to make phy_is_internal() functio

net: phy: question about phy_is_internal for generic-phy

2018-02-08 Thread Kunihiko Hayashi
ric phy. And I think that the meaning of "integrated" is slightly different from "internal". --- Best Regards, Kunihiko Hayashi

[PATCH net-next v9 0/2] add UniPhier AVE ethernet support

2017-12-27 Thread Kunihiko Hayashi
ave_{get,set}_wol() - remove netif_carrier functions, phydev initializer, and Tx budget check - change obsolate codes - replace ndev->{base_addr,irq} with the members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bi

[PATCH net-next v9 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-27 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Acked-by: Rob Herring Reviewed-by: Florian Fainelli --- .../bindings/net/socionext,uniphier-ave4.txt | 48 ++ 1

[PATCH net-next v9 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-27 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Reviewed-by: Andrew Lunn --- drivers/net/ethernet/Kconfig

[PATCH net-next v8 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-24 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Acked-by: Rob Herring --- .../bindings/net/socionext,uniphier-ave4.txt | 47 ++ 1 file changed, 47 insertions(+) c

[PATCH net-next v8 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-24 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Reviewed-by: Andrew Lunn --- drivers/net/ethernet/Kconfig

[PATCH net-next v8 0/2] add UniPhier AVE ethernet support

2017-12-24 Thread Kunihiko Hayashi
e members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../bindings/net/socionext,uniphier-ave4.txt | 4

Re: [PATCH net-next v7 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-21 Thread Kunihiko Hayashi
; > + mdio { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + ethphy: ethphy@1 { > > + reg = <1>; > > + }; > > + }; > > + }; > > Andrew Thank you, --- Best Regards, Kunihiko Hayashi

[PATCH net-next v7 0/2] add UniPhier AVE ethernet support

2017-12-21 Thread Kunihiko Hayashi
initions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../bindings/net/socionext,uniphier-ave4.txt | 45 + drivers/net/ethernet/Kconfig |1

[PATCH net-next v7 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-21 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Acked-by: Rob Herring --- .../bindings/net/socionext,uniphier-ave4.txt | 45 ++ 1 file changed, 45 insertions(+) c

[PATCH net-next v7 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-21 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Reviewed-by: Andrew Lunn --- drivers/net/ethernet/Kconfig

Re: [PATCH net-next v6 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-17 Thread Kunihiko Hayashi
Hello David, On Fri, 15 Dec 2017 12:57:49 -0500 David Miller wrote: > From: Kunihiko Hayashi > Date: Thu, 14 Dec 2017 19:05:10 +0900 > > > +static void ave_desc_write(struct net_device *ndev, enum desc_id id, > > + int entry, int offset, u32 val)

Re: [PATCH net-next v6 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-15 Thread Kunihiko Hayashi
Hello Florian, On Thu, 14 Dec 2017 15:24:17 -0800 wrote: > > > On 12/14/2017 02:05 AM, Kunihiko Hayashi wrote: > > DT bindings for the AVE ethernet controller found on Socionext's > > UniPhier platforms. > > > > Signed-off-by: Kunihiko Hayashi > >

[PATCH net-next v6 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-14 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Acked-by: Rob Herring --- .../bindings/net/socionext,uniphier-ave4.txt | 48 ++ 1 file changed, 48 insertions(+) c

[PATCH net-next v6 0/2] add UniPhier AVE ethernet support

2017-12-14 Thread Kunihiko Hayashi
ase_addr,irq} with the members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../bindings/net/socionext,uniphier-ave4.txt

[PATCH net-next v6 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-14 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Reviewed-by: Andrew Lunn --- drivers/net/ethernet/Kconfig

Re: [PATCH net-next v5 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-11 Thread Kunihiko Hayashi
On Mon, 11 Dec 2017 10:19:15 +0100 Phlippe Ombredanne wrote: > Dear Kunihiko-san, > > On Mon, Dec 11, 2017 at 8:57 AM, Kunihiko Hayashi > wrote: > > The UniPhier platform from Socionext provides the AVE ethernet > > controller that includes MAC and MDIO bus support

[PATCH net-next v5 0/2] add UniPhier AVE ethernet support

2017-12-10 Thread Kunihiko Hayashi
perations - add phydev check on ave_{get,set}_wol() - remove netif_carrier functions, phydev initializer, and Tx budget check - change obsolate codes - replace ndev->{base_addr,irq} with the members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihik

[PATCH net-next v5 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-10 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Reviewed-by: Andrew Lunn --- drivers/net/ethernet/Kconfig

[PATCH net-next v5 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-10 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Acked-by: Rob Herring --- .../bindings/net/socionext,uniphier-ave4.txt | 48 ++ 1 file changed, 48 insertions(+) c

Re: [PATCH net-next v4 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-12-04 Thread Kunihiko Hayashi
Hi Andrew, On Fri, 1 Dec 2017 14:49:00 +0100 Andrew Lunn wrote: > On Fri, Dec 01, 2017 at 10:03:50AM +0900, Kunihiko Hayashi wrote: > > The UniPhier platform from Socionext provides the AVE ethernet > > controller that includes MAC and MDIO bus supporting RGMII/RMII > > mod

[PATCH net-next v4 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-11-30 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- drivers/net/ethernet/Kconfig |1 + drivers/net

[PATCH net-next v4 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-11-30 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar Acked-by: Rob Herring --- .../bindings/net/socionext,uniphier-ave4.txt | 48 ++ 1 file changed, 48 insertions(+) c

[PATCH net-next v4 0/2] add UniPhier AVE ethernet support

2017-11-30 Thread Kunihiko Hayashi
etif_carrier functions, phydev initializer, and Tx budget check - change obsolate codes - replace ndev->{base_addr,irq} with the members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhi

[PATCH net-next v3 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-10-24 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- .../bindings/net/socionext,uniphier-ave4.txt | 48 ++ 1 file changed, 48 insertions(+) create mode 100644 Document

[PATCH net-next v3 0/2] add UniPhier AVE ethernet support

2017-10-24 Thread Kunihiko Hayashi
bsolate codes - replace ndev->{base_addr,irq} with the members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../binding

[PATCH net-next v3 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-10-24 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- drivers/net/ethernet/Kconfig |1 + drivers/net

Re: [PATCH net-next v2 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-10-19 Thread Kunihiko Hayashi
On Thu, 19 Oct 2017 09:29:03 +0900 wrote: > 2017-10-18 19:23 GMT+09:00 Kunihiko Hayashi : > > On Mon, 16 Oct 2017 00:08:21 +0900 wrote: > > >> priv->rst = devm_reset_control_get_optional_shared(dev, NULL); > >> if (IS_ERR(priv->rst)) > >>

Re: [PATCH net-next v2 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-10-18 Thread Kunihiko Hayashi
On Sat, 14 Oct 2017 01:41:12 +0900 wrote: > 2017-10-13 9:35 GMT+09:00 Kunihiko Hayashi : > > DT bindings for the AVE ethernet controller found on Socionext's > > UniPhier platforms. > > > > Signed-off-by: Kunihiko Hayashi > > Signed-off-by: Jassi Brar &

Re: [PATCH net-next v2 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-10-18 Thread Kunihiko Hayashi
On Mon, 16 Oct 2017 00:08:21 +0900 wrote: > 2017-10-13 9:35 GMT+09:00 Kunihiko Hayashi : > > +static int ave_probe(struct platform_device *pdev) > > +{ > > + struct device *dev = &pdev->dev; > > + struct device_node *np = dev->of_node; >

[PATCH net-next v2 0/2] add UniPhier AVE ethernet support

2017-10-12 Thread Kunihiko Hayashi
labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../bindings/net/socionext,uniphier-ave4.txt | 53 + drivers/net/ethernet/Kconfig

[PATCH net-next v2 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-10-12 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- .../bindings/net/socionext,uniphier-ave4.txt | 53 ++ 1 file changed, 53 insertions(+) create mode 100644 Document

[PATCH net-next v2 2/2] net: ethernet: socionext: add AVE ethernet driver

2017-10-12 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- drivers/net/ethernet/Kconfig |1 + drivers/net

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-21 Thread Kunihiko Hayashi
here with the clock, the block is clocked, so it can consume some > > amount of power, just do the necessary HW initialization with the clock > > enabled, then defer until ndo_open() before turning it back on. There are a number of the functions that needs clock enabled and "block reset" operations, like mdiobus_register(), phy_connect(), and so on. I tried to move such functions to ndo_open() to defer clock enabled until ndo_open(). However, the driver didn't work for some reasons of hardware restriction. I think it's hard to change this sequence. --- Best Regards, Kunihiko Hayashi

[PATCH net-next v2 1/2] net: phy: realtek: rename RTL8211F_PAGE_SELECT to RTL821x_PAGE_SELECT

2017-09-12 Thread Kunihiko Hayashi
This renames the definition of page select register from RTL8211F_PAGE_SELECT to RTL821x_PAGE_SELECT to use it across models. Signed-off-by: Kunihiko Hayashi --- Changes since v1: - new patch in this series --- drivers/net/phy/realtek.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH net-next v2 2/2] net: phy: realtek: add RTL8201F phy-id and functions

2017-09-12 Thread Kunihiko Hayashi
From: Jassi Brar Add RTL8201F phy-id and the related functions to the driver. The original patch is as follows: https://patchwork.kernel.org/patch/2538341/ Signed-off-by: Jongsung Kim Signed-off-by: Jassi Brar Signed-off-by: Kunihiko Hayashi Reviewed-by: Andrew Lunn Reviewed-by: Florian

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-12 Thread Kunihiko Hayashi
n't handled. Although ave_init() calls phy_start_aneg(), it doesn't make sense because phy driver doesn't start yet. And according to Florian's comment in ave_init(), > + phy_start_interrupts(phydev); > + > + phy_start_aneg(phydev); > > No, no, phy_start() would take care of all of that correctly for you, > you don't have have to do it just there because ave_open() eventually > calls phy_start() for you, so just drop these two calls. When moving phy_start_aneg() to ave_open(), the handler doesn't need to call phy_mac_interrupt() and I can remove it from the handler. --- Best Regards, Kunihiko Hayashi

Re: [PATCH net-next 3/3] net: phy: realtek: add RTL8201F phy-id and functions

2017-09-11 Thread Kunihiko Hayashi
Hi Andrew, Thank your for reviewing. On Sat, 9 Sep 2017 17:55:17 +0200 wrote: > On Sat, Sep 09, 2017 at 09:03:05AM +0530, Jassi Brar wrote: > > On 9 September 2017 at 00:21, Florian Fainelli wrote: > > > On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote: > > >> From:

Re: [PATCH net-next 1/3] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-09-11 Thread Kunihiko Hayashi
Hi Florian, On Fri, 8 Sep 2017 11:54:31 -0700 wrote: > On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote: > > DT bindings for the AVE ethernet controller found on Socionext's > > UniPhier platforms. > > > > Signed-off-by: Kunihiko Hayashi > > Signed-off-by:

Re: [PATCH net-next 1/3] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-09-11 Thread Kunihiko Hayashi
t; >mdio { > ethphy: ethernet-phy@6 { > reg = <6>; > }; > }; > > Andrew I see. I'll rewrite the binding example using mdio node. --- Best Regards, Kunihiko Hayashi

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-10 Thread Kunihiko Hayashi
Hi Florian, On Sat, 9 Sep 2017 09:30:58 -0700 wrote: > > > On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote: > > The UniPhier platform from Socionext provides the AVE ethernet > > controller that includes MAC and MDIO bus supporting RGMII/RMII > > modes.

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-10 Thread Kunihiko Hayashi
Hi Florian, Thank you for your comments, On Fri, 8 Sep 2017 12:31:18 -0700 wrote: > On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote: > > The UniPhier platform from Socionext provides the AVE ethernet > > controller that includes MAC and MDIO bus supporting RGMII/RMII > > mod

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-10 Thread Kunihiko Hayashi
Hi Yamada-san, Thank you for your comments, On Fri, 8 Sep 2017 23:44:13 +0900 wrote: > 2017-09-08 22:02 GMT+09:00 Kunihiko Hayashi : > > > diff --git a/drivers/net/ethernet/socionext/Kconfig > > b/drivers/net/ethernet/socionext/Kconfig > > new file mode 100644 &g

Re: [PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-10 Thread Kunihiko Hayashi
thought that the driver had to stop the own interrupt of PHY device because it might be already enabled. But surely we don't think of such a case. > > + > > + /* When PHY driver can't handle its interrupt directly, > > +* interrupt request always fails and polling method is used > > +* alternatively. In this case, the libphy says > > +* "libphy: uniphier-mdio: Can't get IRQ -1 (PHY)". > > +*/ > > + phy_start_interrupts(phydev); > > -1 is PHY_POLL. So calling phy_start_interrupts() is wrong. In fact, > you should not be calling phy_start_interrupts() at all. No other > Ethernet driver does. The phy_start_interrupts() calls request_threaded_irq(), and it wll succeed when PHY node has own 'interrupts' property. In this case, it will fail and phydev->irq sets PHY_POLL. However, phydev->irq is initialized PHY_POLL in phy_probe(), surely it isn't necessary. > > + > > + phy_start_aneg(phydev); > > + > > + return 0; > > +} > > + > > +static void ave_uninit(struct net_device *ndev) > > +{ > > + struct ave_private *priv = netdev_priv(ndev); > > + > > + phy_stop_interrupts(priv->phydev); > > And no other Ethernet driver calls phy_stop_interrupts either. > Please take a look at this. I see. I'll check it. > > > + phy_disconnect(priv->phydev); > > +} > > + > > Andrew --- Best Regards, Kunihiko Hayashi

[PATCH net-next 2/3] net: ethernet: socionext: add AVE ethernet driver

2017-09-08 Thread Kunihiko Hayashi
The UniPhier platform from Socionext provides the AVE ethernet controller that includes MAC and MDIO bus supporting RGMII/RMII modes. The controller is named AVE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- drivers/net/ethernet/Kconfig |1 + drivers/net

[PATCH net-next 0/3] add UniPhier AVE ethernet support

2017-09-08 Thread Kunihiko Hayashi
-id and functions Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../bindings/net/socionext,uniphier-ave4.txt | 44 + drivers/net/ethernet/Kconfig |1 + drivers/net/ethernet

[PATCH net-next 1/3] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-09-08 Thread Kunihiko Hayashi
DT bindings for the AVE ethernet controller found on Socionext's UniPhier platforms. Signed-off-by: Kunihiko Hayashi Signed-off-by: Jassi Brar --- .../bindings/net/socionext,uniphier-ave4.txt | 44 ++ 1 file changed, 44 insertions(+) create mode 100644 Document

[PATCH net-next 3/3] net: phy: realtek: add RTL8201F phy-id and functions

2017-09-08 Thread Kunihiko Hayashi
From: Jassi Brar Add RTL8201F phy-id and the related functions to the driver. The original patch is as follows: https://patchwork.kernel.org/patch/2538341/ Signed-off-by: Jongsung Kim Signed-off-by: Jassi Brar Signed-off-by: Kunihiko Hayashi --- drivers/net/phy/realtek.c | 45