linux_dsm_epyc7002/drivers/net
René van Dorst e2c746944e net: ethernet: mediatek: Fix overlapping capability bits.
Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10.

This can causes issues on non-MT7621 devices which has the
MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) and MTK_TRGMII capability set.
The wrong TRGMII setup code can be executed. The current wrongly executed
code doesn’t do any harm on MT7623 and the TRGMII setup for the MT7623
SOC side is done in MT7530 driver So it wasn’t noticed in the test.

Move all capability bits in one enum so that they are all unique and easy
to expand in the future.

Because mtk_eth_path enum is merged in to mkt_eth_capabilities, the
variable path value is no longer between 0 to number of paths,
mtk_eth_path_name can’t be used anymore in this form. Convert the
mtk_eth_path_name array to a function to lookup the pathname.

The old code walked thru the mtk_eth_path enum, which is also merged
with mkt_eth_capabilities. Expand array mtk_eth_muxc so it can store the
name and capability bit of the mux. Convert the code so it can walk thru
the mtk_eth_muxc array.

Fixes: 8efaa653a8 ("net: ethernet: mediatek: Add MT7621 TRGMII mode support")
Signed-off-by: René van Dorst <opensource@vdorst.com>

v1->v2:
- Move all capability bits in one enum, suggested by Willem de Bruijn
- Convert the mtk_eth_path_name array to a function to lookup the pathname
- Expand array mtk_eth_muxc so it can also store the name and capability
  bit of the mux
- Updated commit message

Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-04 12:37:10 -07:00
..
appletalk
arcnet treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
bonding bonding: add an option to specify a delay between peer notifications 2019-07-04 12:30:48 -07:00
caif treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
can SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
dsa net: dsa: sja1105: Mark in-band AN modes not supported for PHYLINK 2019-06-28 09:31:31 -07:00
ethernet net: ethernet: mediatek: Fix overlapping capability bits. 2019-07-04 12:37:10 -07:00
fddi net: fddi: skfp: Remove unused private PCI definitions 2019-06-26 13:05:42 -07:00
fjes fjes: no need to check return value of debugfs_create functions 2019-06-22 16:43:08 -07:00
hamradio treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 400 2019-06-05 17:37:13 +02:00
hippi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 128 2019-05-30 11:25:13 -07:00
hyperv hv_netvsc: Set probe mode to sync 2019-06-14 19:47:05 -07:00
ieee802154 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-07 09:29:14 -07:00
netdevsim ipv6: Stop sending in-kernel notifications for each nexthop 2019-06-18 09:45:37 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-17 20:20:36 -07:00
plip Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-07 11:00:14 -07:00
ppp ppp: mppe: Add softdep to arc4 2019-06-22 09:44:23 -04:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
usb qmi_wwan: Fix out-of-bounds read 2019-06-24 10:07:12 -07:00
vmxnet3 vmxnet3: turn off lro when rxcsum is disabled 2019-06-04 20:05:56 -07:00
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-17 20:20:36 -07:00
wimax treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 268 2019-06-05 17:30:29 +02:00
wireless wireless-drivers-next patches for 5.3 2019-06-26 10:12:17 -07:00
xen-netback xen-netback: remove redundant assignment to err 2019-05-31 14:36:48 -07:00
dummy.c
eql.c
geneve.c SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
gtp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ifb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig
LICENSE.SRC
loopback.c loopback: fix lockdep splat 2019-07-03 11:24:38 -07:00
macsec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-07 11:00:14 -07:00
macvtap.c
Makefile
mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mii.c
net_failover.c
netconsole.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
nlmon.c
ntb_netdev.c
rionet.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sb1000.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Space.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: wake up waitqueues after IFF_UP is set 2019-06-18 10:46:52 -07:00
veth.c veth: use xdp_release_frame for XDP_PASS 2019-06-19 11:23:13 -04:00
virtio_net.c virtio_net: enable napi_tx by default 2019-06-14 19:34:27 -07:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
vsockmon.c
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-22 08:59:24 -04:00
xen-netfront.c