mbox series

[V2,0/5] patches for stmmac

Message ID 20201204024638.31351-1-qiangqing.zhang@nxp.com
Headers show
Series patches for stmmac | expand

Message

Joakim Zhang Dec. 4, 2020, 2:46 a.m. UTC
A patch set for stmmac, fix some driver issues.

ChangeLogs:
V1->V2:
	* add Fixes tag.
	* add patch 5/5 into this patch set.

Fugang Duan (5):
  net: stmmac: increase the timeout for dma reset
  net: stmmac: start phylink instance before stmmac_hw_setup()
  net: stmmac: free tx skb buffer in stmmac_resume()
  net: stmmac: delete the eee_ctrl_timer after napi disabled
  net: stmmac: overwrite the dma_cap.addr64 according to HW design

 .../net/ethernet/stmicro/stmmac/dwmac-imx.c   |  9 +---
 .../net/ethernet/stmicro/stmmac/dwmac4_lib.c  |  2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 51 +++++++++++++++----
 include/linux/stmmac.h                        |  1 +
 4 files changed, 43 insertions(+), 20 deletions(-)

Comments

Jakub Kicinski Dec. 5, 2020, 9:39 p.m. UTC | #1
On Fri,  4 Dec 2020 10:46:33 +0800 Joakim Zhang wrote:
> A patch set for stmmac, fix some driver issues.


These don't apply cleanly to the net tree where fixes go:

https://patchwork.kernel.org/project/netdevbpf/list/?delegate=netdev&param=1&order=date

Please rebase / retest / repost.
Joakim Zhang Dec. 7, 2020, 8:13 a.m. UTC | #2
> -----Original Message-----

> From: Jakub Kicinski <kuba@kernel.org>

> Sent: 2020年12月6日 5:40

> To: Joakim Zhang <qiangqing.zhang@nxp.com>

> Cc: peppe.cavallaro@st.com; alexandre.torgue@st.com;

> joabreu@synopsys.com; davem@davemloft.net; netdev@vger.kernel.org;

> dl-linux-imx <linux-imx@nxp.com>

> Subject: Re: [PATCH V2 0/5] patches for stmmac

> 

> On Fri,  4 Dec 2020 10:46:33 +0800 Joakim Zhang wrote:

> > A patch set for stmmac, fix some driver issues.

> 

> These don't apply cleanly to the net tree where fixes go:

> 

> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw

> ork.kernel.org%2Fproject%2Fnetdevbpf%2Flist%2F%3Fdelegate%3Dnetdev%26

> param%3D1%26order%3Ddate&amp;data=04%7C01%7Cqiangqing.zhang%40

> nxp.com%7C78a0b4496e7a49d8fcfc08d899664aff%7C686ea1d3bc2b4c6fa92cd

> 99c5c301635%7C0%7C1%7C637428011934975450%7CUnknown%7CTWFpbGZ

> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn

> 0%3D%7C2000&amp;sdata=TO7GoQGWml8hlMyYV84bks1hXsAb%2FLQYue1U

> Y%2FpmIrM%3D&amp;reserved=0

> 

> Please rebase / retest / repost.


Hi Jakub,

I will rebase to the latest net tree, thanks.


Hi all guys,

I also want to report a stmmac driver issue here, someone may also suffer from it.

After I do hundreds of suspend/resume stress test, I can encounter below netdev watchdog timeout issue. Tx queue timed out then reset adapter.
===============================
suspend 1000 times
===============================

