Skip to contentSkip to conversation

make psaux reconnect adjustable

PATCH [email protected] 2 participants 2 messages Aug 14, 2001

lore
Share & tools
lore
#0 lore raw

From [email protected] Tue Aug 14 19:10:40 2001

> I can confirm what you suggest:
> My mouse (Logitech wheel USB/PS2) sends indeed AA 00.
> So, I extended my patch:
> psmouse_reconnect = 0: Do nothing (just pass all to userspace)
> psmouse_reconnect = 1: Flush Q & ping mouse on AA 00 (default)
> psmouse_reconnect = 2: Flush Q & ping mouse on AA (old behaviour)
>
> With reconnect 1 or 2: After reconnecting, mouse behaves strange
> (jumping around the screen)

This is a serious bug in many user-space drivers. PS/2 mouse protocol was designed to easily re-synchronize (think about transmission errors/ lost bytes).

The fragment of text you reply to is not about the 3-byte PS/2 protocol, but about the 4-byte wheelmouse protocol.

#1 lore raw
Quoted 13 lines · [email protected] wrote:

From [email protected] Tue Aug 14 19:10:40 2001

> I can confirm what you suggest:
> My mouse (Logitech wheel USB/PS2) sends indeed AA 00.
> So, I extended my patch:
> psmouse_reconnect = 0: Do nothing (just pass all to userspace)
> psmouse_reconnect = 1: Flush Q & ping mouse on AA 00 (default)
> psmouse_reconnect = 2: Flush Q & ping mouse on AA (old behaviour)
>
> With reconnect 1 or 2: After reconnecting, mouse behaves strange
> (jumping around the screen)

Quoted 6 lines

This is a serious bug in many user-space drivers. PS/2 mouse protocol was designed to easily re-synchronize (think about transmission errors/ lost bytes).

The fragment of text you reply to is not about the 3-byte PS/2 protocol, but about the 4-byte wheelmouse protocol.

No, it applies even to 4-byte protocol (see 1).

1) Re-synchronize on transmission errors (e.g. lost bytes) The 4-byte protocol shares bytes 1-3 with the 3-byte protocol. So it can synchronize just as easy.

2) Re-connecting the mouse
The 4-byte wheelmouse protocol must be re-enabled by sending proper magic bytes by user-level driver (else it stays in 3-byte mode).

_This_ shows, user-mode must be notified of the re-connect! So letting the driver choose PS2_TRANSPARENT, it can easily handle this situation.

3) Re-connecting a different animal
The user-level driver should autodetect common mouse protocols (legacy proprietary protocols will vanish and should not hinder progress).