Re: xHCI problem? [was Re: Erratic USB device behavior and device loss]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Aug 2016, Ritesh Raj Sarraf wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> On Tue, 2016-08-23 at 15:14 -0400, Alan Stern wrote:
> > Okay, good.  The "Driver=rtsx_usb" is what I wanted to see.  Something
> > funny is going on with that driver -- it claims to support autosuspend 
> > but it doesn't ever call usb_mark_last_busy() or 
> > usb_autopm_get_interface().
> > 
> > In the meantime, can you post the output from "lsmod"?
> > 
> > Also, I'd like to see the output from the following (do this before 
> > the device disappears):
> > 
> >         cd /sys/bus/pci/devices/0000:00:14.0/usb?/usb?-4/
> >         ls -lR
> > 
> 
> Please find the asked output at the following links:
> 
> https://people.debian.org/~rrs/tmp/usb-ls-lR.txt
> https://people.debian.org/~rrs/tmp/lsmod-usb.txt

Do you happen to know which driver is being used: the memstick
(rtsx_usb_ms) or mmc (rtsx_usb_sdmmc) driver?  I suppose this may 
depend on what type of card you insert in the reader.

> I have a question though. For power saving, I use Laptop Mode Tools. Based on
> power state (AC or BATT), it enables/disables power saving knobs.
> 
> https://github.com/rickysarraf/laptop-mode-tools
> 
> Since I suspected the same problem (incapable of LPM) I have had this device
> blacklisted in Laptop Mode Tools. Here are the attributes for this particular
> device, while on battery.
> 
> rrs@learner:/sys/bus/usb/devices/1-4$ cat power/autosuspend
> 0
> 2016-08-24 / 14:47:07 ♒♒♒  ☺  
> rrs@learner:/sys/bus/usb/devices/1-4$ cat power/control 
> on
> 2016-08-24 / 14:47:34 ♒♒♒  ☺  
> rrs@learner:/sys/bus/usb/devices/1-4$ cat power/level 
> on
> 2016-08-24 / 14:47:38 ♒♒♒  ☺  
> 
> 
> While I write this, the bug hasn't triggered again. I think what may have
> happened is this:
> 
> * OS Boots
> * Goes on battery
> * LMT sets OS to power saving mode, but blacklists device 1-4
> * Eventually, the device resets (device/driver bug?)
> * Upon reset, driver re-initializes the power saving values to default (?).
>   At this time LMT will not re-apply any settings, because it only gets invoked
> when a power_supply state change is sensed, i.e. ON_BATT or ON_AC.

That sounds like a bug in LMT.  It ought to handle hotplug events.  You 
could report that to the authors.

As you mentioned above, there's another aspect to power management 
besides runtime PM, namely Link Power Management.  Perhaps the device 
can't handle LPM.

You can test this by editing the usb_device_supports_lpm() routine in 
drivers/usb/core/hub.c.  If you make it always return 0 immediately, 
that will disable LPM for all USB devices.  If the spontaneous 
disconnects don't reappear, we'll have the answer.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux