On Fri, Oct 08, 2010 at 01:28:11AM +0600, Alexandr Shadchin wrote:
> On Wed, Oct 06, 2010 at 09:53:47PM -0400, Kenneth R Westerback wrote:
> > 
> > Committed. Next? :-)
> > 
> > .... Ken
> 
> Removed unnecessary code, as the same thing does pms_change_state() when 
> the device enters a state of PMS_STATE_ENABLED
> 
> -- 
> Alexandr Shadchin

Works for me, but I'm not completely sure that the state change occurs when
the attach is going on. If it is, then this should be ok. Any other tests?

.... Ken

> 
> Index: pms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 pms.c
> --- pms.c     7 Oct 2010 01:52:25 -0000       1.8
> +++ pms.c     7 Oct 2010 18:46:59 -0000
> @@ -167,29 +167,11 @@ pmsattach(parent, self, aux)
>       struct pms_softc *sc = (void *)self;
>       struct pckbc_attach_args *pa = aux;
>       struct wsmousedev_attach_args a;
> -     u_char cmd[1], resp[2];
> -     int res;
>  
>       sc->sc_kbctag = pa->pa_tag;
>       sc->sc_kbcslot = pa->pa_slot;
>  
>       printf("\n");
> -
> -     /* Flush any garbage. */
> -     pckbc_flush(pa->pa_tag, pa->pa_slot);
> -
> -     /* reset the device */
> -     cmd[0] = PMS_RESET;
> -     res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1);
> -#ifdef DEBUG
> -     if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
> -             printf("pmsattach: reset error\n");
> -             return;
> -     }
> -#endif
> -
> -     sc->inputstate = 0;
> -     sc->oldbuttons = 0;
>  
>       pckbc_set_inputhandler(sc->sc_kbctag, sc->sc_kbcslot,
>                              pmsinput, sc, sc->sc_dev.dv_xname);

Reply via email to