From: Ritesh Raj Sarraf <rrs@researchut.com>
To: Alan Stern <stern@rowland.harvard.edu>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: USB list <linux-usb@vger.kernel.org>,
linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: xHCI problem? [was Re: Erratic USB device behavior and device loss]
Date: Fri, 16 Sep 2016 21:12:05 +0530 [thread overview]
Message-ID: <1474040525.18741.1.camel@researchut.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1609151010240.1938-100000@iolanthe.rowland.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hello Ulf and Alan,
On Thu, 2016-09-15 at 10:16 -0400, Alan Stern wrote:
> > ---
> > drivers/mmc/host/rtsx_usb_sdmmc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c
> > b/drivers/mmc/host/rtsx_usb_sdmmc.c
> > index 6c71fc9..a59c7fa 100644
> > --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> > +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> > @@ -1314,6 +1314,7 @@ static void rtsx_usb_update_led(struct work_struct
> *work)
> > container_of(work, struct rtsx_usb_sdmmc, led_work);
> > struct rtsx_ucr *ucr = host->ucr;
> >
> > + pm_runtime_get_sync(sdmmc_dev(host));
> > mutex_lock(&ucr->dev_mutex);
> >
> > if (host->led.brightness == LED_OFF)
> > @@ -1322,6 +1323,7 @@ static void rtsx_usb_update_led(struct work_struct
> *work)
> > rtsx_usb_turn_on_led(ucr);
> >
> > mutex_unlock(&ucr->dev_mutex);
> > + pm_runtime_put(sdmmc_dev(host));
> > }
> > #endif
> >
> > --
> >
> > Although, I doubt the above is the main reason to the issues we see.
>
> I don't know -- it could well be the reason. The symptoms are
> definitely what you would expect to see if some thread was doing I/O
> without calling the pm_runtime_* routines.
>
> > Instead I think somehow the parent device (usb device) isn't being
> > properly managed through runtime PM, but not due to wrong deployment
> > in the mmc core nor in the rtsx_usb_driver, but at some place else.
> > :-)
> >
> > I started looking for calls to pm_suspend_ignore_children(dev, true),
> > which would decouple the usb device from the mmc platform device from
> > a runtime PM point of view. I found one suspicious case!
> >
> > drivers/usb/storage/realtek_cr.c:
> > pm_suspend_ignore_children(&us->pusb_intf->dev, true);
> >
> > As I am not so familiar with USB, I can't really tell why the above
> > exists, although perhaps just removing that line would be worth a
> > try!?
>
> No, the realtek_cr driver has no connection with this. It's a
> sub-module of the usb_storage driver; it uses the SCSI interface,
> not the MMC interface.
>
> > If neither of the above works, the next step could be to start
> > checking error codes in the mmc core and in the rtsx_usb_sdmmc driver,
> > from the calls to pm_runtime_get|put() and pm_runtime_enable().
>
> Let's see what this patch does.
I was able to hit it again. Please find the usbmon trace at:
https://people.debian.org/~rrs/tmp/usb-4.8.0-rc6ulf1+.log.gz
- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJX3BLOAAoJEKY6WKPy4XVpXMgP/jTyKOX/SYCPTU9twYldY7LQ
f64hpiWqXOUs+jFYM+BcrF5B5DuXiB1Wm4F3+Xm/QBN3grJD7yBq1nrhv/mAhCr3
y1gFRIbeKfZsEp1vdBov9m1jQCZzzIZlFXPmRGT/8uC/GZTHlgIeSLqBntpq9+yL
MQSE91tLVayVgaOQxpPz+uZ4PTAom19sU21Haa90ECHLKAUTJ9WncQFecjPLHMjb
4SUvgq53V2s1Yo1E85RhtgR6Nrk/Bh7qZEC1NyeganLazGbbsz9YnRcGy58x9Jiq
xmfURTtvG834CnGcGuzcRU09FGPMtXx/u57EYC6mdEMWhSglo0h6YhVxcUOtAhRD
s1gs+a6ToKTDLn6qr0cnIwG27ALyLh41QmzxEpiaZiugIEBzZ/uK3TBjzcul4Huj
v0+x2fSC0SXwGo4P3GAOnHuWUjgj3C1wElP1R3brXfO0aayESUNKzE8V7RbQIWiC
mHewSlKTiPwCr/lchaINTt2TyFcHJWOx90iV10GO5TpMyqho4AzpBpoimItrbx2t
qQJCvGzDLPjr0tPvpeWyJSfBnqCDqbJ44CY3nCFgKhTd3BXp4fDj09eBtNmSiuvu
UdZZxm84FD3BDSNX8k2W9CF81jML/4lzwliJge3uIPrXNDqGSZMxDSpd0u1EFNHf
rEQ/kP1WlArvqButQ5ZN
=fiWV
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2016-09-16 15:42 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1472132041.13456.11.camel@researchut.com>
2016-08-25 17:17 ` xHCI problem? [was Re: Erratic USB device behavior and device loss] Alan Stern
[not found] ` <Pine.LNX.4.44L0.1608251254220.1395-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-08-30 8:14 ` Ulf Hansson
[not found] ` <CAPDyKFq2SYtwWCNhSzQcxj8XdYmAhTqn6mxRKMJ7eKZAk=itWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-04 11:32 ` Ritesh Raj Sarraf
2016-09-04 18:01 ` Ritesh Raj Sarraf
[not found] ` <1473012074.5339.6.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-04 19:46 ` Alan Stern
2016-09-05 12:59 ` Ritesh Raj Sarraf
[not found] ` <1473080344.10346.4.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-05 15:58 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609051157310.25234-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-06 9:42 ` Ulf Hansson
2016-09-06 17:08 ` Ritesh Raj Sarraf
[not found] ` <CAPDyKFpnCXhdoKgoG576teC=y38vbC1x=-ehC_9EWEeKr_K6BQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-07 20:48 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609071630350.2115-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-09 10:54 ` Ulf Hansson
[not found] ` <CAPDyKFr0vEaEbsoPm6YwJD1JOQc=YR=zwi4T6Rr3gCQ4StNuvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-09 13:14 ` Ritesh Raj Sarraf
[not found] ` <1473426861.9415.2.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-09 14:04 ` Ritesh Raj Sarraf
[not found] ` <1473429884.9415.8.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-09 16:15 ` Alan Stern
2016-09-14 14:50 ` Ritesh Raj Sarraf
[not found] ` <1473864634.9913.12.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-14 15:19 ` Alan Stern
2016-09-15 13:59 ` Ulf Hansson
2016-09-15 14:16 ` Alan Stern
2016-09-16 15:42 ` Ritesh Raj Sarraf [this message]
2016-09-16 21:40 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609161729340.1657-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-17 11:42 ` Ritesh Raj Sarraf
2016-09-18 1:42 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609172131120.698-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-19 10:10 ` Ulf Hansson
2016-09-19 17:48 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609191340320.1458-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-20 12:36 ` Ritesh Raj Sarraf
2016-09-20 14:16 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609201012290.1459-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-20 15:17 ` Ritesh Raj Sarraf
[not found] ` <1474384626.21100.6.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-20 15:43 ` Alan Stern
2016-09-20 15:51 ` Ritesh Raj Sarraf
2016-09-21 11:10 ` Ritesh Raj Sarraf
[not found] ` <1474456212.8192.2.camel-7WuBAv+fczCJ8c2fQYRYNw@public.gmane.org>
2016-09-21 11:17 ` Ulf Hansson
[not found] ` <CAPDyKFrWHaPhubTsPjd7GpZcoQnGM9u1YEiy=iGpb1Qa2rJqPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-21 11:42 ` Ritesh Raj Sarraf
2016-09-21 14:37 ` Alan Stern
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=1474040525.18741.1.camel@researchut.com \
--to=rrs@researchut.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=ulf.hansson@linaro.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 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.