Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-24 Thread Andrew Lunn
> Since 719655a14971 ("net: phy: Replace phy driver features u32 > with link_mode bitmap"), phy_probe() calls > ethtool_convert_link_mode_to_legacy_u32() with phydrv->features > as argument. Since features are NULL, we will get NULL pointer > dereference. Hi Jose Thanks for pointing that out. I

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-24 Thread Jose Abreu
On 23-10-2018 11:58, Russell King - ARM Linux wrote: > On Tue, Oct 23, 2018 at 11:28:09AM +0100, Jose Abreu wrote: >> On 23-10-2018 11:20, Russell King - ARM Linux wrote: >>> I have no idea what you're proposing there - your patches weren't copied >>> to me. >> They just set / unset

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-23 Thread Andrew Lunn
> If it's okay for Generic 10G driver I can submit only this and > manually reset PHY in stmmac driver so that I don't need to > implement custom PHY driver ... Hi Jose That is a bad idea. What happens when somebody uses a different PHY which uses a different reset sequence? Please keep with the

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-23 Thread Russell King - ARM Linux
On Tue, Oct 23, 2018 at 11:28:09AM +0100, Jose Abreu wrote: > On 23-10-2018 11:20, Russell King - ARM Linux wrote: > > I have no idea what you're proposing there - your patches weren't copied > > to me. > > They just set / unset MDIO_CTRL1_LPOWER bit in PCS. I find that > without this remote end

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-23 Thread Jose Abreu
On 23-10-2018 11:20, Russell King - ARM Linux wrote: > On Tue, Oct 23, 2018 at 11:17:50AM +0100, Jose Abreu wrote: >> On 22-10-2018 18:13, Florian Fainelli wrote: >>> On 10/22/18 8:48 AM, Russell King - ARM Linux wrote: On Mon, Oct 22, 2018 at 01:47:48PM +0100, Jose Abreu wrote: > Hello,

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-23 Thread Russell King - ARM Linux
On Tue, Oct 23, 2018 at 11:17:50AM +0100, Jose Abreu wrote: > On 22-10-2018 18:13, Florian Fainelli wrote: > > On 10/22/18 8:48 AM, Russell King - ARM Linux wrote: > >> On Mon, Oct 22, 2018 at 01:47:48PM +0100, Jose Abreu wrote: > >>> Hello, > >>> > >>> On 22-10-2018 13:28, Andrew Lunn wrote: >

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-23 Thread Jose Abreu
On 22-10-2018 18:13, Florian Fainelli wrote: > On 10/22/18 8:48 AM, Russell King - ARM Linux wrote: >> On Mon, Oct 22, 2018 at 01:47:48PM +0100, Jose Abreu wrote: >>> Hello, >>> >>> On 22-10-2018 13:28, Andrew Lunn wrote: > EXPORT_SYMBOL_GPL(gen10g_resume); > @@ -327,7 +381,7 @@ struct

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-22 Thread Florian Fainelli
On 10/22/18 8:48 AM, Russell King - ARM Linux wrote: > On Mon, Oct 22, 2018 at 01:47:48PM +0100, Jose Abreu wrote: >> Hello, >> >> On 22-10-2018 13:28, Andrew Lunn wrote: EXPORT_SYMBOL_GPL(gen10g_resume); @@ -327,7 +381,7 @@ struct phy_driver genphy_10g_driver = { .phy_id

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-22 Thread Russell King - ARM Linux
On Mon, Oct 22, 2018 at 01:47:48PM +0100, Jose Abreu wrote: > Hello, > > On 22-10-2018 13:28, Andrew Lunn wrote: > >> EXPORT_SYMBOL_GPL(gen10g_resume); > >> @@ -327,7 +381,7 @@ struct phy_driver genphy_10g_driver = { > >>.phy_id = 0x, > >>.phy_id_mask= 0x, >

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-22 Thread Jose Abreu
Hello, On 22-10-2018 13:28, Andrew Lunn wrote: >> EXPORT_SYMBOL_GPL(gen10g_resume); >> @@ -327,7 +381,7 @@ struct phy_driver genphy_10g_driver = { >> .phy_id = 0x, >> .phy_id_mask= 0x, >> .name = "Generic 10G PHY", >> -.soft_reset =

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-22 Thread Andrew Lunn
> EXPORT_SYMBOL_GPL(gen10g_resume); > @@ -327,7 +381,7 @@ struct phy_driver genphy_10g_driver = { > .phy_id = 0x, > .phy_id_mask= 0x, > .name = "Generic 10G PHY", > - .soft_reset = gen10g_no_soft_reset, > + .soft_reset =

[PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-22 Thread Jose Abreu
Implement the missing callbacks for Generic 10G PHY. Tested using XGMAC with a C45 PHY working at 10G Link. Signed-off-by: Jose Abreu Cc: Andrew Lunn Cc: Florian Fainelli Cc: "David S. Miller" Cc: Joao Pinto --- drivers/net/phy/phy-c45.c | 56 ++-