Files
twx-linux/include/linux
Takashi Iwai 0c1dc2c6a8 usb: core: Add a helper function to check the validity of EP type in URB
commit e901b98738 upstream.

This patch adds a new helper function to perform a sanity check of the
given URB to see whether it contains a valid endpoint.  It's a light-
weight version of what usb_submit_urb() does, but without the kernel
warning followed by the stack trace, just returns an error code.

Especially for a driver that doesn't parse the descriptor but fills
the URB with the fixed endpoint (e.g. some quirks for non-compliant
devices), this kind of check is preferable at the probe phase before
actually submitting the urb.

Tested-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-22 09:10:51 +02:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-03-23 13:19:52 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-11-25 09:53:14 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-05-20 08:15:37 +02:00
…
…
…
…
2020-04-02 17:20:27 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-10-10 08:53:18 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-04-02 17:20:40 +02:00
…
…
…
…
…
…
…
…
…
…
…
2020-06-30 15:38:31 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-03-20 09:07:43 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-04-24 07:58:54 +02:00
…
…
…
…
…
…
2020-04-02 17:20:39 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-11-10 11:23:31 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-04-17 08:36:39 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-11-13 11:17:02 -08:00
2019-06-17 19:53:32 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-05-20 08:15:37 +02:00
…
2018-11-27 16:09:41 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-04-02 17:20:39 +02:00
…
…
…
…
…
…
2018-12-05 19:42:42 +01:00
…
…
…
…
…
…
…
…
…