usb: add plumbing for updating interrupt endpoint interval state
authorJonathan Bell <jonathan@raspberrypi.org>
Tue, 11 Jun 2019 09:55:00 +0000 (10:55 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:32:53 +0000 (11:32 +0000)
commit7a4cd5c53b437f0d4b8ad70c66410c2ddb0aec92
tree00943251430048f0c809d3173084285c745c07ea
parentaca36b0bb3706952bf0adb1bf0cef1a50cd6328a
usb: add plumbing for updating interrupt endpoint interval state

xHCI caches device and endpoint data after the interface is configured,
so an explicit command needs to be issued for any device driver wanting
to alter the polling interval of an endpoint.

Add usb_fixup_endpoint() to allow drivers to do this. The fixup must be
called after calculating endpoint bandwidth requirements but before any
URBs are submitted.

If polling intervals are shortened, any bandwidth reservations are no
longer valid but in practice polling intervals are only ever relaxed.

Limit the scope to interrupt transfers for now.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
drivers/usb/core/hcd.c
drivers/usb/core/message.c
include/linux/usb.h
include/linux/usb/hcd.h