mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
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 2f1e8ea726
("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>
This commit is contained in:
committed by
David S. Miller
parent
02319bf15a
commit
cf9579976f
@@ -80,6 +80,9 @@ struct mdio_driver {
|
||||
|
||||
/* Clears up any memory if needed */
|
||||
void (*remove)(struct mdio_device *mdiodev);
|
||||
|
||||
/* Quiesces the device on system shutdown, turns off interrupts etc */
|
||||
void (*shutdown)(struct mdio_device *mdiodev);
|
||||
};
|
||||
|
||||
static inline struct mdio_driver *
|
||||
|
Reference in New Issue
Block a user