linux/drivers/net
Alvin Šipraga 487994ff75 net: dsa: realtek: rtl8365mb: fix GMII caps for ports with internal PHY
Since commit a18e6521a7 ("net: phylink: handle NA interface mode in
phylink_fwnode_phy_connect()"), phylib defaults to GMII when no phy-mode
or phy-connection-type property is specified in a DSA port node of the
device tree. The same commit caused a regression in rtl8365mb whereby
phylink would fail to connect, because the driver did not advertise
support for GMII for ports with internal PHY.

It should be noted that the aforementioned regression is not because the
blamed commit was incorrect: on the contrary, the blamed commit is
correcting the previous behaviour whereby unspecified phy-mode would
cause the internal interface mode to be PHY_INTERFACE_MODE_NA. The
rtl8365mb driver only worked by accident before because it _did_
advertise support for PHY_INTERFACE_MODE_NA, despite NA being reserved
for internal use by phylink. With one mistake fixed, the other was
exposed.

Commit a5dba0f207 ("net: dsa: rtl8365mb: add GMII as user port mode")
then introduced implicit support for GMII mode on ports with internal
PHY to allow a PHY connection for device trees where the phy-mode is not
explicitly set to "internal". At this point everything was working OK
again.

Subsequently, commit 6ff6064605 ("net: dsa: realtek: convert to
phylink_generic_validate()") broke this behaviour again by discarding
the usage of rtl8365mb_phy_mode_supported() - where this GMII support
was indicated - while switching to the new .phylink_get_caps API.

With the new API, rtl8365mb_phy_mode_supported() is no longer needed.
Remove it altogether and add back the GMII capability - this time to
rtl8365mb_phylink_get_caps() - so that the above default behaviour works
for ports with internal PHY again.

Fixes: 6ff6064605 ("net: dsa: realtek: convert to phylink_generic_validate()")
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20220607184624.417641-1-alvin@pqrs.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-06-08 21:03:51 -07:00
..
appletalk net: appletalk: remove Apple/Farallon LocalTalk PC support 2022-05-11 13:08:38 +01:00
arcnet
bonding bonding: guard ns_targets by CONFIG_IPV6 2022-06-01 11:18:55 +02:00
caif caif_virtio: switch to netif_napi_add_weight() 2022-05-08 11:33:57 +01:00
can can: ctucanfd: platform: add missing dependency to HAS_IOMEM 2022-05-23 22:00:06 +02:00
dsa net: dsa: realtek: rtl8365mb: fix GMII caps for ports with internal PHY 2022-06-08 21:03:51 -07:00
ethernet Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 2022-06-08 21:02:23 -07:00
fddi net: fddi: skfp: smt: Remove extra parameters to vararg macro 2022-05-22 23:05:56 +01:00
fjes
hamradio
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-23 21:19:17 -07:00
ieee802154
ipa net: ipa: fix page free in ipa_endpoint_replenish_one() 2022-05-27 18:29:50 -07:00
ipvlan net: add netif_inherit_tso_max() 2022-05-06 12:07:56 +01:00
mctp
mdio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-05 13:03:18 -07:00
netdevsim netdevsim: rely on XFRM state direction instead of flags 2022-05-06 08:34:33 +02:00
pcs
phy net: mdio: unexport __init-annotated mdio_bus_init() 2022-06-08 10:10:13 -07:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-19 11:23:59 -07:00
slip
team
usb net: usb: qmi_wwan: Add support for Cinterion MV31 with new baseline 2022-06-01 18:09:34 -07:00
vmxnet3 net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup() 2022-05-17 12:03:52 +02:00
vxlan net: vxlan: Fix kernel coding style 2022-05-20 17:38:27 -07:00
wan net: wan: switch to netif_napi_add_weight() 2022-05-08 11:33:57 +01:00
wireguard
wireless wifi: rtw88: add a work to correct atomic scheduling warning of ::set_tim 2022-05-30 12:15:07 +03:00
wwan wwan: iosm: use a flexible array rather than allocate short objects 2022-05-20 17:56:50 -07:00
xen-netback xen/netback: fix incorrect usage of RING_HAS_UNCONSUMED_REQUESTS() 2022-05-31 12:22:22 +02:00
amt.c amt: fix wrong type string definition 2022-06-06 14:27:35 -07:00
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: loopback: enable BIG TCP packets 2022-05-16 10:18:56 +01:00
macsec.c macsec: fix UAF bug for real_dev 2022-06-01 12:01:47 +02:00
macvlan.c rtnetlink: add extack support in fdb del handlers 2022-05-09 11:58:20 +01:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c eth: amd: remove NI6510 support (ni65) 2022-05-11 13:09:59 +01:00
sungem_phy.c sungem: Prepare cleanup of powerpc's asm/prom.h 2022-05-05 15:52:27 -07:00
tap.c
thunderbolt.c
tun.c net: switch to netif_napi_add_tx() 2022-05-05 15:54:12 -07:00
veth.c veth: enable BIG TCP packets 2022-05-16 10:18:56 +01:00
virtio_net.c net: virtio: switch to netif_napi_add_weight() 2022-05-08 11:33:57 +01:00
vrf.c
vsockmon.c
xen-netfront.c xen/netfront: use xenbus_setup_ring() and xenbus_teardown_ring() 2022-05-19 14:21:58 +02:00