All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Zhang <qiangqing.zhang@nxp.com>
To: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: "peppe.cavallaro@st.com" <peppe.cavallaro@st.com>,
	"alexandre.torgue@st.com" <alexandre.torgue@st.com>,
	"joabreu@synopsys.com" <joabreu@synopsys.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH RFC] ethernet: stmmac: clean up the code for release/suspend/resume function
Date: Fri, 11 Dec 2020 12:18:44 +0000	[thread overview]
Message-ID: <DB8PR04MB6795536B700E3E5904F149B5E6CA0@DB8PR04MB6795.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20201210170319.534c0377@xhacker.debian>


> -----Original Message-----
> From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> Sent: 2020年12月10日 17:03
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: peppe.cavallaro@st.com; alexandre.torgue@st.com;
> joabreu@synopsys.com; davem@davemloft.net; kuba@kernel.org;
> netdev@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH RFC] ethernet: stmmac: clean up the code for
> release/suspend/resume function
> > > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > > @@ -2908,8 +2908,7 @@ static int stmmac_release(struct net_device
> *dev)
> > > >         struct stmmac_priv *priv = netdev_priv(dev);
> > > >         u32 chan;
> > > >
> > > > -       if (device_may_wakeup(priv->device))
> > >
> > > This check is to prevent link speed down if the stmmac isn't a wakeup
> device.
> >
> > When we invoke .ndo_stop, we down the net device. Per my understanding,
> we can speed down the phy, no matter it is a wakeup device or not.
> 
> The problem is if the device can't wake up, then phy link will be turned off No
> need to speed down the phy before turning off it.

Yes, it makes sense. Thanks for your explanation.

Do you encounter dev_watchdog timeout after a few hundred times suspend/resume stress time with stmmac driver?
I am not familiar with ethernet driver now, could you give me some suggestions? This issue seems more related to stmmac core driver.

[  305.273935] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  315.983474] ------------[ cut here ]------------
[  315.988158] NETDEV WATCHDOG: eth0 (imx-dwmac): transmit queue 0 timed out
[  315.995044] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:450 dev_watchdog+0x2fc/0x30c
[  316.003315] Modules linked in:
[  316.006389] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.0-rc6-04451-g8ff26f5af83b-dirty #55
[  316.015012] Hardware name: Freescale i.MX8DXL EVK (DT)
[  316.020158] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--)
[  316.026178] pc : dev_watchdog+0x2fc/0x30c
[  316.030198] lr : dev_watchdog+0x2fc/0x30c
[  316.034208] sp : ffff800011c7bd90
[  316.037528] x29: ffff800011c7bd90 x28: ffff00001695b940
[  316.042852] x27: 0000000000000004 x26: ffff000016dd8480
[  316.048178] x25: 0000000000000140 x24: 00000000ffffffff
[  316.053504] x23: ffff000016dd83dc x22: 0000000000000000
[  316.058827] x21: ffff800011a76000 x20: ffff000016dd8000
[  316.064154] x19: 0000000000000000 x18: 0000000000000030
[  316.069480] x17: 0000000000000000 x16: 0000000000000000
[  316.074805] x15: ffff800011a82738 x14: ffffffffffffffff
[  316.080133] x13: ffff800011a91678 x12: 0000000000002061
[  316.085456] x11: 0000000000000acb x10: ffff800011ae9678
[  316.090781] x9 : 00000000fffff000 x8 : ffff800011a91678
[  316.096107] x7 : ffff800011ae9678 x6 : 0000000000000003
[  316.101432] x5 : 0000000000000000 x4 : 0000000000000000
[  316.106758] x3 : 0000000000000000 x2 : 0000000000000100
[  316.112081] x1 : 7290e915aa0d5b00 x0 : 0000000000000000
[  316.117409] Call trace:
[  316.119866]  dev_watchdog+0x2fc/0x30c
[  316.123542]  call_timer_fn.constprop.0+0x24/0x80
[  316.128171]  __run_timers.part.0+0x1f0/0x224
[  316.132451]  run_timer_softirq+0x3c/0x7c
[  316.136380]  efi_header_end+0x124/0x290
[  316.140227]  irq_exit+0xdc/0xfc
[  316.143371]  __handle_domain_irq+0x80/0xe0
[  316.147473]  gic_handle_irq+0xc0/0x140
[  316.151232]  el1_irq+0xbc/0x180
[  316.154379]  arch_cpu_idle+0x14/0x1c
[  316.157959]  do_idle+0x230/0x2a0
[  316.161190]  cpu_startup_entry+0x28/0x70
[  316.165116]  rest_init+0xd8/0xe8
[  316.168350]  arch_call_rest_init+0x10/0x1c
[  316.172458]  start_kernel+0x4bc/0x4f4
[  316.176121] ---[ end trace a0311227e418a672 ]---


> PS: It seems your email client isn't properly setup..
Do you mean mail timestamp?

Best Regards,
Joakim Zhang

      reply	other threads:[~2020-12-11 12:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 11:38 [PATCH RFC] ethernet: stmmac: clean up the code for release/suspend/resume function Joakim Zhang
2020-12-08 10:24 ` Jisheng Zhang
2020-12-08 10:49   ` Joakim Zhang
2020-12-10  9:03     ` Jisheng Zhang
2020-12-11 12:18       ` Joakim Zhang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB8PR04MB6795536B700E3E5904F149B5E6CA0@DB8PR04MB6795.eurprd04.prod.outlook.com \
    --to=qiangqing.zhang@nxp.com \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.