1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Marek Vasut 9e70485b40 net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()
[ Upstream commit 64a632da53 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-29 09:57:23 +01:00
..
3com
8390
adaptec
aeroflex
agere
alacritech
allwinner net: allwinner: Fix use correct return type for ndo_start_xmit() 2020-06-22 09:31:02 +02:00
alteon
altera
amazon net: ena: Make missed_tx stat incremental 2020-09-03 11:26:40 +02:00
amd amd-xgbe: Use __napi_schedule() in BH context 2020-04-21 09:04:43 +02:00
apm drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()' 2020-03-05 16:43:49 +01:00
apple net: bmac: Fix read of MAC address from ROM 2020-06-07 13:18:51 +02:00
aquantia net: ethernet: aquantia: Fix wrong return value 2020-08-19 08:16:20 +02:00
arc net: arc_emac: Fix memleak in arc_mdio_probe 2020-09-09 19:12:25 +02:00
atheros net: ag71xx: add missed clk_disable_unprepare in error path of probe 2020-07-29 10:18:33 +02:00
aurora
broadcom bnxt_en: Protect bnxt_set_eee() and bnxt_set_pauseparam() with mutex. 2020-09-26 18:03:14 +02:00
brocade
cadence net: macb: call pm_runtime_put_sync on failure path 2020-07-22 09:32:55 +02:00
calxeda
cavium net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop 2020-10-14 10:33:03 +02:00
chelsio cxgb4: Fix offset when clearing filter byte counters 2020-09-26 18:03:11 +02:00
cirrus net: ep93xx_eth: fix mismatch of request_mem_region in remove 2019-11-15 12:42:09 -08:00
cisco enic: prevent waking up stopped tx queues over watchdog reset 2020-02-24 08:36:21 +01:00
cortina net: gemini: Fix another missing clk_disable_unprepare() in probe 2020-09-09 19:12:28 +02:00
davicom net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt() 2020-03-12 13:00:13 +01:00
dec net: dec: de2104x: Increase receive ring size for Tulip 2020-10-07 08:01:26 +02:00
dlink
emulex drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
ezchip
faraday net: ethernet: ftgmac100: Fix DMA coherency issue with SW checksum 2019-10-28 16:22:50 -07:00
freescale net: fec: Fix phy_device lookup for phy_reset_after_clk_enable() 2020-10-29 09:57:23 +01:00
fujitsu
google net: Google gve: Remove dma_wmb() before ringing doorbell 2020-02-01 09:34:44 +00:00
hisilicon net: hns3: Fix for geneve tx checksum bug 2020-09-17 13:47:46 +02:00
hp
huawei hinic: fix a bug of ndo_stop 2020-05-20 08:20:11 +02:00
i825xx net: i82596: fix dma_alloc_attr for sni_82596 2019-10-15 20:50:05 -07:00
ibm ibmveth: Identify ingress large send packets. 2020-10-29 09:57:22 +01:00
intel iavf: Fix incorrect adapter get in iavf_resume 2020-10-14 10:33:03 +02:00
marvell octeontx2-af: change (struct qmem)->entry_sz from u8 to u16 2020-08-21 13:05:30 +02:00
mediatek net: ethernet: mtk_eth_soc: fix MTU warnings 2020-08-11 15:33:39 +02:00
mellanox mlx4: handle non-napi callers to napi_poll 2020-10-29 09:57:23 +01:00
micrel net: ks8851-ml: Fix IO operations, again 2020-04-02 15:11:01 +02:00
microchip net: microchip: encx24j600: add missed kthread_stop 2020-06-03 08:21:09 +02:00
moxa net: moxa: Fix a potential double 'free_irq()' 2020-05-20 08:20:05 +02:00
mscc net: mscc: fix in frame extraction 2020-03-05 16:43:31 +01:00
myricom
natsemi net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()' 2020-05-20 08:20:05 +02:00
neterion net: vxge: fix wrong __VA_ARGS__ usage 2020-04-17 10:49:58 +02:00
netronome nfp: use correct define to return NONE fec 2020-09-26 18:03:13 +02:00
ni net: nixge: fix potential memory leak in nixge_probe() 2020-08-05 09:59:49 +02:00
nvidia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-15 14:17:27 +02:00
nxp net: lpc-enet: fix error return code in lpc_mii_init() 2020-06-22 09:31:01 +02:00
oki-semi
packetengines
pasemi
pensando ionic: update eid test for overflow 2020-08-19 08:16:04 +02:00
qlogic net: qed: RDMA personality shouldn't fail VF load 2020-10-01 13:18:18 +02:00
qualcomm net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init 2020-08-21 13:05:37 +02:00
rdc
realtek r8169: fix RTL8168f/RTL8411 EPHY config 2020-10-14 10:33:04 +02:00
renesas Revert "ravb: Fixed to be able to unload modules" 2020-10-14 10:32:57 +02:00
rocker rocker: fix incorrect error handling in dma_rings_init 2020-06-30 15:36:45 -04:00
samsung sxgbe: Fix off by one in samsung driver strncpy size arg 2020-04-01 11:01:55 +02:00
seeq
sfc sfc: fix timestamp reconstruction at 16-bit rollover points 2020-03-21 08:11:56 +01:00
sgi
silan
sis
smsc net: smc91x: Fix possible memory leak in smc_drv_probe() 2020-07-29 10:18:32 +02:00
socionext net: ethernet: ave: Fix error returns in ave_init 2020-07-29 10:18:34 +02:00
stmicro net: stmmac: removed enabling eee in EEE set callback 2020-10-14 10:33:03 +02:00
sun net: sun: fix missing release regions in cas_init_one(). 2020-06-03 08:21:06 +02:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: fix clean up of vlan mc entries for host port 2020-09-09 19:12:25 +02:00
toshiba net: spider_net: Fix the size used in a 'dma_free_coherent()' call 2020-08-19 08:16:20 +02:00
tundra
via
wiznet
xilinx net: axienet: Propagate failure of DMA descriptor setup 2020-10-01 13:17:47 +02:00
xircom
xscale net: ethernet: ixp4xx: Standard module init 2020-02-24 08:36:27 +01:00
Kconfig net: remove netx ethernet driver 2019-09-21 19:08:31 -07:00
Makefile net: remove netx ethernet driver 2019-09-21 19:08:31 -07:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c pci-v5.4-changes 2019-09-23 19:16:01 -07:00
jme.h
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Disable IRQs only if NAPI gets scheduled 2020-09-26 18:03:15 +02:00