History

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.

Greg Kroah-Hartman committed 6 years ago

Commit 91c7eaa1 parent 81c74624 files · +16 −16Browse files

Unified · Split

4 files
  1. drivers/usb/core/config.c +4 −4
  2. drivers/usb/core/quirks.c +9 −9
  3. drivers/usb/core/usb.h +1 −1
  4. include/linux/usb/quirks.h +2 −2
drivers/usb/core/config.c+4−4
@@ -298,10 +298,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, · 297 unmodified lines
298298 goto skip_to_next_endpoint_or_interface_descriptor;
299299 }
300300
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",
305305 cfgno, inum, asnum,
306306 d->bEndpointAddress);
307307 goto skip_to_next_endpoint_or_interface_descriptor;
drivers/usb/core/quirks.c+9−9
@@ -359,7 +359,7 @@ static const struct usb_device_id usb_quirk_list[] = { · 358 unmodified lines
359359
360360 /* Sound Devices USBPre2 */
361361 { USB_DEVICE(0x0926, 0x0202), .driver_info =
362− USB_QUIRK_ENDPOINT_BLACKLIST },
362+ USB_QUIRK_ENDPOINT_IGNORE },
363363
364364 /* Keytouch QWERTY Panel keyboard */
365365 { USB_DEVICE(0x0926, 0x3333), .driver_info =
@@ -493,24 +493,24 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = { · 127 unmodified lines
493493 };
494494
495495 /*
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.
498498 *
499− * Matched for devices with USB_QUIRK_ENDPOINT_BLACKLIST.
499+ * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE.
500500 */
501−static const struct usb_device_id usb_endpoint_blacklist[] = {
501+static const struct usb_device_id usb_endpoint_ignore[] = {
502502 { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
503503 { }
504504 };
505505
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)
509509 {
510510 const struct usb_device_id *id;
511511 unsigned int address;
512512
513− for (id = usb_endpoint_blacklist; id->match_flags; ++id) {
513+ for (id = usb_endpoint_ignore; id->match_flags; ++id) {
514514 if (!usb_match_device(udev, id))
515515 continue;
516516
drivers/usb/core/usb.h+1−1
@@ -37,7 +37,7 @@ extern void usb_authorize_interface(struct usb_interface *); · 36 unmodified lines
3737 extern void usb_detect_quirks(struct usb_device *udev);
3838 extern void usb_detect_interface_quirks(struct usb_device *udev);
3939 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,
4141 struct usb_host_interface *intf,
4242 struct usb_endpoint_descriptor *epd);
4343 extern int usb_remove_device(struct usb_device *udev);
include/linux/usb/quirks.h+2−2
@@ -69,7 +69,7 @@ · 68 unmodified lines
6969 /* Hub needs extra delay after resetting its port. */
7070 #define USB_QUIRK_HUB_SLOW_RESET BIT(14)
7171
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)
7474
7575 #endif /* __LINUX_USB_QUIRKS_H */