From: Chris Chiu chris.chiu@canonical.com
[ Upstream commit c06bc3557542307b9658fbd43cc946a14250347b ]
Another Chicony Electronics HP 5MP Camera with USB ID 04F2:B882 reports a HID sensor interface that is not actually implemented.
Add the device to the HID ignore list so the bogus sensor is never exposed to userspace. Then the system won't hang when runtime PM tries to wake the unresponsive device.
Signed-off-by: Chris Chiu chris.chiu@canonical.com Signed-off-by: Benjamin Tissoires bentiss@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
## Commit Analysis: HID Quirks for Chicony HP 5MP Camera
### 1. COMMIT MESSAGE ANALYSIS
The commit message is clear and explains: - A specific Chicony HP 5MP Camera (USB ID 04F2:B882) reports a HID sensor interface that **is not actually implemented** - Without this fix, **the system hangs** when runtime PM tries to wake the unresponsive device - Solution: Add to `hid_ignore_list` so the bogus sensor is never exposed to userspace
Key phrase: "the system won't hang" - this is a **system hang fix**.
### 2. CODE CHANGE ANALYSIS
The change is minimal and surgical:
**hid-ids.h:** Adds one new device ID define ```c #define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA3 0xb882 ```
**hid-quirks.c:** Adds device to the ignore list ```c { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA3) }, ```
This follows an **already-established pattern** - there are already two similar entries: - `USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA` (0xb824) - `USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2` (0xb82c)
### 3. CLASSIFICATION
This falls into **two explicit exception categories** that are allowed in stable:
1. **Device ID addition:** Adding a USB ID to an existing driver's quirk list 2. **Hardware quirk/workaround:** Fixing a broken device that falsely advertises a non-functional HID sensor interface
### 4. SCOPE AND RISK ASSESSMENT
| Metric | Assessment | |--------|------------| | Lines changed | 2 | | Files touched | 2 | | Complexity | Trivial - just adding ID to a list | | Risk level | **Extremely low** |
The change only affects this specific USB device (04F2:B882). No logic changes, no control flow modifications. The `hid_ignore_list` mechanism is mature and proven.
### 5. USER IMPACT
- **Severity:** HIGH - Prevents **system hangs** on affected HP laptops - **Affected users:** Anyone with an HP laptop containing this specific Chicony 5MP camera - **Real-world evidence:** The author is from Canonical (Ubuntu), suggesting this was discovered through real user bug reports
### 6. STABILITY INDICATORS
- Accepted by Benjamin Tissoires (HID maintainer) - Uses identical mechanism to existing, proven entries - Canonical developer submission suggests tested on real hardware
### 7. DEPENDENCY CHECK
**No dependencies.** The `hid_ignore_list` infrastructure exists in all stable kernel versions. This is a completely standalone device ID addition.
---
## Conclusion
This commit is a **textbook example** of what should be backported to stable:
✅ **Fixes a real bug:** System hang during runtime PM suspend/resume ✅ **Fixes an important issue:** System hangs are severe user-facing bugs ✅ **Small and contained:** Only 2 lines, no logic changes ✅ **Obviously correct:** Follows exact pattern of existing similar entries ✅ **Hardware quirk exception:** Explicitly allowed by stable kernel rules ✅ **No dependencies:** Standalone addition ✅ **Zero risk:** Only affects one specific USB device ID
The bug is severe (system hang), the fix is trivial (add device to ignore list), and the mechanism is well-proven with existing similar entries. This is exactly what stable backports are for.
**YES**
drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index c4589075a5ed6..3a22129fb7075 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -317,6 +317,7 @@ #define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421 #define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA 0xb824 #define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2 0xb82c +#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA3 0xb882
#define USB_VENDOR_ID_CHUNGHWAT 0x2247 #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001 diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index c89a015686c07..3cf7971d49743 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -769,6 +769,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA3) }, { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) },