[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e0dde746-3761-414e-8df1-eb8557cadbf8@cosmicgizmosystems.com>
Date: Sun, 28 Sep 2025 17:42:51 -0700
From: Linux Hid <linuxhid@...micgizmosystems.com>
To: Zhang Heng <zhangheng@...inos.cn>, jikos@...nel.org, bentiss@...nel.org,
staffan.melin@...illator.se
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] HID: quirks: Add device descriptor for 4c4a:4155
Hi Zhang,
The subject doesn't reflect what the patch is doing. You are not adding
a device descriptor, you are fixing a regression.
On 9/22/2025 7:24 PM, Zhang Heng wrote:
> Multiple USB devices have the same ID;
> add device descriptors to distinguish them.
>
> Fixes: 1a8953f4f774 ("HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY")
Should have a Fixes: tag referencing the regression bug.
Also a CC: tag for 1114557@...s.debian.org
Possibly a CC: tag for stable@...r.kernel.org as well?
> Tested-by: staffan.melin@...illator.se
> Signed-off-by: Zhang Heng <zhangheng@...inos.cn>
> ---
> drivers/hid/hid-quirks.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> index ffd034566e2e..d28b180abd72 100644
> --- a/drivers/hid/hid-quirks.c
> +++ b/drivers/hid/hid-quirks.c
> @@ -913,7 +913,6 @@ static const struct hid_device_id hid_ignore_list[] = {
> #endif
> { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
> { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) },
> - { HID_USB_DEVICE(USB_VENDOR_ID_SMARTLINKTECHNOLOGY, USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155) },
> { }
> };
Smartlink Technology does not own the 0x4c4a VID or the 0x4155 PID. They
are an artifact of the Jieli SDK they used in development so the
#defines should not imply ownership by Smartlink. VID 0x4c4a is
currently unassigned by the USBIF and is therefore 'reserved'.
Maybe change
USB_VENDOR_ID_SMARTLINKTECHNOLOGY to USB_VENDOR_ID_JIELI_SDK_DEFAULT
and
USB_DEVICE_ID_SMARTLINKTRCHNOLOGY_4155 to USB_DEVICE_ID_JIELI_SDK_4155?
>
> @@ -1062,6 +1061,17 @@ bool hid_ignore(struct hid_device *hdev)
> strlen(elan_acpi_id[i].id)))
> return true;
> break;
> + case USB_VENDOR_ID_SMARTLINKTECHNOLOGY:
> + /* Multiple USB devices with identical IDs (mic & touchscreen).
> + * The touch screen requires hid core processing, but the
> + * microphone does not. They can be distinguished by manufacturer
> + * and serial number.
> + */
> + if (hdev->product == USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155 &&
> + strncmp(hdev->name, "SmartlinkTechnology", 19) == 0 &&
> + strncmp(hdev->uniq, "20201111000001", 14) == 0)
Using the serial number as a device identifier is somewhat risky. The
serial number is optional for a USB device but if it is used then it's
supposed to be unique for each device. Given how horrible the
configuration and HID descriptors are for this device it's unlikely that
they went to the trouble to give each unit a unique serial number. But
you should check a few of the devices (if you have more than one) to
verify they all have the same 20201111000001 serial number.
It's too bad the bcdHID version test for 0x0201 didn't work. The
hid->version field is filled by usbhid_probe with bcdDevice before both
hid_lookup_quirk and hid_ignore are called and then updated with bcdHID
by usbhid_parse after they have been called.
> + return true;
> + break;
> }
>
> if (hdev->type == HID_TYPE_USBMOUSE &&
Thanks
Terry
Powered by blists - more mailing lists