linux_dsm_epyc7002/drivers/net/ethernet
Heiner Kallweit b19bce0335 net: ethernet: mediatek: fix warning in phy_start_aneg
linux 5.0-rc1 shows following warning on bpi-r2/mt7623 bootup:

[ 5.170597] WARNING: CPU: 3 PID: 1 at drivers/net/phy/phy.c:548 phy_start_aneg+0x110/0x144
[ 5.178826] called from state READY
....
[ 5.264111] [<c0629fd4>] (phy_start_aneg) from [<c0e3e720>] (mtk_init+0x414/0x47c)
[ 5.271630] r7:df5f5eec r6:c0f08c48 r5:00000000 r4:dea67800
[ 5.277256] [<c0e3e30c>] (mtk_init) from [<c07dabbc>] (register_netdevice+0x98/0x51c)
[ 5.285035] r8:00000000 r7:00000000 r6:c0f97080 r5:c0f08c48 r4:dea67800
[ 5.291693] [<c07dab24>] (register_netdevice) from [<c07db06c>] (register_netdev+0x2c/0x44)
[ 5.299989] r8:00000000 r7:dea2e608 r6:deacea00 r5:dea2e604 r4:dea67800
[ 5.306646] [<c07db040>] (register_netdev) from [<c06326d8>] (mtk_probe+0x668/0x7ac)
[ 5.314336] r5:dea2e604 r4:dea2e040
[ 5.317890] [<c0632070>] (mtk_probe) from [<c05a78fc>] (platform_drv_probe+0x58/0xa8)
[ 5.325670] r10:c0f86bac r9:00000000 r8:c0fbe578 r7:00000000 r6:c0f86bac r5:00000000
[ 5.333445] r4:deacea10
[ 5.335963] [<c05a78a4>] (platform_drv_probe) from [<c05a5248>] (really_probe+0x2d8/0x424)

maybe other boards using this generic driver are affected

v2:
optimization:

- phy_set_max_speed() is only needed if you want to reduce the
  max speed, typically if the PHY supports 1Gbps but the MAC
  supports 100Mbps only.

- The pause parameters are autonegotiated. Except you have a specific
  need you normally don't need to manually fiddle with this.

- phy_start_aneg() is called implicitly by the phylib state machine,
  you shouldn't call it manually except you have a good excuse.

- netif_carrier_on/netif_carrier_off in mtk_phy_link_adjust() isn't
  needed. It's done by phy_link_change() in phylib.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-10 16:57:24 -05:00
..
3com net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
8390
adaptec
aeroflex net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
agere
alacritech
allwinner
alteon
altera
amazon net: ena: update driver version from 2.0.1 to 2.0.2 2018-11-19 15:13:00 -08:00
amd net: ethernet: don't set phylib state CHANGELINK in drivers 2018-12-18 22:07:20 -08:00
apm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-20 11:53:36 -08:00
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
arc net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
atheros atl1e: checking the status of atl1e_write_phy_reg 2018-12-27 16:23:12 -08:00
aurora
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-24 16:19:56 -08:00
brocade
cadence net: macb: remove unnecessary code 2019-01-04 12:59:09 -08:00
calxeda
cavium Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
chelsio net: cxgb4: fix various indentation issues 2019-01-10 09:30:49 -05:00
cirrus net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
cisco net: core: dev: Add extack argument to dev_open() 2018-12-06 13:26:06 -08:00
cortina net: gemini: Fix copy/paste error 2018-11-23 22:35:38 -08:00
davicom
dec net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
dlink net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
emulex net: ndo_bridge_setlink: Add extack 2018-12-12 16:34:21 -08:00
ezchip
faraday net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts 2018-11-21 16:57:39 -08:00
freescale fsl/fman: Use GFP_ATOMIC in {memac,tgec}_add_hash_mac_address() 2018-12-28 21:54:12 -08:00
fujitsu
hisilicon net: hns: Fix use after free identified by SLUB debug 2019-01-04 13:33:57 -08:00
hp
huawei net-next/hinic:add shutdown callback 2019-01-02 10:13:35 -08:00
i825xx
ibm ibmveth: fix DMA unmap error in ibmveth_xmit_start error path 2018-12-31 15:40:11 -08:00
intel ixgbe: fix Kconfig when driver is not a module 2019-01-04 14:02:16 -08:00
marvell octeontx2-af: Fix a resource leak in an error handling path in 'cgx_probe()' 2019-01-04 12:44:50 -08:00
mediatek net: ethernet: mediatek: fix warning in phy_start_aneg 2019-01-10 16:57:24 -05:00
mellanox mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion 2019-01-08 16:53:54 -05:00
micrel
microchip lan743x: Remove phy_read from link status change function 2019-01-08 16:26:12 -05:00
moxa
mscc USB/PHY patches for 4.21-rc1 2018-12-28 20:30:00 -08:00
myricom
natsemi
neterion Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-20 11:53:36 -08:00
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-12-20 17:31:36 -08:00
ni
nuvoton w90p910_ether: remove incorrect __init annotation 2018-12-14 14:42:51 -08:00
nvidia
nxp net: lpc_eth: fix trivial comment typo 2018-11-21 16:17:32 -08:00
oki-semi
packetengines
pasemi
qlogic qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory barrier 2019-01-04 12:57:30 -08:00
qualcomm net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE 2018-12-03 17:33:43 -08:00
rdc
realtek r8169: load Realtek PHY driver module before r8169 2019-01-08 16:40:00 -05:00
renesas ravb: Clean up duplex handling 2018-11-23 11:14:47 -08:00
rocker rocker, dsa, ethsw: Don't filter VLAN events on bridge itself 2018-11-23 18:02:24 -08:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
sgi
silan
sis ethernet/sis: Replace synchronize_sched() with synchronize_rcu() 2018-11-27 09:21:36 -08:00
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
socionext net: socionext: remove mmio reads on Tx 2018-12-15 13:15:19 -08:00
stmicro net: stmicro: fix a missing check of clk_prepare 2018-12-27 16:20:44 -08:00
sun niu: fix missing checks of niu_pci_eeprom_read 2018-12-27 16:19:27 -08:00
synopsys
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-03 12:53:47 -08:00
toshiba net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
tundra
via net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" 2018-11-27 16:22:23 -08:00
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Fix returned value in case of error in 'xrx200_probe()' 2018-11-16 19:46:49 -08:00
Makefile
netx-eth.c