Welcome to the Linux Foundation Forum!

usb xhci poll time

Options

Hi,

I have a problem with the USB drivers.
My goal is to override the polling rate of a USB controller (joystick, high speed).
The requested rate is 8ms but I would like to poll it at 1ms.

I tried the suggestions here:
https://wiki.archlinux.org/index.php/Mouse_polling_rate

But this does not seem to work as the xhci drivers are used and not the ehci drivers.
The BIOS has no option to disable the USB 3.0 capabilities.

So I compiled an own kernel and now I'm trying to hardcode the polling rate to 1ms.
Note: I don't need a "clean" solution. For me also a hack would do as this machine uses USB only for USB game controllers (and a mouse/keyboard).

But I cannot find the right location. I thought I could change the polling rate in
'usb_parse_endpoint' but this does not work.
I set the 'endpoint->desc.interval' to 1 and I also put a 'printk' there to see that the line is executed but without success.
Still the polling rate is 8ms.

I tried the same in 'hid-core.c/usbhid_start:case HID_GD_JOYSTICK' but without any success.
It seems like the interval value is overwritten somewhere else.

Any help is appreciated.

(I am using the kernel 4.15.18, Ubuntu 16.04.)

Answers

  • crawlingtaipei
    Options

    This seems too late but you already found the right location to fix - usb_parse_endpoint().
    I already did the same hack as you did to reduce bInterval, (not clean way though but works fine anyway).
    or
    you can add a new quirk to usb_quirk_list[] if you want slightly more clean way.

  • maziac
    Options

    Thanks for the reply.
    Yes, I thought it is the right location (usb_parse_endpoint), but it did not work for me. Don't know why.
    I gave up on the approach to change the kernel and ended up changing the firmware requesting a different poll interval.
    That was working.

Categories

Upcoming Training