]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdio: introduce a shutdown method to mdio device drivers
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 17 Sep 2021 13:34:32 +0000 (16:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Sep 2021 11:08:37 +0000 (12:08 +0100)
commit8e8e7a39ed1a7053581b52bf73c273aac0532081
tree09808904ac90eab50601d7087cf5ba768244d2c8
parent4be373fedc81e990ba727fce75b05118338a077b
net: mdio: introduce a shutdown method to mdio device drivers

MDIO-attached devices might have interrupts and other things that might
need quiesced when we kexec into a new kernel. Things are even more
creepy when those interrupt lines are shared, and in that case it is
absolutely mandatory to disable all interrupt sources.

Moreover, MDIO devices might be DSA switches, and DSA needs its own
shutdown method to unlink from the DSA master, which is a new
requirement that appeared after commit ef603303b7c1 ("net: dsa: link
interfaces with the DSA master to get rid of lockdep warnings").

So introduce a ->shutdown method in the MDIO device driver structure.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_device.c
include/linux/mdio.h