Page MenuHomeFreeBSD

hconf(4): Do not fetch report before writing new usage values back.
ClosedPublic

Authored by wulf on Jan 16 2021, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 11:48 AM
Unknown Object (File)
Thu, Mar 7, 5:03 PM
Unknown Object (File)
Feb 22 2024, 6:41 AM
Unknown Object (File)
Feb 22 2024, 6:41 AM
Unknown Object (File)
Dec 20 2023, 7:53 AM
Unknown Object (File)
Dec 13 2023, 4:55 AM
Unknown Object (File)
Nov 9 2023, 5:16 AM
Unknown Object (File)
Nov 6 2023, 3:22 PM

Details

Summary

There is a report that reading of surface/button switch feature report
causes SYN1B7D touchpad malfunction. As specs does not require it to
be readable assume that report usages have default value on attach and
last written value during operation.
While here, do not apply default usage values on resume.

Test Plan

Test dev.hmt.*.* sysctls before and after suspend/resume

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wulf requested review of this revision.Jan 16 2021, 8:37 PM
wulf created this revision.

Fix stupid bug leading to setting of old usage value instead of new one.

hconf(4) says dev.hmt where I think it should say dev.hconf:

diff --git a/share/man/man4/hconf.4 b/share/man/man4/hconf.4
index 4d595e9f1c6..a2b50dbb8de 100644

  • a/share/man/man4/hconf.4

+++ b/share/man/man4/hconf.4
@@ -61,11 +61,11 @@ Debug parameter is available as
.Xr loader 8
tunable as well.
.Bl -tag -width indent
-.It Va dev.hmt.*.input_mode
+.It Va dev.hconf.*.input_mode
HID device input mode: 0 = mouse, 3 = touchpad.
-.It Va dev.hmt.*.surface_switch
+.It Va dev.hconf.*.surface_switch
Enable / disable switch for surface: 1 = on, 0 = off.
-.It Va dev.hmt.*.buttons_switch
+.It Va dev.hconf.*.buttons_switch
Enable / disable switch for buttons: 1 = on, 0 = off.
.It Va hw.hid.hconf.debug
Debug output level, where 0 is debugging disabled and larger values increase

This revision now requires changes to proceed.Jan 17 2021, 12:04 PM

LGTM. Thank you!
I did not realize that hardware can be this quirky.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 20 2021, 8:11 PM
This revision was automatically updated to reflect the committed changes.