NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/57149
The following reply was made to PR kern/57149; it has been noted by GNATS.
From: nervoso <nervoso%k1.com.br@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/57149
Date: Mon, 09 Jan 2023 17:20:12 -0300
--=-r52MxZnONFny5Lub9XDW
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Em seg, 2023-01-09 Ã s 19:20 +0000, matthew green escreveu:
> The following reply was made to PR kern/57149; it has been noted by GNATS.
>
> From: matthew green <mrg%eterna.com.au@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
> netbsd-bugs%netbsd.org@localhost, nervoso%k1.com.br@localhost
> Subject: re: kern/57149
> Date: Tue, 10 Jan 2023 06:14:58 +1100
>
> the ukbd detach bug looks obvious to me. can you try this patch?
>
>
> .mrg.
>
>
> Index: dev/usb/ukbd.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/usb/ukbd.c,v
> retrieving revision 1.161
> diff -p -u -r1.161 ukbd.c
> --- dev/usb/ukbd.c 6 Apr 2022 21:51:29 -0000 1.161
> +++ dev/usb/ukbd.c 9 Jan 2023 19:13:29 -0000
> @@ -295,6 +295,7 @@ struct ukbd_softc {
> uint16_t sc_pollchars[MAXKEYS];
>
> u_char sc_dying;
> + u_char sc_attached;
> };
>
> #ifdef UKBD_DEBUG
> @@ -520,6 +521,8 @@ ukbd_attach(device_t parent, device_t se
>
> sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARGS_NONE);
>
> + sc->sc_attached = true;
> +
> return;
> }
>
> @@ -584,6 +587,9 @@ ukbd_detach(device_t self, int flags)
>
> pmf_device_deregister(self);
>
> + if (!sc->sc_attached)
> + return rv;
> +
> if (sc->sc_console_keyboard) {
> /*
> * Disconnect our consops and set ukbd_is_console
>
YESS Â Â it worked...Â
Thank you...
--=-r52MxZnONFny5Lub9XDW
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div>Em seg, 2023-01-09 =C3=A0s 19:20 +0000, matth=
ew green escreveu:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8e=
x; border-left:2px #729fcf solid;padding-left:1ex"><pre>The following reply=
was made to PR kern/57149; it has been noted by GNATS.</pre><pre><br></pre=
><pre>From: matthew green <<a href=3D"mailto:mrg%eterna.com.au@localhost">mrg@eter=
na.com.au</a>></pre><pre>To: <a href=3D"mailto:gnats-bugs%netbsd.org@localhost">gn=
ats-bugs%netbsd.org@localhost</a></pre><pre>Cc: <a href=3D"mailto:kern-bug-people@net=
bsd.org">kern-bug-people%netbsd.org@localhost</a>, <a href=3D"mailto:gnats-admin@netb=
sd.org">gnats-admin%netbsd.org@localhost</a>,</pre><pre> <a href=3D"mailto:netbsd-=
bugs%netbsd.org@localhost">netbsd-bugs%netbsd.org@localhost</a>, <a href=3D"mailto:nervoso@k1.c=
om.br">nervoso%k1.com.br@localhost</a></pre><pre>Subject: re: kern/57149</pre><pre>Da=
te: Tue, 10 Jan 2023 06:14:58 +1100</pre><pre><br></pre><pre> the ukbd deta=
ch bug looks obvious to me. can you try this patch?</pre><pre> </pre><pre>=
</pre><pre> .mrg.</pre><pre> </pre><pre> </pre><pre> Index: dev/usb/ukbd.c=
</pre><pre> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</pre><pre> =
RCS file: /cvsroot/src/sys/dev/usb/ukbd.c,v</pre><pre> retrieving revision =
1.161</pre><pre> diff -p -u -r1.161 ukbd.c</pre><pre> --- dev/usb/ukbd.c 6 =
Apr 2022 21:51:29 -0000 1.161</pre><pre> +++ dev/usb/ukbd.c 9 Jan 2023 19:1=
3:29 -0000</pre><pre> @@ -295,6 +295,7 @@ struct ukbd_softc {</pre><pre> =
uint16_t sc_pollchars[MAXKEYS];</pre><pre> </pre><pre> u_char sc_dying;<=
/pre><pre> + u_char sc_attached;</pre><pre> };</pre><pre> </pre><pre> #i=
fdef UKBD_DEBUG</pre><pre> @@ -520,6 +521,8 @@ ukbd_attach(device_t parent,=
device_t se</pre><pre> </pre><pre> sc->sc_wskbddev =3D config_found(=
self, &a, wskbddevprint, CFARGS_NONE);</pre><pre> </pre><pre> + sc->=
;sc_attached =3D true;</pre><pre> +</pre><pre> return;</pre><pre> }</pre=
><pre> </pre><pre> @@ -584,6 +587,9 @@ ukbd_detach(device_t self, int flag=
s)</pre><pre> </pre><pre> pmf_device_deregister(self);</pre><pre> </pre=
><pre> + if (!sc->sc_attached)</pre><pre> + return rv;</pre><pre> +</pr=
e><pre> if (sc->sc_console_keyboard) {</pre><pre> /*</pre><pre> =
* Disconnect our consops and set ukbd_is_console</pre><pre> </pre></blockq=
uote><div>YESS it worked... </div><div><br></div><div>Th=
ank you...</div><div class=3D"-x-evo-signature-wrapper"><span class=3D"-x-e=
vo-signature" id=3D"none"></span></div></body></html>
--=-r52MxZnONFny5Lub9XDW--
Home |
Main Index |
Thread Index |
Old Index