Bug 280972 - hms(4): Broken after 13d00a43cba4c35fcc9e0ab567baf530126a6348
Summary: hms(4): Broken after 13d00a43cba4c35fcc9e0ab567baf530126a6348
Status: Closed DUPLICATE of bug 280290
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Emmanuel Vadot
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-08-21 11:08 UTC by Mikael Urankar
Modified: 2024-10-27 17:36 UTC (History)
3 users (show)

See Also:


Attachments
bad (84.16 KB, text/plain)
2024-08-21 13:44 UTC, Mikael Urankar
no flags Details
good (88.23 KB, text/plain)
2024-08-21 13:44 UTC, Mikael Urankar
no flags Details
wait_for_reset.patch (8.04 KB, patch)
2024-09-15 11:20 UTC, Vladimir Kondratyev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2024-08-21 11:08:28 UTC
My touchpad doesn't work anymore after https://github.com/freebsd/freebsd-src/commit/13d00a43cba4c35fcc9e0ab567baf530126a6348
It works fine if I revert this commit.

This is a Dell Precision 3520

iichid0: <DLL07A9:00 044E:120B I2C HID device> at addr 0x2c irq 51 on iicbus7
hidbus0: <HID bus> on iichid0

hms0: <DLL07A9:00 044E:120B Mouse> on hidbus0
hms0: 3 buttons and [XYWH] coordinates ID=1

Not sure if it's the same problem as bug #280290, creating a new one.
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2024-08-21 13:25:50 UTC
Can you share a verbose dmesg with and without this commit ?
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2024-08-21 13:44:40 UTC
Created attachment 252985 [details]
bad
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2024-08-21 13:44:53 UTC
Created attachment 252986 [details]
good
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2024-08-22 09:03:52 UTC
CC'ing wulf

I've recompiled a kernel with IICHID_DEBUG and did what wulf@ asked in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280290#c2


without 13d00a43cba4 (working touchpad):
hkbd0: detached 
iichid0: iichid device close
iichid0: HID command I2C_HID_CMD_SET_POWER(1)
hkbd0: detached
hms0: detached
hidbus0: detached
iichid0: detached 
iicbus7: <unknown card> at addr 0x2c
iichid0: <DLL07A9:00 044E:120B I2C HID device> at addr 0x2c irq 51 on iicbus7
hidbus0: <HID bus> on iichid0
hms0: <DLL07A9:00 044E:120B Mouse> on hidbus0
hms0: 3 buttons and [XYWH] coordinates ID=1
hkbd0: <DLL07A9:00 044E:120B Keyboard> on hidbus0
kbd2 at hkbd0

after issuing kldunload iichid, the touchpad stopped working.




with 13d00a43cba4 (non working touchpad):
hkbd0: detached
iichid0: iichid device close
hms0: detached
hidbus0: detached
iichid0: detached
iicbus7: <unknown card> at addr 0x2c 
iichid0: <DLL07A9:00 044E:120B I2C HID device> at addr 0x2c irq 51 on iicbus7 
hidbus0: <HID bus> on iichid0
hms0: <DLL07A9:00 044E:120B Mouse> on hidbus0 
hms0: 3 buttons and [XYWH] coordinates ID=1 
hkbd0: <DLL07A9:00 044E:120B Keyboard> on hidbus0
kbd2 at hkbd0
Comment 5 Vladimir Kondratyev freebsd_committer freebsd_triage 2024-09-15 11:20:24 UTC
Created attachment 253580 [details]
wait_for_reset.patch

I guess that compiling driver into kernel changes a winner of a race between HID hardware reset and iichid children initialization.

Test attached patch. Amongst other things it adds a waiting for HID device reset acknowledge that fixes the race.
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2024-09-15 17:05:21 UTC
(In reply to Vladimir Kondratyev from comment #5)
It's still broken.
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2024-10-27 17:36:26 UTC
*** This bug has been marked as a duplicate of bug 280290 ***