From e4b6a5d87b87b1484372fb950b7b7885cb704190 Mon Sep 17 00:00:00 2001 From: mikeh Date: Mon, 7 Jul 2003 05:40:13 +0000 Subject: Reset the PSM aux device twice to help pierce through some KVM's to get the correct data from the attached mouse. Multiple resets should be harmless, but just in case, the second one is non-fatal and is just ignored. --- sys/dev/atkbdc/psm.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys/dev/atkbdc') diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 02222b5..e4f14b1 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -1040,6 +1040,10 @@ psmprobe(device_t dev) /* * NOTE: some controllers appears to hang the `keyboard' when the aux * port doesn't exist and `PSMC_RESET_DEV' is issued. + * + * Attempt to reset the controller twice -- this helps + * pierce through some KVM switches. The second reset + * is non-fatal. */ if (!reset_aux_dev(sc->kbdc)) { recover_from_error(sc->kbdc); @@ -1047,6 +1051,11 @@ psmprobe(device_t dev) if (verbose) printf("psm%d: failed to reset the aux device.\n", unit); endprobe(ENXIO); + } else if (!reset_aux_dev(sc->kbdc)) { + recover_from_error(sc->kbdc); + if (verbose >= 2) + printf("psm%d: failed to reset the aux device (2).\n", + unit); } } -- cgit v1.1