linux_dsm_epyc7002/drivers/net/ethernet/ibm/emac
Christian Lamparter b793f08167 net: ibm: emac: fix regression caused by emac_dt_phy_probe()
Julian Margetson reported a panic on his SAM460EX with Kernel 4.11-rc1:
| Unable to handle kernel paging request for data at address 0x00000014
| Oops: Kernel access of bad area, sig: 11 [#1]
| PREEMPT
| Canyonlands
| Modules linked in:
| CPU: 0 PID: 1 Comm: swapper Not tainted [...]
| task: ea838000 task.stack: ea836000
| NIP: c0599f5c LR: c0599dd8 CTR: 00000000
| REGS: ea837c80 TRAP: 0300   Not tainted [...]
| MSR: 00029000 <CE,EE,ME>
|  CR: 24371242  XER: 20000000
| DEAR: 00000014 ESR: 00000000
| GPR00: c0599ce8 ea837d30 ea838000 c0e52dcc c0d56ffb [...]
| NIP [c0599f5c] emac_probe+0xfb4/0x1304
| LR [c0599dd8] emac_probe+0xe30/0x1304
| Call Trace:
| [ea837d30] [c0599ce8] emac_probe+0xd40/0x1304 (unreliable)
| [ea837d80] [c0533504] platform_drv_probe+0x48/0x90
| [ea837da0] [c0531c14] driver_probe_device+0x15c/0x2c4
| [ea837dd0] [c0531e04] __driver_attach+0x88/0xb0
| ---[ end trace ... ]---

The problem is caused by emac_dt_phy_probe() returing success (0)
for existing device-trees configurations that do not specify a
"phy-handle" property. This caused the code to skip the existing
phy probe and setup. Which led to essential phy related
data-structures being uninitialized.

This patch also removes the unused variable in emac_dt_phy_connect().

Fixes: a577ca6bad ("net: emac: add support for device-tree based PHY discovery and setup")
Reported-by: Julian Margetson <runaway@candw.ms>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-08 22:15:46 -08:00
..
core.c net: ibm: emac: fix regression caused by emac_dt_phy_probe() 2017-03-08 22:15:46 -08:00
core.h net: emac: add support for device-tree based PHY discovery and setup 2017-02-22 15:36:47 -05:00
debug.c ethernet/emac/sysrq: fix inconstistent help message of sysrq key 2013-04-30 17:04:10 -07:00
debug.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
emac.h powerpc/44x: Add more changes for APM821XX EMAC driver 2012-03-06 17:07:42 -05:00
Kconfig net: emac: add support for device-tree based PHY discovery and setup 2017-02-22 15:36:47 -05:00
Makefile net: fix IBM EMAC driver after rename. 2011-08-18 21:33:49 -07:00
mal.c ibm/emac: use napi_complete_done() 2017-02-05 16:11:57 -05:00
mal.h emac: aggregation of v1-2 PLB errors for IER register 2014-05-30 16:29:57 -07:00
phy.c drivers: net: emac: add Atheros AR8035 phy initialization code 2016-05-04 13:57:14 -04:00
phy.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
rgmii.c IBM-EMAC: constify of_device_id array 2015-03-17 15:00:23 -04:00
rgmii.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
tah.c IBM-EMAC: constify of_device_id array 2015-03-17 15:00:23 -04:00
tah.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
zmii.c IBM-EMAC: constify of_device_id array 2015-03-17 15:00:23 -04:00
zmii.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00