Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-26 Thread Sergei Shtylyov
On 05/24/2018 02:11 PM, Vladimir Zapolskiy wrote: > The change fixes a sleep in atomic context issue, which can be > always triggered by running 'ethtool -r' command, because > phy_start_aneg() protects phydev fields by a mutex. BTW, I was unable to trigger the BUG() with 'ethtool -r eth0' whe

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-26 Thread Sergei Shtylyov
Hello. A formal patch review this time... On 05/24/2018 02:11 PM, Vladimir Zapolskiy wrote: > The change fixes a sleep in atomic context issue, which can be > always triggered by running 'ethtool -r' command, because > phy_start_aneg() protects phydev fields by a mutex. OK so far... > An

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-26 Thread Sergei Shtylyov
Hello. A formal patch review this time... On 05/24/2018 02:11 PM, Vladimir Zapolskiy wrote: > The change fixes a sleep in atomic context issue, which can be > always triggered by running 'ethtool -r' command, because > phy_start_aneg() protects phydev fields by a mutex. OK so far... > An

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Vladimir Zapolskiy
Hello Sergei, On 05/24/2018 08:01 PM, Sergei Shtylyov wrote: > On 05/24/2018 07:44 PM, Andrew Lunn wrote: > >> The change fixes a sleep in atomic context issue, which can be >> always triggered by running 'ethtool -r' command, because >> phy_start_aneg() protects phydev fields by a mu

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Andrew Lunn
> > For it to be unsafe, i think that would mean phylib would need to call > > back into the MAC driver? The only way that could happen is via the > > adjust_link call. And that will deadlock, since it takes the same > > lock. > > > > Or am i/we missing something? > >It doesn't take any locks

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Sergei Shtylyov
On 05/24/2018 07:44 PM, Andrew Lunn wrote: > The change fixes a sleep in atomic context issue, which can be > always triggered by running 'ethtool -r' command, because > phy_start_aneg() protects phydev fields by a mutex. >> >> You don't say that *not* grabbing the spinlock is safe..

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Andrew Lunn
On Thu, May 24, 2018 at 07:18:28PM +0300, Sergei Shtylyov wrote: > Hello! > > On 05/24/2018 05:11 PM, Vladimir Zapolskiy wrote: > > >>> The change fixes a sleep in atomic context issue, which can be > >>> always triggered by running 'ethtool -r' command, because > >>> phy_start_aneg() protects ph

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Sergei Shtylyov
Hello! On 05/24/2018 05:11 PM, Vladimir Zapolskiy wrote: >>> The change fixes a sleep in atomic context issue, which can be >>> always triggered by running 'ethtool -r' command, because >>> phy_start_aneg() protects phydev fields by a mutex. You don't say that *not* grabbing the spinlock is sa

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Vladimir Zapolskiy
On 05/24/2018 04:22 PM, Andrew Lunn wrote: > On Thu, May 24, 2018 at 02:11:53PM +0300, Vladimir Zapolskiy wrote: >> The change fixes a sleep in atomic context issue, which can be >> always triggered by running 'ethtool -r' command, because >> phy_start_aneg() protects phydev fields by a mutex. >> >

Re: [PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Andrew Lunn
On Thu, May 24, 2018 at 02:11:53PM +0300, Vladimir Zapolskiy wrote: > The change fixes a sleep in atomic context issue, which can be > always triggered by running 'ethtool -r' command, because > phy_start_aneg() protects phydev fields by a mutex. > > Another note is that the change implicitly repl

[PATCH 1/6] ravb: remove custom .nway_reset from ethtool ops

2018-05-24 Thread Vladimir Zapolskiy
The change fixes a sleep in atomic context issue, which can be always triggered by running 'ethtool -r' command, because phy_start_aneg() protects phydev fields by a mutex. Another note is that the change implicitly replaces phy_start_aneg() with a newer phy_restart_aneg(). Signed-off-by: Vladimi