2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00
linux-next/drivers/net/phy
Guenter Roeck b394745df2 net: phy: Don't call phy_resume if phy_init_hw failed
After the call to phy_init_hw failed in phy_attach_direct, phy_detach is called
to detach the phy device from its network device. If the attached driver is a
generic phy driver, this also detaches the driver. Subsequently phy_resume
is called, which assumes without checking that a driver is attached to the
device. This will result in a crash such as

Unable to handle kernel paging request for data at address 0xffffffffffffff90
Faulting instruction address: 0xc0000000003a0e18
Oops: Kernel access of bad area, sig: 11 [#1]
...
NIP [c0000000003a0e18] .phy_attach_direct+0x68/0x17c
LR [c0000000003a0e6c] .phy_attach_direct+0xbc/0x17c
Call Trace:
[c0000003fc0475d0] [c0000000003a0e6c] .phy_attach_direct+0xbc/0x17c (unreliable)
[c0000003fc047670] [c0000000003a0ff8] .phy_connect_direct+0x28/0x98
[c0000003fc047700] [c0000000003f0074] .of_phy_connect+0x4c/0xa4

Only call phy_resume if phy_init_hw was successful.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-15 22:56:43 -04:00
..
amd.c phylib: Support registering a bunch of drivers 2012-07-09 00:10:56 -07:00
at803x.c phy/at8031: enable at8031 to work on interrupt mode 2014-03-29 18:20:30 -04:00
bcm7xxx.c net: phy: bcm7xxx: properly clear AFE_RX_LP_COUNTER 2014-03-26 16:19:24 -04:00
bcm63xx.c phy: bcm63xx: report Broadcom BCM63xx PHYs as internal 2013-05-27 22:42:50 -07:00
bcm87xx.c net/phy/bcm87xx: Add MODULE_LICENSE("GPL") to GPL driver 2012-09-22 15:33:46 -04:00
broadcom.c net: phy: broadcom: extract register definitions 2014-02-14 00:27:58 -05:00
cicada.c net: phy: cicada: fix checkpath errors 2013-12-18 00:49:01 -05:00
davicom.c net: phy: davicom: fix checkpath errors 2013-12-18 00:49:01 -05:00
dp83640_reg.h ptp: Added a clock driver for the National Semiconductor PHYTER. 2011-05-23 13:10:23 -07:00
dp83640.c net: ptp: move PTP classifier in its own file 2014-04-01 16:43:18 -04:00
et1011c.c net/phy: fix many "defined but unused" warnings 2010-10-05 00:34:29 -07:00
fixed.c phy: Use pr_<level> 2012-06-11 16:58:24 -07:00
icplus.c net: phy: icplus: fix checkpath error 2013-12-18 00:49:02 -05:00
Kconfig net: phy: add Broadcom BCM7xxx internal PHY driver 2014-02-14 00:27:58 -05:00
lxt.c net: phy: lxt: fix checkpath errors 2013-12-18 00:49:02 -05:00
Makefile net: phy: add Broadcom BCM7xxx internal PHY driver 2014-02-14 00:27:58 -05:00
marvell.c net: phy: marvell: provide genphy suspend/resume 2013-12-17 14:42:44 -05:00
mdio_bus.c net: phy: expose phydev->has_fixups to sysfs 2014-02-12 19:08:49 -05:00
mdio-bitbang.c Revert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free" 2012-11-14 22:32:15 -05:00
mdio-gpio.c net: mdio-gpio: warn about missing bus alias id 2014-05-09 15:51:19 -04:00
mdio-moxart.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
mdio-mux-gpio.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
mdio-mux-mmioreg.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
mdio-mux.c netdev/phy: skip disabled mdio-mux nodes 2012-08-20 02:16:00 -07:00
mdio-octeon.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
mdio-sun4i.c net: sun4i: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
micrel.c net/phy: micrel: fix bugged test on device tree loading for ksz9021 2014-04-23 14:58:58 -04:00
national.c phy: Use pr_<level> 2012-06-11 16:58:24 -07:00
phy_device.c net: phy: Don't call phy_resume if phy_init_hw failed 2014-05-15 22:56:43 -04:00
phy.c net phy: Check for aneg completion before setting state to PHY_RUNNING 2014-05-02 15:50:57 -04:00
qsemi.c net/phy: fix many "defined but unused" warnings 2010-10-05 00:34:29 -07:00
realtek.c PHY: Add RTL8201CP phy_driver to realtek 2013-11-11 14:05:03 -05:00
smsc.c net: phy: smsc: Fix config_init typo 2012-12-07 14:26:15 -05:00
spi_ks8995.c net: Micrel KSZ8864RMN 4-port managed switch support 2014-04-03 16:15:29 -04:00
ste10Xp.c phylib: Support registering a bunch of drivers 2012-07-09 00:10:56 -07:00
vitesse.c phy: Add Vitesse 8514 phy ID 2013-11-28 18:30:54 -05:00