linux/drivers/net/ethernet/freescale/enetc
Vladimir Oltean 0f84d403b8 net: enetc: kill PHY-less mode for PFs
Right now, a PHY-less port (no phy-mode, no fixed-link, no phy-handle)
doesn't register with phylink, but calls netif_carrier_on() from
enetc_start().

This makes sense for a VF, but for a PF, this is braindead, because we
never call enetc_mac_enable() so the MAC is left inoperational.
Furthermore, commit 71b77a7a27 ("enetc: Migrate to PHYLINK and
PCS_LYNX") put the nail in the coffin because it removed the initial
netif_carrier_off() call done right after register_netdev().

Without that call, netif_carrier_on() does not call
linkwatch_fire_event(), so the operstate remains IF_OPER_UNKNOWN.

Just deny the broken configuration by requiring that a phy-mode is
present, and always register a PF with phylink.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://lore.kernel.org/r/20220511094200.558502-1-vladimir.oltean@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-05-12 11:05:43 +02:00
..
enetc_cbdr.c net:enetc: command BD ring data memory alloc as one function alone 2022-02-09 13:23:25 +00:00
enetc_ethtool.c net: enetc: count the tc-taprio window drops 2022-05-11 16:37:10 -07:00
enetc_hw.h net: enetc: count the tc-taprio window drops 2022-05-11 16:37:10 -07:00
enetc_ierb.c net: update NXP copyright text 2021-09-17 13:52:17 +01:00
enetc_ierb.h net: update NXP copyright text 2021-09-17 13:52:17 +01:00
enetc_mdio.c enetc: use correct format characters 2022-03-17 16:30:48 -07:00
enetc_msg.c enetc: Add vf to pf messaging support 2019-01-24 21:55:53 -08:00
enetc_pci_mdio.c net: enetc: fix an issue about leak system resources 2020-05-04 10:51:20 -07:00
enetc_pf.c net: enetc: kill PHY-less mode for PFs 2022-05-12 11:05:43 +02:00
enetc_pf.h net: phy: lynx: refactor Lynx PCS module to use generic phylink_pcs 2022-01-02 18:48:47 +00:00
enetc_ptp.c net: enetc: Remove useless DMA-32 fallback configuration 2022-01-09 16:52:20 -08:00
enetc_qos.c net: enetc: manage ENETC_F_QBV in priv->active_offloads only when enabled 2022-05-11 16:37:10 -07:00
enetc_vf.c ethernet: enetc: use eth_hw_addr_set() 2021-10-16 08:53:46 +01:00
enetc.c net: enetc: count the tc-taprio window drops 2022-05-11 16:37:10 -07:00
enetc.h net: enetc: count the tc-taprio window drops 2022-05-11 16:37:10 -07:00
Kconfig net: enetc: automatically select IERB module 2021-04-20 16:56:32 -07:00
Makefile net: enetc: add a mini driver for the Integrated Endpoint Register Block 2021-04-19 15:31:45 -07:00