diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2022-01-18 14:08:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 13:05:41 +0300 |
commit | f864b6130498e6c688bcb2a41fa3afbae6b12fa3 (patch) | |
tree | dcff5ef4867153cfbc3a9a3202fb87282535ba85 /drivers/misc/Makefile | |
parent | ed27539e5a4b1ab255b9d73b4ca8c12716c0d817 (diff) | |
download | linux-f864b6130498e6c688bcb2a41fa3afbae6b12fa3.tar.xz |
net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices
commit f1131b9c23fb4a3540a774828ff49f421619f902 upstream.
On a setup with KSZ9131 and MACB drivers it happens on suspend path, from
time to time, that the PHY interrupt arrives after PHY and MACB were
suspended (PHY via genphy_suspend(), MACB via macb_suspend()). In this
case the phy_read() at the beginning of kszphy_handle_interrupt() will
fail (as MACB driver is suspended at this time) leading to phy_error()
being called and a stack trace being displayed on console. To solve this
.suspend/.resume functions for all KSZ devices implementing
.handle_interrupt were replaced with kszphy_suspend()/kszphy_resume()
which disable/enable interrupt before/after calling
genphy_suspend()/genphy_resume().
The fix has been adapted for all KSZ devices which implements
.handle_interrupt but it has been tested only on KSZ9131.
Fixes: 59ca4e58b917 ("net: phy: micrel: implement generic .handle_interrupt() callback")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/Makefile')
0 files changed, 0 insertions, 0 deletions