linux/drivers/net/ethernet
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
..
3com net: typhoon: Fix a typo Typoon --> Typhoon 2020-10-03 17:23:02 -07:00
8390 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
adaptec starfire: use generic power management 2020-07-01 12:58:33 -07:00
aeroflex Replace HTTP links with HTTPS ones: GRETH 10/100/1G Ethernet MAC device driver 2020-07-07 15:44:27 -07:00
agere net: ethernet: et131x: Remove redundant register read 2020-07-17 18:48:15 -07:00
alacritech treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
allwinner treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
alteon treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
altera treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
amazon net: ena: Make missed_tx stat incremental 2020-08-19 15:32:58 -07:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
apm
apple treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
aquantia net: atlantic: fix build when object tree is separate 2020-09-25 17:19:14 -07:00
arc net: arc_emac: Fix memleak in arc_mdio_probe 2020-08-24 17:59:44 -07:00
atheros net: ag71xx: add missed clk_disable_unprepare in error path of probe 2020-07-20 18:37:38 -07:00
aurora net: nb8800: fix nb8800_xmit()'s return type 2020-06-28 20:52:53 -07:00
broadcom net/ethernet/broadcom: fix spelling typo 2020-09-24 20:05:48 -07:00
brocade treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cadence net: macb: fix for pause frame receive enable bit 2020-09-06 11:58:59 -07:00
calxeda
cavium net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop 2020-09-25 16:51:31 -07:00
chelsio cxgb4: fix memory leak during module unload 2020-09-17 16:29:20 -07:00
cirrus docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
cisco treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cortina net: gemini: Fix another missing clk_disable_unprepare() in probe 2020-09-02 15:40:18 -07:00
davicom treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dec net: dec: de2104x: Increase receive ring size for Tulip 2020-09-10 15:28:53 -07:00
dlink net: sundance: Replace HTTP links with HTTPS ones 2020-07-15 17:41:34 -07:00
emulex treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ezchip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
faraday treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
freescale net: fec: Fix phy_device lookup for phy_reset_after_clk_enable() 2020-10-12 14:16:30 -07:00
fujitsu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
google
hisilicon net: hns: kerneldoc fixes 2020-09-18 14:22:58 -07:00
huawei net: hinic: fix DEVLINK build errors 2020-10-03 16:52:19 -07:00
i825xx treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ibm ibmvnic: add missing parenthesis in do_reset() 2020-09-07 14:03:11 -07:00
intel ice: preserve NVM capabilities in safe mode 2020-09-30 08:32:35 -07:00
marvell net: mvneta: fix double free of txq->buf 2020-10-04 15:07:19 -07:00
mediatek treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mellanox mlx4: handle non-napi callers to napi_poll 2020-10-12 14:02:32 -07:00
micrel ksz884x: switch from 'pci_' to 'dma_' API 2020-07-14 15:10:29 -07:00
microchip treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
moxa treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mscc net: mscc: ocelot: warn when encoding an out-of-bounds watermark value 2020-10-06 06:05:47 -07:00
myricom ethernet: myri10ge: use generic power management 2020-07-20 18:01:07 -07:00
natsemi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
neterion treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
netronome nfp: use correct define to return NONE fec 2020-09-17 17:59:12 -07:00
ni net: nixge: fix potential memory leak in nixge_probe() 2020-07-30 16:55:39 -07:00
nvidia treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
nxp
oki-semi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
packetengines treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pasemi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pensando ionic: fix txrx work accounting 2020-08-31 12:19:57 -07:00
qlogic net: qed: RDMA personality shouldn't fail VF load 2020-09-09 14:28:18 -07:00
qualcomm net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init 2020-08-11 10:36:47 -07:00
rdc r6040: switch from 'pci_' to 'dma_' API 2020-07-20 17:49:50 -07:00
realtek r8169: consider that PHY reset may still be in progress after applying firmware 2020-10-08 12:20:51 -07:00
renesas Revert "ravb: Fixed to be able to unload modules" 2020-09-23 17:38:36 -07:00
rocker net: core: introduce struct netdev_nested_priv for nested interface infrastructure 2020-09-28 15:00:15 -07:00
samsung treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
seeq treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sfc sfc: Fix error code in probe 2020-09-21 13:55:13 -07:00
sgi net: sgi: ioc3-eth: Fix the size used in some 'dma_free_coherent()' calls 2020-08-03 16:00:26 -07:00
silan sc92031: use generic power management 2020-07-30 17:43:01 -07:00
sis treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
smsc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
socionext treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
stmicro net: stmmac: Modify configuration method of EEE timers 2020-10-03 16:40:25 -07:00
sun treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
synopsys net: dwc-xlgmac: fix xlgmac_xmit()'s return type 2020-06-28 20:52:53 -07:00
tehuti treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ti net: tlan: Fix typo abitrary 2020-10-09 16:30:03 -07:00
toshiba treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tundra treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
via via-rhine: New device driver maintainer 2020-09-29 14:23:45 -07:00
wiznet treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
xilinx net: ll_temac: Use devm_platform_ioremap_resource_byname() 2020-07-30 17:44:28 -07:00
xircom treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xscale treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c net/fealnx: switch from 'pci_' to 'dma_' API 2020-07-20 18:32:49 -07:00
jme.c net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
jme.h net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
korina.c net: korina: fix kfree of rx/tx descriptor array 2020-10-12 10:05:48 -07:00
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Add locking for TX DMA channel 2020-09-23 18:01:03 -07:00