linux_dsm_epyc7002/drivers/net/ethernet/freescale
Fabio Estevam 272bb0e9e8 net: fec: Prevent unbind operation
After performing an unbind/bind operation the network is no longer
functional on i.MX6 (which has a single FEC instance):

# echo 2188000.ethernet > /sys/bus/platform/drivers/fec/unbind
# echo 2188000.ethernet > /sys/bus/platform/drivers/fec/bind
[   10.756519] pps pps0: new PPS source ptp0
[   10.792626] libphy: fec_enet_mii_bus: probed
[   10.799330] fec 2188000.ethernet eth0: registered PHC device 1
# udhcpc -i eth0
udhcpc: started, v1.31.1
[   14.985211] fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
[   14.993140] libphy: PHY fixed-0:00 not found
[   14.997643] fec 2188000.ethernet eth0: could not attach to PHY

On SoCs with two FEC instances there are some cases where one FEC instance
depends on the other one being present. One such example is i.MX28, which
has the following FEC dependency as noted in the comments:

	/*
	 * The i.MX28 dual fec interfaces are not equal.
	 * Here are the differences:
	 *
	 *  - fec0 supports MII & RMII modes while fec1 only supports RMII
	 *  - fec0 acts as the 1588 time master while fec1 is slave
	 *  - external phys can only be configured by fec0
	 *
	 * That is to say fec1 can not work independently. It only works
	 * when fec0 is working. The reason behind this design is that the
	 * second interface is added primarily for Switch mode.
	 *
	 * Because of the last point above, both phys are attached on fec0
	 * mdio interface in board design, and need to be configured by
	 * fec0 mii_bus.
	 */

Prevent the unbind operation to avoid these issues.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-02-18 12:30:21 -08:00
..
dpaa dpaa_eth: support all modes with rate adapting PHYs 2020-02-07 14:27:25 +01:00
dpaa2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 15:15:05 -08:00
enetc enetc: Don't print from enetc_sched_speed_set when link goes down 2020-01-17 11:48:38 +01:00
fman Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-01-26 10:40:21 +01:00
fs_enet net: convert suitable drivers to use phy_do_ioctl_running 2020-01-23 10:49:30 +01:00
fec_main.c net: fec: Prevent unbind operation 2020-02-18 12:30:21 -08:00
fec_mpc52xx_phy.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
fec_mpc52xx.c net: convert suitable network drivers to use phy_do_ioctl 2020-01-21 10:50:41 +01:00
fec_mpc52xx.h
fec_ptp.c net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message 2019-10-29 17:57:16 -07:00
fec.h net: fec: remove workaround to restart phylib state machine on MDIO timeout 2018-12-18 15:01:55 -08:00
fsl_pq_mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gianfar_ethtool.c gianfar: remove forward declarations 2019-09-05 12:28:14 +02:00
gianfar.c gianfar: Fix TX timestamping with a stacked DSA driver 2019-12-28 11:43:40 -08:00
gianfar.h gianfar: Maximize Rx buffer size 2019-11-06 10:25:20 -08:00
Kconfig net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32 2019-12-09 13:59:03 -06:00
Makefile net: dsa: felix: fix link error 2020-01-08 16:05:54 -08:00
ucc_geth_ethtool.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ucc_geth.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
ucc_geth.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
xgmac_mdio.c net/fsl: treat fsl,erratum-a011043 2020-01-23 21:17:13 +01:00