linux/drivers/net
Marek Vasut 64a632da53 net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()
The phy_reset_after_clk_enable() is always called with ndev->phydev,
however that pointer may be NULL even though the PHY device instance
already exists and is sufficient to perform the PHY reset.

This condition happens in fec_open(), where the clock must be enabled
first, then the PHY must be reset, and then the PHY IDs can be read
out of the PHY.

If the PHY still is not bound to the MAC, but there is OF PHY node
and a matching PHY device instance already, use the OF PHY node to
obtain the PHY device instance, and then use that PHY device instance
when triggering the PHY reset.

Fixes: 1b0a83ac04 ("net: fec: add phy_reset_after_clk_enable() support")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Richard Leitner <richard.leitner@skidata.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-10-12 14:16:30 -07:00
..
appletalk treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arcnet treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
bonding net: core: introduce struct netdev_nested_priv for nested interface infrastructure 2020-09-28 15:00:15 -07:00
caif caif: fix cfv_netdev_tx()'s return type 2020-06-28 20:52:53 -07:00
can can: m_can_platform: don't call m_can_class_suspend in runtime suspend 2020-10-06 23:29:30 +02:00
dsa net: dsa: microchip: fix race condition 2020-10-12 10:00:24 -07:00
ethernet net: fec: Fix phy_device lookup for phy_reset_after_clk_enable() 2020-10-12 14:16:30 -07:00
fddi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
fjes treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hamradio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-14 14:11:49 -07:00
hyperv hv_netvsc: Add validation for untrusted Hyper-V values 2020-09-17 16:21:26 -07:00
ieee802154 ieee802154/adf7242: check status of adf7242_read_reg 2020-08-03 20:19:21 +02:00
ipa net: ipa: skip suspend/resume activities if not set up 2020-10-09 16:04:07 -07:00
ipvlan ipvlan: fix device features 2020-08-16 15:15:00 -07:00
netdevsim treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy net: phy: realtek: fix rtl8211e rx/tx delay config 2020-09-29 12:55:33 -07:00
plip treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ppp mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
slip
team net: team: fix memory leak in __team_options_register 2020-10-04 14:47:22 -07:00
usb net: usb: qmi_wwan: add Cellient MPL200 card 2020-10-08 12:26:31 -07:00
vmxnet3 vmxnet3: fix cksum offload issues for non-udp tunnels 2020-09-25 16:41:40 -07:00
wan drivers/net/wan/x25_asy: Correct the ndo_open and ndo_stop functions 2020-09-24 19:52:58 -07:00
wimax treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
wireguard wireguard: peerlookup: take lock before checking hash in replace operation 2020-09-09 11:31:38 -07:00
wireless net: core: introduce struct netdev_nested_priv for nested interface infrastructure 2020-09-28 15:00:15 -07:00
xen-netback treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig xen networking: add basic XDP support for xen-netfront 2020-07-01 15:25:14 -07:00
LICENSE.SRC
Makefile
Space.c
bareudp.c tunnels: PMTU discovery support for directly bridged IP packets 2020-08-04 13:01:45 -07:00
dummy.c
eql.c
geneve.c geneve: add transport ports in route lookup for geneve 2020-09-16 17:41:38 -07:00
gtp.c gtp: add GTPA_LINK info to msg sent to userspace 2020-08-25 06:28:53 -07:00
ifb.c
loopback.c
macsec.c macsec: avoid use-after-free in macsec_handle_frame() 2020-10-08 12:21:08 -07:00
macvlan.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macvtap.c
mdio.c
mii.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
tun.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
veth.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
virtio_net.c virtio-net: don't disable guest csum when disable LRO 2020-09-29 12:53:19 -07:00
vrf.c vrf: Handle CONFIG_SYSCTL not set 2020-07-23 17:51:04 -07:00
vsockmon.c
vxlan.c Revert "vxlan: fix tos value before xmit" 2020-08-05 12:09:10 -07:00
xen-netfront.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00