]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan966x: fix kernel oops on ioctl when I/F is down
authorMichael Walle <michael@walle.cc>
Mon, 28 Mar 2022 22:03:50 +0000 (00:03 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 29 Mar 2022 08:47:24 +0000 (10:47 +0200)
commitf342df0dd285533fc0b0980406b123c659274439
treeb976080c4d478eceb538f851162b4121000b4318
parent6c507429ef8696767531f322fe2e12a0dc31aaed
net: lan966x: fix kernel oops on ioctl when I/F is down

ioctls handled by phy_mii_ioctl() will cause a kernel oops when the
interface is down. Fix it by making sure there is a PHY attached.

Fixes: 70e697e8ab0c ("net: lan966x: Implement SIOCSHWTSTAMP and SIOCGHWTSTAMP")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220328220350.3118969-1-michael@walle.cc
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/lan966x/lan966x_main.c