----  Test < suspend_quick_auto.sh > ended  ----
root@imx8mpevk:/unit_tests/Power_Management# [ 1347.976688] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 1358.022784] ------------[ cut here ]------------
[ 1358.027430] NETDEV WATCHDOG: eth0 (imx-dwmac): transmit queue 0 timed out
[ 1358.035469] WARNING: CPU: 2 PID: 0 at net/sched/sch_generic.c:450 dev_watchdog+0x2fc/0x30c
[ 1358.043736] Modules linked in:
[ 1358.046798] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G        W         5.8.0-rc5-next-20200717-00007-g30d24ae22e81-dirty #333
[ 1358.058011] Hardware name: NXP i.MX8MPlus EVK board (DT)
[ 1358.063324] pstate: 20000005 (nzCv daif -PAN -UAO BTYPE=--)
[ 1358.068898] pc : dev_watchdog+0x2fc/0x30c
[ 1358.072908] lr : dev_watchdog+0x2fc/0x30c
[ 1358.076915] sp : ffff800011c5bd90
[ 1358.080228] x29: ffff800011c5bd90 x28: ffff0001767f1940
[ 1358.085542] x27: 0000000000000004 x26: ffff000176e88440
[ 1358.090857] x25: 0000000000000140 x24: 00000000ffffffff
[ 1358.096171] x23: ffff000176e8839c x22: 0000000000000002
[ 1358.101484] x21: ffff8000119f6000 x20: ffff000176e88000
[ 1358.106799] x19: 0000000000000000 x18: 0000000000000030
[ 1358.112112] x17: 0000000000000001 x16: 00000018bf1a354e
[ 1358.117426] x15: ffff0001760eae70 x14: ffffffffffffffff
[ 1358.122740] x13: ffff800091c5ba77 x12: ffff800011c5ba80
[ 1358.128054] x11: ffffffffffffffff x10: ffff00017f38b7c0
[ 1358.133368] x9 : 00000000000c0000 x8 : 6928203068746520
[ 1358.138682] x7 : 3a474f4448435441 x6 : 0000000000000003
[ 1358.143996] x5 : 0000000000000000 x4 : 0000000000000000
[ 1358.149310] x3 : 0000000000000004 x2 : 0000000000000100
[ 1358.154624] x1 : b54950db346c9600 x0 : 0000000000000000
[ 1358.159939] Call trace:
[ 1358.162389]  dev_watchdog+0x2fc/0x30c
[ 1358.166055]  call_timer_fn.constprop.0+0x24/0x80
[ 1358.170673]  expire_timers+0x98/0xc4
[ 1358.174249]  run_timer_softirq+0xd0/0x200
[ 1358.178261]  efi_header_end+0x124/0x284
[ 1358.182098]  irq_exit+0xdc/0xfc
[ 1358.185241]  __handle_domain_irq+0x80/0xe0
[ 1358.189338]  gic_handle_irq+0xc8/0x170
[ 1358.193087]  el1_irq+0xbc/0x180
[ 1358.196230]  arch_cpu_idle+0x14/0x20
[ 1358.199807]  cpu_startup_entry+0x24/0x80
[ 1358.203732]  secondary_start_kernel+0x138/0x184
[ 1358.208262] ---[ end trace b422761fd811b2a7 ]---
[ 1358.213588] imx-dwmac 30bf0000.ethernet eth0: Reset adapter.
[ 1358.228037] imx-dwmac 30bf0000.ethernet eth0: PHY [stmmac-1:01] driver [RTL8211F Gigabit Ethernet] (irq=POLL)
[ 1358.246815] imx-dwmac 30bf0000.ethernet eth0: No Safety Features support found
[ 1358.254062] imx-dwmac 30bf0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 1358.264130] imx-dwmac 30bf0000.ethernet eth0: registered PTP clock
[ 1358.270374] imx-dwmac 30bf0000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 1358.279481] 8021q: adding VLAN 0 to HW filter on device eth0
[ 1360.328695] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1360.335007] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

I found this issue first in latest 5.10, and I confirm it is fine in 5.4. After a period of time digging into driver commit history, I got nothing. It should be related to stmmac core driver, un-related to platform driver.
So I think it could be reproduced on other platforms.

Could you please point me how to debug this issue? Now I don't know how to look into this issue further, as I take over ethernet driver in a short time.

Any feedback could be appreciated!

Joakim Zhang