Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+16 -16
+4 -4
drivers/usb/core/config.c
··· 298 298 goto skip_to_next_endpoint_or_interface_descriptor; 299 299 } 300 300 301 - /* Ignore blacklisted endpoints */ 302 - if (udev->quirks & USB_QUIRK_ENDPOINT_BLACKLIST) { 303 - if (usb_endpoint_is_blacklisted(udev, ifp, d)) { 304 - dev_warn(ddev, "config %d interface %d altsetting %d has a blacklisted endpoint with address 0x%X, skipping\n", 301 + /* Ignore some endpoints */ 302 + if (udev->quirks & USB_QUIRK_ENDPOINT_IGNORE) { 303 + if (usb_endpoint_is_ignored(udev, ifp, d)) { 304 + dev_warn(ddev, "config %d interface %d altsetting %d has an ignored endpoint with address 0x%X, skipping\n", 305 305 cfgno, inum, asnum, 306 306 d->bEndpointAddress); 307 307 goto skip_to_next_endpoint_or_interface_descriptor;
+9 -9
drivers/usb/core/quirks.c
··· 359 359 360 360 /* Sound Devices USBPre2 */ 361 361 { USB_DEVICE(0x0926, 0x0202), .driver_info = 362 - USB_QUIRK_ENDPOINT_BLACKLIST }, 362 + USB_QUIRK_ENDPOINT_IGNORE }, 363 363 364 364 /* Keytouch QWERTY Panel keyboard */ 365 365 { USB_DEVICE(0x0926, 0x3333), .driver_info = ··· 493 493 }; 494 494 495 495 /* 496 - * Entries for blacklisted endpoints that should be ignored when parsing 497 - * configuration descriptors. 496 + * Entries for endpoints that should be ignored when parsing configuration 497 + * descriptors. 498 498 * 499 - * Matched for devices with USB_QUIRK_ENDPOINT_BLACKLIST. 499 + * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE. 500 500 */ 501 - static const struct usb_device_id usb_endpoint_blacklist[] = { 501 + static const struct usb_device_id usb_endpoint_ignore[] = { 502 502 { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 }, 503 503 { } 504 504 }; 505 505 506 - bool usb_endpoint_is_blacklisted(struct usb_device *udev, 507 - struct usb_host_interface *intf, 508 - struct usb_endpoint_descriptor *epd) 506 + bool usb_endpoint_is_ignored(struct usb_device *udev, 507 + struct usb_host_interface *intf, 508 + struct usb_endpoint_descriptor *epd) 509 509 { 510 510 const struct usb_device_id *id; 511 511 unsigned int address; 512 512 513 - for (id = usb_endpoint_blacklist; id->match_flags; ++id) { 513 + for (id = usb_endpoint_ignore; id->match_flags; ++id) { 514 514 if (!usb_match_device(udev, id)) 515 515 continue; 516 516
+1 -1
drivers/usb/core/usb.h
··· 37 37 extern void usb_detect_quirks(struct usb_device *udev); 38 38 extern void usb_detect_interface_quirks(struct usb_device *udev); 39 39 extern void usb_release_quirk_list(void); 40 - extern bool usb_endpoint_is_blacklisted(struct usb_device *udev, 40 + extern bool usb_endpoint_is_ignored(struct usb_device *udev, 41 41 struct usb_host_interface *intf, 42 42 struct usb_endpoint_descriptor *epd); 43 43 extern int usb_remove_device(struct usb_device *udev);
+2 -2
include/linux/usb/quirks.h
··· 69 69 /* Hub needs extra delay after resetting its port. */ 70 70 #define USB_QUIRK_HUB_SLOW_RESET BIT(14) 71 71 72 - /* device has blacklisted endpoints */ 73 - #define USB_QUIRK_ENDPOINT_BLACKLIST BIT(15) 72 + /* device has endpoints that should be ignored */ 73 + #define USB_QUIRK_ENDPOINT_IGNORE BIT(15) 74 74 75 75 #endif /* __LINUX_USB_QUIRKS_H */