The USB core has a quirk flag to ignore specific endpoints, so rename it to be more obvious what this quirk does.
Unified · Split
| @@ -298,10 +298,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, · 297 unmodified lines | ||
| 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; |
| @@ -359,7 +359,7 @@ static const struct usb_device_id usb_quirk_list[] = { · 358 unmodified lines | ||
| 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,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 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 | |
| @@ -37,7 +37,7 @@ extern void usb_authorize_interface(struct usb_interface *); · 36 unmodified lines | ||
| 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); |
| @@ -69,7 +69,7 @@ · 68 unmodified lines | ||
| 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 */ |