Implement a kludge for some wheeled mice for which infamous "psmintr:

out of sync..." messages is generated and the wheel movement is not
recognized.

The trick is found by Takashi Nishida.
This commit is contained in:
Kazutaka YOKOTA 1999-07-12 13:40:21 +00:00
parent e85422ad1d
commit 551e01b126
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48773
2 changed files with 32 additions and 4 deletions

View File

@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: psm.c,v 1.11 1999/06/03 12:40:53 yokota Exp $
* $Id: psm.c,v 1.12 1999/07/04 14:58:34 phk Exp $
*/
/*
@ -992,14 +992,28 @@ psmprobe(device_t dev)
sc->mode.packetsize = vendortype[i].packetsize;
/* set mouse parameters */
#if 0
/*
* A version of Logitech FirstMouse+ won't report wheel movement,
* if SET_DEFAULTS is sent... Don't use this command.
* This fix was found by Takashi Nishida.
*/
i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS);
if (verbose >= 2)
printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i);
#endif
if (sc->config & PSM_CONFIG_RESOLUTION) {
sc->mode.resolution
= set_mouse_resolution(sc->kbdc,
(sc->config & PSM_CONFIG_RESOLUTION) - 1);
(sc->config & PSM_CONFIG_RESOLUTION) - 1);
} else if (sc->mode.resolution >= 0) {
sc->mode.resolution
= set_mouse_resolution(sc->kbdc, sc->dflt_mode.resolution);
}
if (sc->mode.rate > 0) {
sc->mode.rate = set_mouse_sampling_rate(sc->kbdc, sc->dflt_mode.rate);
}
set_mouse_scaling(sc->kbdc, 1);
/* request a data packet and extract sync. bits */
if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) {

View File

@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: psm.c,v 1.11 1999/06/03 12:40:53 yokota Exp $
* $Id: psm.c,v 1.12 1999/07/04 14:58:34 phk Exp $
*/
/*
@ -992,14 +992,28 @@ psmprobe(device_t dev)
sc->mode.packetsize = vendortype[i].packetsize;
/* set mouse parameters */
#if 0
/*
* A version of Logitech FirstMouse+ won't report wheel movement,
* if SET_DEFAULTS is sent... Don't use this command.
* This fix was found by Takashi Nishida.
*/
i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS);
if (verbose >= 2)
printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i);
#endif
if (sc->config & PSM_CONFIG_RESOLUTION) {
sc->mode.resolution
= set_mouse_resolution(sc->kbdc,
(sc->config & PSM_CONFIG_RESOLUTION) - 1);
(sc->config & PSM_CONFIG_RESOLUTION) - 1);
} else if (sc->mode.resolution >= 0) {
sc->mode.resolution
= set_mouse_resolution(sc->kbdc, sc->dflt_mode.resolution);
}
if (sc->mode.rate > 0) {
sc->mode.rate = set_mouse_sampling_rate(sc->kbdc, sc->dflt_mode.rate);
}
set_mouse_scaling(sc->kbdc, 1);
/* request a data packet and extract sync. bits */
if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) {