>Anyway, I am now considering the following experiment.
>- We make the psm driver count the number of the "out-of-sync" errors.
>- When the error is detected for the first time, the psm driver will
>  throw few data bytes (up to entire packet size) and see if it can 
>  get back to sync.
>- If the error still persists, the psm driver disable/enable the mouse 
>  and see if it works.
>- If the error still persists and the count goes up to N (10 or 20?),
>  the psm driver reset and reinitialize the mouse. The counter
>  is reset to zero.
>Too complicated?

Ok, here is an experimental patch.  It tries to implement the above


It also discards an incomplete data packet when the interval between two
consequtive bytes are longer than pre-defined timeout (2 seconds in
this patch).  The last byte which arrived late will be regarded as
the first byte of a new packet.  This is louie's idea.

Watch out for the followin messages:

"psmintr: delay too long; resetting byte count"
"psmintr: out of sync (%04x != %04x)"
"psmintr: discard a byte (%d)"
"psmintr: re-enable the mouse"
"psmintr: reset the mouse"

Please test if you are suffering from the out-of-sync errors!


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to