linux-stable/drivers/net/phy
Ioana Ciornei e2f016cf77 net: phy: add a shutdown procedure
In case of a board which uses a shared IRQ we can easily end up with an
IRQ storm after a forced reboot.

For example, a 'reboot -f' will trigger a call to the .shutdown()
callbacks of all devices. Because phylib does not implement that hook,
the PHY is not quiesced, thus it can very well leave its IRQ enabled.

At the next boot, if that IRQ line is found asserted by the first PHY
driver that uses it, but _before_ the driver that is _actually_ keeping
the shared IRQ asserted is probed, the IRQ is not going to be
acknowledged, thus it will keep being fired preventing the boot process
of the kernel to continue. This is even worse when the second PHY driver
is a module.

To fix this, implement the .shutdown() callback and disable the
interrupts if these are used.

Note that we are still susceptible to IRQ storms if the previous kernel
exited with a panic or if the bootloader left the shared IRQ active, but
there is absolutely nothing we can do about these cases.

Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: Andre Edich <andre.edich@microchip.com>
Cc: Antoine Tenart <atenart@kernel.org>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Divya Koppera <Divya.Koppera@microchip.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kavya Sree Kotagiri <kavyasree.kotagiri@microchip.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marco Felsch <m.felsch@pengutronix.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Mathias Kresin <dev@kresin.me>
Cc: Maxim Kochetkov <fido_max@inbox.ru>
Cc: Michael Walle <michael@walle.cc>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Philippe Schenker <philippe.schenker@toradex.com>
Cc: Willy Liu <willy.liu@realtek.com>
Cc: Yuiko Oshino <yuiko.oshino@microchip.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-05 16:31:59 -08:00
..
mscc net: phy: mscc: macsec: constify vsc8584_macsec_ops 2020-08-26 16:21:17 -07:00
adin.c net: phy: adin: implement cable-test support 2020-11-04 17:01:21 -08:00
amd.c
aquantia.h
aquantia_hwmon.c
aquantia_main.c net: phy: aquantia: use phy_read_mmd_poll_timeout() to simplify the code 2020-03-23 22:00:02 -07:00
at803x.c net: phy: at803x: constify static regulator_ops 2020-08-26 16:21:17 -07:00
ax88796b.c
bcm-cygnus.c
bcm-phy-lib.c net: phy: broadcom: don't export RDB/legacy access methods 2020-06-01 12:02:57 -07:00
bcm-phy-lib.h net: phy: broadcom: add cable test support 2020-05-13 12:52:38 -07:00
bcm7xxx.c net: phy: bcm7xxx: Add an entry for BCM72113 2020-09-21 17:16:17 -07:00
bcm63xx.c net: phy: bcm63xx: fix OOPS due to missing driver name 2020-03-03 17:37:06 -08:00
bcm87xx.c net: mdiobus: add clause 45 mdiobus accessors 2020-05-26 15:31:45 -07:00
bcm54140.c net: phy: bcm54140: add cable diagnostics support 2020-05-13 12:52:39 -07:00
bcm84881.c net: phy: bcm84881: clear settings on link down 2020-04-23 15:55:35 -07:00
broadcom.c net: phy: broadcom: fix checkpatch complains about tabs 2020-05-16 13:38:33 -07:00
cicada.c
cortina.c net: mdiobus: add clause 45 mdiobus accessors 2020-05-26 15:31:45 -07:00
davicom.c
dp83tc811.c net: phy: DP83TC811: Fix WoL in config init to be disabled 2020-05-01 15:23:44 -07:00
dp83640.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
dp83640_reg.h
dp83822.c net: phy: dp83822: Update the fiber advertisement for speed 2020-09-19 16:54:35 -07:00
dp83848.c
dp83867.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
dp83869.c net: phy: dp83869: fix unsigned comparisons against less than zero values 2020-10-03 17:08:32 -07:00
et1011c.c
fixed_phy.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
icplus.c
intel-xway.c
Kconfig mdio: fix mdio-thunder.c dependency & build error 2020-09-27 13:21:28 -07:00
linkmode.c
lxt.c
Makefile net: phy: Sort Kconfig and Makefile 2020-08-27 06:55:51 -07:00
marvell.c net: phy: marvell: add special handling of Finisar modules with 88E1111 2020-10-30 17:11:44 -07:00
marvell10g.c net: phy: marvell10g: fix null pointer dereference 2020-08-11 15:42:23 -07:00
mdio-boardinfo.c net: phy: Fixup parameters in kerneldoc 2020-07-07 12:47:10 -07:00
mdio-boardinfo.h
mdio_bus.c net: mdiobus: Remove WARN_ON_ONCE(in_interrupt()) 2020-09-29 14:02:54 -07:00
mdio_device.c net: mdio device: use flexible sleeping in reset function 2020-08-03 15:01:02 -07:00
mdio_devres.c of: mdio: provide devm_of_mdiobus_register() 2020-06-30 15:57:34 -07:00
meson-gxl.c
micrel.c net: phy: mchp: Add support for LAN8814 QUAD PHY 2020-09-11 17:41:55 -07:00
microchip.c
microchip_t1.c net: phy: microchip_t1: add lan87xx_phy_init to initialize the lan87xx phy. 2020-04-22 11:38:58 -07:00
mii_timestamper.c
national.c
nxp-tja11xx.c net: ethtool: Add generic parts of cable test TDR 2020-05-26 23:21:48 -07:00
phy-c45.c net: phy: split devices_in_package 2020-06-19 20:17:15 -07:00
phy-core.c net: phy: Document core PHY structures 2020-09-23 18:02:49 -07:00
phy.c net: phy: export phy_error and phy_trigger_machine 2020-11-05 16:31:59 -08:00
phy_device.c net: phy: add a shutdown procedure 2020-11-05 16:31:59 -08:00
phy_led_triggers.c net: phy: leds: Deduplicate link LED trigger registration 2020-10-30 10:43:37 -07:00
phylink.c net: phylink: disable BMCR_ISOLATE in phylink_mii_c22_pcs_config 2020-10-27 18:30:20 -07:00
qsemi.c
realtek.c net: phy: realtek: Add support for RTL8221B-CG series 2020-11-03 17:45:19 -08:00
rockchip.c
sfp-bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sfp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
sfp.h
smsc.c net: phy: smsc: LAN8710/20: remove PHY_RST_AFTER_CLK_EN flag 2020-09-09 14:15:02 -07:00
spi_ks8995.c net: Use kobj_to_dev() API 2020-09-28 15:14:42 -07:00
ste10Xp.c
swphy.c Update rmk's email address in various drivers 2020-04-21 17:50:09 +01:00
swphy.h
teranetics.c net: phy: remove genphy_no_soft_reset 2020-04-24 16:47:51 -07:00
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c