From: Peter Wu <peter@lekensteyn.nl>
To: Hayes Wang <hayeswang@realtek.com>
Cc: "David S . Miller" <davem@davemloft.net>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Lu Baolu <baolu.lu@linux.intel.com>
Subject: Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled
Date: Tue, 8 Dec 2015 15:33:05 +0100 [thread overview]
Message-ID: <20151208143305.GB18728@al> (raw)
In-Reply-To: <0835B3720019904CB8F7AA43166CEEB2F8DAD9@RTITMBSV03.realtek.com.tw>
On Tue, Dec 08, 2015 at 12:39:12PM +0000, Hayes Wang wrote:
> Peter Wu [mailto:peter@lekensteyn.nl]
> > Sent: Tuesday, December 08, 2015 7:18 PM
> >
> > When an interface is brought up which was previously suspended (via
> > runtime PM), it would hang. This happens because napi_disable is called
> > before napi_enable.
> >
> > Solve this by avoiding napi_enable in the resume during open function
> > (netif_running is true when open is called, IFF_UP is set after a
> > successful open; netif_running is false when close is called, but IFF_UP
> > is then still set).
> >
> > While at it, remove WORK_ENABLE check from rtl8152_open (introduced with
> > the original change) because it cannot happen:
> >
> > - After this patch, runtime resume will not set it during rtl8152_open.
> > - When link is up, rtl8152_open is not called.
> > - When link is down during system/auto suspend/resume, it is not set.
> >
> > Fixes: 41cec84cf285 ("r8152: don't enable napi before rx ready")
> > Link: https://lkml.kernel.org/r/20151205105912.GA1766@al
> > Signed-off-by: Peter Wu <peter@lekensteyn.nl>
> > ---
> > v2: moved rtl_runtime_suspend_enable from close to rtl8152_suspend
>
> Acked-by: Hayes Wang <hayeswang@realtek.com>
>
> Best Regards,
> Hayes
I found another problem with runtime PM. When a device is suspended via
autosuspend and a system suspend takes place, there is no network I/O
after resume. Triggering a renegotiation (ethtool -r eth1) brings back
network activity.
Can you have a look? I guess that reset_resume needs different
treatment, but don't know how to do it properly as suspend is not called
before system reset (because the device is apparently already in
suspended state).
I think that this new issue can be addressed in a different patch, this
patch solves a more severe lockup. Opinions?
--
Kind regards,
Peter Wu
https://lekensteyn.nl
next prev parent reply other threads:[~2015-12-08 14:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 11:17 [PATCH v2] r8152: fix lockup when runtime PM is enabled Peter Wu
2015-12-08 12:39 ` Hayes Wang
2015-12-08 14:33 ` Peter Wu [this message]
2015-12-15 11:32 ` Oliver Neukum
2015-12-22 9:48 ` Hayes Wang
2015-12-22 11:01 ` Oliver Neukum
2015-12-23 3:31 ` Hayes Wang
2015-12-23 8:20 ` Oliver Neukum
2015-12-23 9:20 ` Hayes Wang
2015-12-23 10:45 ` Oliver Neukum
2015-12-23 11:15 ` Hayes Wang
2015-12-24 1:32 ` Alan Stern
2015-12-24 7:14 ` Oliver Neukum
2015-12-24 15:14 ` Alan Stern
2015-12-24 15:47 ` Oliver Neukum
2015-12-24 16:08 ` Alan Stern
2015-12-09 3:48 ` David Miller
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=20151208143305.GB18728@al \
--to=peter@lekensteyn.nl \
--cc=baolu.lu@linux.intel.com \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).