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

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

 



-----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


> Finally, you can try applying this patch.  It should prevent the 
> constant runtime suspend & resume cycling, but it is not the proper 
> solution to your problem.  And it may not prevent the occasional 
> spontaneous disconnect.
> 

I am building the kernel right now. I'll post back results after trying out the
new kernel. 

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.


I think your patch will clarify this once I've booted into it.

Thank you very much.

Ritesh

> Alan Stern
> 
> 
> 
> Index: usb-4.x/drivers/mfd/rtsx_usb.c
> ===================================================================
> --- usb-4.x.orig/drivers/mfd/rtsx_usb.c
> +++ usb-4.x/drivers/mfd/rtsx_usb.c
> @@ -780,7 +780,6 @@ static struct usb_driver rtsx_usb_driver
>         .pre_reset              = rtsx_usb_pre_reset,
>         .post_reset             = rtsx_usb_post_reset,
>         .id_table               = rtsx_usb_usb_ids,
> -       .supports_autosuspend   = 1,
>         .soft_unbind            = 1,
>  };
>  
- -- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXvWmNAAoJEKY6WKPy4XVpQacP/Rcdtp010vEsOMibrn0RJbJM
J7uJ/dIUgYSJXTW138BcsRmkZ+D4+OVjaPYeIDNLd9+X1gw4GDozERoVPj9BzwJ5
rCNgIY8VhtrXOScrbqzJ3rJwngqCH5rYqZgAHhSxzZJGocWlHuMvhV893toRxMd0
A97PNZAWQv9GAyquIyQDqoKm1Tu6XdB2sP+jUtbh5l6GBA/G15InxqPtj/bYHq0a
PQ8me9WFxDvFnF6wF/pCDCJbCYkv+Z4HOYvj0sD3+/HaAL1RolZG4UbO0DYEYY4j
g9eqbtcTvs0OaFD/sUZj3rT6m488byenstnDqLHtkB+8hjYdTs/Cbt7HB5/AMjd+
Fo8i/4Tru1DpkNas6iQa9RsfH/0y0c4se98RCoPmuhxyYefdFHpRspgqw61lpdmo
hnac2fa1PfvT96Pywr6gv4haFBZc3vZQS1Xs8RceXB7ZBVeaLNEWNcL1IuqHP6yn
7F2J7bUYVOinmbVzEnc1VnbaMsQlXy7cWvVrAYRgf8hkQBgs6VkBjG4YEVo82jeR
T4qk34SFpqpSWO/3OAlu2GEY+JTHQ8VrUqS5lK+0ZbI4oA1IENnTI4HPE291yNyF
f5JCZ+Nip7WlXEK1tQ8WqyVrEGhxAcPaGKvr70mgten5MATo6fCSVpevn7aemA8k
OumrBZa1Wj8r7EG5xTuv
=CkGL
-----END PGP SIGNATURE-----

--
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