android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jesper Nilsson 29c70b0d33 net: stmmac: allow CSR clock of 300MHz
[ Upstream commit 08dad2f4d541fcfe5e7bfda72cc6314bbfd2802f ]

The Synopsys Ethernet IP uses the CSR clock as a base clock for MDC.
The divisor used is set in the MAC_MDIO_Address register field CR
(Clock Rate)

The divisor is there to change the CSR clock into a clock that falls
below the IEEE 802.3 specified max frequency of 2.5MHz.

If the CSR clock is 300MHz, the code falls back to using the reset
value in the MAC_MDIO_Address register, as described in the comment
above this code.

However, 300MHz is actually an allowed value and the proper divider
can be estimated quite easily (it's just 1Hz difference!)

A CSR frequency of 300MHz with the maximum clock rate value of 0x5
(STMMAC_CSR_250_300M, a divisor of 124) gives somewhere around
~2.42MHz which is below the IEEE 802.3 specified maximum.

For the ARTPEC-8 SoC, the CSR clock is this problematic 300MHz,
and unfortunately, the reset-value of the MAC_MDIO_Address CR field
is 0x0.

This leads to a clock rate of zero and a divisor of 42, and gives an
MDC frequency of ~7.14MHz.

Allow CSR clock of 300MHz by making the comparison inclusive.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-30 10:09:24 +02:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 11:59:36 +02:00
arcnet
bonding bonding: 3ad: fix the concurrency between __bond_release_one() and bond_3ad_state_machine_handler() 2021-09-22 12:26:30 +02:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:47:47 -04:00
can can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters 2021-09-03 10:08:13 +02:00
dsa net: dsa: b53: Fix calculating number of switch ports 2021-09-22 12:26:45 +02:00
ethernet net: stmmac: allow CSR clock of 300MHz 2021-09-30 10:09:24 +02:00
fddi net: fddi: fix UAF in fza_probe 2021-07-25 14:35:15 +02:00
fjes fjes: check return value after calling platform_get_resource() 2021-07-19 08:53:10 +02:00
hamradio net: 6pack: fix slab-out-of-bounds in decode_data 2021-08-26 08:36:17 -04:00
hippi
hyperv
ieee802154 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl 2021-08-18 08:56:57 +02:00
ipvlan
netdevsim
phy phy: avoid unnecessary link-up delay in polling mode 2021-09-26 14:07:09 +02:00
plip
ppp ppp: Fix generating ifname when empty IFLA_IFNAME is specified 2021-08-18 08:56:59 +02:00
slip
team
usb net: hso: fix muxed tty registration 2021-09-30 10:09:22 +02:00
vmxnet3
wan
wimax
wireless ath9k: fix sleeping in atomic context 2021-09-22 12:26:36 +02:00
xen-netback
dummy.c
eql.c
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-14 09:44:31 +02:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2021-08-26 08:36:18 -04:00
vrf.c vrf: Reset skb conntrack connection on VRF rcv 2021-08-26 08:36:18 -04:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-07-14 16:53:31 +02:00
xen-netfront.c