linux/drivers/net
Sven Van Asbroeck 7c3e2b771d lan743x: replace devicetree phy parse code with library function
The code in this driver which parses the devicetree to determine
the phy/fixed link setup, can be replaced by a single library
function: of_phy_get_and_connect().

Behaviour is identical, except that the library function will
complain when 'phy-connection-type' is omitted, instead of
blindly using PHY_INTERFACE_MODE_NA, which would result in an
invalid phy configuration.

The library function no longer brings out the exact phy_mode,
but the driver doesn't need this, because phy_interface_is_rgmii()
queries the phydev directly. Remove 'phy_mode' from the private
adapter struct.

While we're here, log info about the attached phy on connect,
this is useful because the phy type and connection method is now
fully configurable via the devicetree.

Tested on a lan7430 chip with built-in phy. Verified that adding
fixed-link/phy-connection-type in the devicetree results in a
fixed-link setup. Used ethtool to verify that the devicetree
settings are used.

Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # lan7430
Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201116170155.26967-1-TheSven73@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-17 10:46:20 -08:00
..
appletalk
arcnet
bonding net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE 2020-11-03 16:53:55 -08:00
caif
can treewide: rename nla_strlcpy to nla_strscpy. 2020-11-16 08:08:54 -08:00
dsa Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-12 16:54:48 -08:00
ethernet lan743x: replace devicetree phy parse code with library function 2020-11-17 10:46:20 -08:00
fddi net: fddi: skfp: ess: Remove defined but unused variable 'ID_sccs' 2020-11-03 16:35:15 -08:00
fjes
hamradio net: driver: hamradio: Fix potential unterminated string 2020-11-02 16:10:24 -08:00
hippi
hyperv
ieee802154 net: ieee802154: ca8210: Fix incorrectly named function param doc 2020-11-03 16:37:09 -08:00
ipa net: ipa: ignore the microcontroller log event 2020-11-13 15:37:07 -08:00
ipvlan
mdio
netdevsim netdevsim: Allow programming routes with nexthop objects 2020-11-06 11:28:50 -08:00
pcs
phy net: phy: don't duplicate driver name in phy_attached_print 2020-11-17 10:28:37 -08:00
plip
ppp
slip
team net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE 2020-11-03 16:53:55 -08:00
usb net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias 2020-11-12 14:58:27 -08:00
vmxnet3
wan Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-12 16:54:48 -08:00
wireguard wireguard: switch to dev_get_tstats64 2020-11-09 17:50:28 -08:00
wireless Some updates: 2020-11-13 12:03:22 -08:00
xen-netback
bareudp.c net: switch to dev_get_tstats64 2020-11-09 17:50:28 -08:00
dummy.c net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE 2020-11-03 16:53:55 -08:00
eql.c
geneve.c net: switch to dev_get_tstats64 2020-11-09 17:50:28 -08:00
gtp.c gtp: switch to dev_get_tstats64 2020-11-09 17:50:28 -08:00
ifb.c net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE 2020-11-03 16:53:55 -08:00
Kconfig net: Add mhi-net driver 2020-11-05 16:54:01 -08:00
LICENSE.SRC
loopback.c
macsec.c net: macsec: Add missing documentation for 'gro_cells' 2020-11-03 16:38:28 -08:00
macvlan.c net: macvlan: remove redundant initialization in macvlan_dev_netpoll_setup 2020-11-07 12:18:41 -08:00
macvtap.c
Makefile net: Add mhi-net driver 2020-11-05 16:54:01 -08:00
mdio.c
mhi_net.c net: Add mhi-net driver 2020-11-05 16:54:01 -08:00
mii.c
net_failover.c net: net_failover: Correct parameter name 'standby_dev' 2020-11-03 16:40:23 -08:00
netconsole.c net: netconsole: Add description for 'netconsole_target's extended attribute 2020-11-03 16:40:09 -08:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: switch to net core provided statistics counters 2020-11-09 17:50:28 -08:00
veth.c treewide: rename nla_strlcpy to nla_strscpy. 2020-11-16 08:08:54 -08:00
virtio_net.c
vrf.c vrf: Fix fast path output packet handling with async Netfilter rules 2020-11-12 07:47:06 -08:00
vsockmon.c
vxlan.c net: switch to dev_get_tstats64 2020-11-09 17:50:28 -08:00
xen-netfront.c drivers: net: xen-netfront: Fixed W=1 set but unused warnings 2020-11-02 16:03:12 -08:00