NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52070: Keyboard freeze after using touchpad
The following reply was made to PR kern/52070; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/52070: Keyboard freeze after using touchpad
Date: Tue, 10 May 2022 22:22:09 +0200
I was thinking of something like the patch below to skip the probe
in cases where we know the device is there and may be confused by the
random data. That is: check the acpi device name and set
PCKBC_FORCE_AUX_NOPROBE in pckbc_acpi_attach - but I don't understand
the logic there, and why it attaches in this case at all ;-}
The dmesg line says:
pckbc2 at acpi0 (SYNM, SYN1222-3) (aux port): irq 12
and I would suggest to set the flag if the first string starts with SYN.
Is that a good idea?
Martin
Index: pckbc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/pckbc.c,v
retrieving revision 1.62
diff -u -p -r1.62 pckbc.c
--- pckbc.c 1 May 2020 01:34:57 -0000 1.62
+++ pckbc.c 10 May 2022 20:16:52 -0000
@@ -347,8 +347,13 @@ pckbc_attach(struct pckbc_softc *sc)
goto nomouse;
}
t->t_haveaux = 1;
- bus_space_write_1(iot, ioh_d, 0, 0x5a); /* a random value */
- res = pckbc_poll_data1(t, PCKBC_AUX_SLOT);
+ if (ISSET(t->t_flags, PCKBC_FORCE_AUX_NOPROBE)) {
+ /* some devices do not survive the probe sequence */
+ res = 1;
+ } else {
+ bus_space_write_1(iot, ioh_d, 0, 0x5a); /* a random value */
+ res = pckbc_poll_data1(t, PCKBC_AUX_SLOT);
+ }
/*
* The following is needed to find the aux port on the Tadpole
Index: pckbcvar.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/pckbcvar.h,v
retrieving revision 1.22
diff -u -p -r1.22 pckbcvar.h
--- pckbcvar.h 7 Dec 2021 19:45:05 -0000 1.22
+++ pckbcvar.h 10 May 2022 20:16:52 -0000
@@ -61,6 +61,7 @@ struct pckbc_internal {
int t_flags;
#define PCKBC_CANT_TRANSLATE 0x0001 /* can't translate to XT scancodes */
#define PCKBC_NEED_AUXWRITE 0x0002 /* need auxwrite command to find aux */
+#define PCKBC_FORCE_AUX_NOPROBE 0x0004 /* force aux port attachement */
int t_haveaux; /* controller has an aux port */
struct pckbc_slotdata *t_slotdata[PCKBC_NSLOTS];
Home |
Main Index |
Thread Index |
Old Index