From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: Hangs in r8152 connected to power management in kernels at least up v4.17-rc4 Date: Wed, 16 May 2018 12:09:51 +0200 Message-ID: <1526465391.25281.7.camel@suse.com> References: <1526388188.2724.5.camel@suse.com> <0835B3720019904CB8F7AA43166CEEB2D2E47ABE@RTITMBSV06.realtek.com.tw> <1526459203.25281.2.camel@suse.com> <0835B3720019904CB8F7AA43166CEEB2D2E47EB4@RTITMBSV06.realtek.com.tw> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , jslaby@suse.com To: Hayes Wang Return-path: Received: from mx2.suse.de ([195.135.220.15]:52852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbeEPKJz (ORCPT ); Wed, 16 May 2018 06:09:55 -0400 In-Reply-To: <0835B3720019904CB8F7AA43166CEEB2D2E47EB4@RTITMBSV06.realtek.com.tw> Sender: netdev-owner@vger.kernel.org List-ID: Am Mittwoch, den 16.05.2018, 10:00 +0000 schrieb Hayes Wang: > Oliver Neukum [mailto:oneukum@suse.com] > > Sent: Wednesday, May 16, 2018 4:27 PM > > [...] > > > > > > Would usb_autopm_get_interface() take a long time? > > > The driver would wake the device if it has suspended. > > > I have no idea about how usb_autopm_get_interface() works, so I don't know > > > > how to help. > > > > Hi, > > > > it basically calls r8152_resume() and makes a control request to the > > hub. I think we are spinning in rtl8152_runtime_resume(), but where? > > It has a lot of NAPI stuff. Any suggestions on how to instrument or > > trace this? > > Is rtl8152_runtime_resume() called? I don't see the name in the trace. Good question. I see nothing else that could produce a live lock. > > I guess the relative API in rtl8152_runtime_resume() are > ops->disable = rtl8153_disable; > ops->autosuspend_en = rtl8153_runtime_enable; > > And I don't find any possible dead lock in rtl8152_runtime_resume(). > > Besides, I find a similar issue as following. > https://www.spinics.net/lists/netdev/msg493512.html Well, if we have an imbalance in NAPI it should strike whereever it is used, not just in suspend(). Is there debugging for NAPI we could activate? Regards Oliver