Commit 91c7eaa6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: rename USB quirk to USB_QUIRK_ENDPOINT_IGNORE

The USB core has a quirk flag to ignore specific endpoints, so rename it
to be more obvious what this quirk does.

Cc: Johan Hovold <johan@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Richard Dodd <richard.o.dodd@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Jonathan Cox <jonathan@jdcox.net>
Cc: Bastien Nocera <hadess@hadess.net>
Cc: "Thiébaud Weksteen" <tweek@google.com>
Cc: Nishad Kamdar <nishadkamdar@gmail.com>
Link: https://lore.kernel.org/r/20200618094300.1887727-2-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 81c74628
...@@ -298,10 +298,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, ...@@ -298,10 +298,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
goto skip_to_next_endpoint_or_interface_descriptor; goto skip_to_next_endpoint_or_interface_descriptor;
} }
/* Ignore blacklisted endpoints */ /* Ignore some endpoints */
if (udev->quirks & USB_QUIRK_ENDPOINT_BLACKLIST) { if (udev->quirks & USB_QUIRK_ENDPOINT_IGNORE) {
if (usb_endpoint_is_blacklisted(udev, ifp, d)) { if (usb_endpoint_is_ignored(udev, ifp, d)) {
dev_warn(ddev, "config %d interface %d altsetting %d has a blacklisted endpoint with address 0x%X, skipping\n", dev_warn(ddev, "config %d interface %d altsetting %d has an ignored endpoint with address 0x%X, skipping\n",
cfgno, inum, asnum, cfgno, inum, asnum,
d->bEndpointAddress); d->bEndpointAddress);
goto skip_to_next_endpoint_or_interface_descriptor; goto skip_to_next_endpoint_or_interface_descriptor;
......
...@@ -359,7 +359,7 @@ static const struct usb_device_id usb_quirk_list[] = { ...@@ -359,7 +359,7 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Sound Devices USBPre2 */ /* Sound Devices USBPre2 */
{ USB_DEVICE(0x0926, 0x0202), .driver_info = { USB_DEVICE(0x0926, 0x0202), .driver_info =
USB_QUIRK_ENDPOINT_BLACKLIST }, USB_QUIRK_ENDPOINT_IGNORE },
/* Keytouch QWERTY Panel keyboard */ /* Keytouch QWERTY Panel keyboard */
{ USB_DEVICE(0x0926, 0x3333), .driver_info = { USB_DEVICE(0x0926, 0x3333), .driver_info =
...@@ -493,24 +493,24 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = { ...@@ -493,24 +493,24 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
}; };
/* /*
* Entries for blacklisted endpoints that should be ignored when parsing * Entries for endpoints that should be ignored when parsing configuration
* configuration descriptors. * descriptors.
* *
* Matched for devices with USB_QUIRK_ENDPOINT_BLACKLIST. * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE.
*/ */
static const struct usb_device_id usb_endpoint_blacklist[] = { static const struct usb_device_id usb_endpoint_ignore[] = {
{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 }, { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
{ } { }
}; };
bool usb_endpoint_is_blacklisted(struct usb_device *udev, bool usb_endpoint_is_ignored(struct usb_device *udev,
struct usb_host_interface *intf, struct usb_host_interface *intf,
struct usb_endpoint_descriptor *epd) struct usb_endpoint_descriptor *epd)
{ {
const struct usb_device_id *id; const struct usb_device_id *id;
unsigned int address; unsigned int address;
for (id = usb_endpoint_blacklist; id->match_flags; ++id) { for (id = usb_endpoint_ignore; id->match_flags; ++id) {
if (!usb_match_device(udev, id)) if (!usb_match_device(udev, id))
continue; continue;
......
...@@ -37,7 +37,7 @@ extern void usb_authorize_interface(struct usb_interface *); ...@@ -37,7 +37,7 @@ extern void usb_authorize_interface(struct usb_interface *);
extern void usb_detect_quirks(struct usb_device *udev); extern void usb_detect_quirks(struct usb_device *udev);
extern void usb_detect_interface_quirks(struct usb_device *udev); extern void usb_detect_interface_quirks(struct usb_device *udev);
extern void usb_release_quirk_list(void); extern void usb_release_quirk_list(void);
extern bool usb_endpoint_is_blacklisted(struct usb_device *udev, extern bool usb_endpoint_is_ignored(struct usb_device *udev,
struct usb_host_interface *intf, struct usb_host_interface *intf,
struct usb_endpoint_descriptor *epd); struct usb_endpoint_descriptor *epd);
extern int usb_remove_device(struct usb_device *udev); extern int usb_remove_device(struct usb_device *udev);
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
/* Hub needs extra delay after resetting its port. */ /* Hub needs extra delay after resetting its port. */
#define USB_QUIRK_HUB_SLOW_RESET BIT(14) #define USB_QUIRK_HUB_SLOW_RESET BIT(14)
/* device has blacklisted endpoints */ /* device has endpoints that should be ignored */
#define USB_QUIRK_ENDPOINT_BLACKLIST BIT(15) #define USB_QUIRK_ENDPOINT_IGNORE BIT(15)
#endif /* __LINUX_USB_QUIRKS_H */ #endif /* __LINUX_USB_QUIRKS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment