Subject: Re: Almost there - but not quite.
To: Peter Seebach <seebs@plethora.net>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: current-users
Date: 03/08/2002 14:26:20
> This means using polled commands, in practice, because I want responses
> from them.

Not necessarily.

> This means (indirectly) calling tsleep.

Again, not necessarily.

> I learn of the need to reset the mouse, you guessed it, while I'm processing
> an interrupt.
> 
> What's the workaround?

tweak the driver's finite state machine:

instead of doing a polled command, fire off the command and mark the
device softc as "expecting initialize response".

change the interrupt routine to send bytes received when in
'initializing' state to code which parses the init responses and sends
the next command in the init sequence..

use a timeout to restart things if the device doesn't respond as
expected.

				- Bill