diff mbox series

usb: core: Add quirk for Logitech Rallybar

Message ID 20231222-rallybar-v1-1-82b2a4d3106f@chromium.org
State New
Headers show
Series usb: core: Add quirk for Logitech Rallybar | expand

Commit Message

Ricardo Ribalda Dec. 22, 2023, 10:48 p.m. UTC
Logitech Rallybar devices, despite behaving as UVC camera, they have a
different power management system than the rest of the other Logitech
cameras.

USB_QUIRK_RESET_RESUME causes undesired USB disconnects, that make the
device unusable.

These are the only two devices that have this behavior, and we do not
have the list of devices that require USB_QUIRK_RESET_RESUME, so lets
create a new lit for them that un-apply the USB_QUIRK_RESET_RESUME
quirk.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Tested with a Rallybar Mini with an Acer Chromebook Spin 513
---
 drivers/usb/core/quirks.c | 11 +++++++++++
 1 file changed, 11 insertions(+)


---
base-commit: c0f65a7c112b3cfa691cead54bcf24d6cc2182b5
change-id: 20231222-rallybar-19ce0c64d5e6

Best regards,

Comments

Sergei Shtylyov Dec. 24, 2023, 9:10 a.m. UTC | #1
On 12/23/23 1:48 AM, Ricardo Ribalda wrote:

> Logitech Rallybar devices, despite behaving as UVC camera, they have a

   "They" not meeded here...

> different power management system than the rest of the other Logitech
> cameras.
> 
> USB_QUIRK_RESET_RESUME causes undesired USB disconnects, that make the
> device unusable.
> 
> These are the only two devices that have this behavior, and we do not
> have the list of devices that require USB_QUIRK_RESET_RESUME, so lets
> create a new lit for them that un-apply the USB_QUIRK_RESET_RESUME

   s/lit/list/?

> quirk.
> 
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

[...]

MBR, Sergey
diff mbox series

Patch

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 15e9bd180a1d..cedb619994d2 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -553,6 +553,15 @@  static const struct usb_device_id usb_interface_quirk_list[] = {
 	{ }  /* terminating entry must be last */
 };
 
+static const struct usb_device_id usb_interface_unsupported_quirk_list[] = {
+	/* Logitech Rallybar VC systems*/
+	{ USB_DEVICE(0x046d, 0x089b), .driver_info = USB_QUIRK_RESET_RESUME },
+	{ USB_DEVICE(0x046d, 0x08d3), .driver_info = USB_QUIRK_RESET_RESUME },
+
+	{ }  /* terminating entry must be last */
+};
+
+
 static const struct usb_device_id usb_amd_resume_quirk_list[] = {
 	/* Lenovo Mouse with Pixart controller */
 	{ USB_DEVICE(0x17ef, 0x602e), .driver_info = USB_QUIRK_RESET_RESUME },
@@ -718,6 +727,8 @@  void usb_detect_interface_quirks(struct usb_device *udev)
 	u32 quirks;
 
 	quirks = usb_detect_static_quirks(udev, usb_interface_quirk_list);
+	quirks &= ~usb_detect_static_quirks(udev,
+					usb_interface_unsupported_quirk_list);
 	if (quirks == 0)
 		return;