RE: USB xHCI regression after upgrading from kernel 3.19.0-51 to 4.2.0-34.]

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

 



On Wed, 13 Apr 2016, Matthew Giassa wrote:

> Hi Felipe, Mathias;
> 
> I pulled a clean copy of v4.5 and applied the patch suggested by Felipe,
> and the issue is no longer present. I would like to disable this
> behavior via changes to my software instead of requiring customers to
> build a custom kernel. What would be the ideal solution to this issue?
> Would it be acceptable to wrap the lines of code with an if-else using a
> new kernel boot parameter?
> 
> Mathias also provided a suggestion that I could put in to my code:
> > If that is the issue then adding pm_runtime_get_xxx() will increase the device
> > usage count before you know you are going to use a device. It prevents runtime suspend.
> > Then once you know the device is going to be idle, decrease the referece cound
> > with a pm_runtime_put().
> 
> May I please request a short code snippet on how I could get the `struct
> device*' handle, assuming I have a libusb_device_handle and the bus/dev
> number of the camera in use? I'm not very familiar with the core USB
> API, and would just need to know how to do the set/reset logic to
> prevent runtime suspend.

It is possible to disable LPM for one particular device, based on the 
vendor and product IDs.  To do so would require a kernel patch, but 
this patch would be accepted for the mainline kernel and therefore 
would be available to everyone using these devices, not just the people 
running your software.

To write such a patch yourself, edit the drivers/core/usb/quirks.c 
file and copy one of the entries for the Blackmagic Design devices, 
changing the ID numbers as appropriate.  The USB_QUIRK_NO_LPM flag is 
the important factor.

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