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