Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pckbport Do not enter extended W mode conditional fo...



details:   https://anonhg.NetBSD.org/src/rev/d999e3ce60d3
branches:  trunk
changeset: 969648:d999e3ce60d3
user:      ryoon <ryoon%NetBSD.org@localhost>
date:      Tue Feb 25 21:36:13 2020 +0000

description:
Do not enter extended W mode conditional for non extended W mode device

Even without extended W mode, sp_w can be 2. This causes
"invalid extended w mode N" warning messages.
Restrict extended W mode conditional for hardwares with extended W
support.

Tested with Synaptics 6.2 device on Panasonic CF-Y8, however it does
not work with X.

diffstat:

 sys/dev/pckbport/synaptics.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 024d1e708ed7 -r d999e3ce60d3 sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c      Tue Feb 25 20:05:10 2020 +0000
+++ b/sys/dev/pckbport/synaptics.c      Tue Feb 25 21:36:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: synaptics.c,v 1.51 2020/02/25 16:24:47 ryoon Exp $     */
+/*     $NetBSD: synaptics.c,v 1.52 2020/02/25 21:36:13 ryoon Exp $     */
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.51 2020/02/25 16:24:47 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.52 2020/02/25 21:36:13 ryoon Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -945,7 +945,8 @@
           ((psc->packet[0] & 0x04) >> 1) +
           ((psc->packet[3] & 0x04) >> 2);
        sp.sp_finger = 0;
-       if (sp.sp_w == SYNAPTICS_WIDTH_EXTENDED_W) {
+       if ((sc->flags & SYN_FLAG_HAS_EXTENDED_WMODE) &&
+           (sp.sp_w == SYNAPTICS_WIDTH_EXTENDED_W)) {
                ew_mode = psc->packet[5] >> 4;
                switch (ew_mode)
                {



Home | Main Index | Thread Index | Old Index