From owner-freebsd-current@FreeBSD.ORG Wed Jul 2 12:27:07 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4E2C37B401 for ; Wed, 2 Jul 2003 12:27:07 -0700 (PDT) Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.162.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D49C43FE1 for ; Wed, 2 Jul 2003 12:27:06 -0700 (PDT) (envelope-from mheffner@vt.edu) Received: from vivi.cc.vt.edu (IDENT:mirapoint@evil-vivi [10.1.1.12]) by lennier.cc.vt.edu (8.12.8/8.12.8) with ESMTP id h62JR5GE504941 for ; Wed, 2 Jul 2003 15:27:05 -0400 (EDT) Received: from enterprise.muriel.penguinpowered.com ([199.3.139.222]) by vivi.cc.vt.edu (Mirapoint Messaging Server MOS 3.3.2-CR) with ESMTP id BIJ00480 (AUTH mheffner); Wed, 2 Jul 2003 15:27:04 -0400 (EDT) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_=XFMail.1.5.4.FreeBSD:20030702152722:18153=_" Date: Wed, 02 Jul 2003 15:27:22 -0400 (EDT) From: Mike Heffner To: freebsd-current@freebsd.org Subject: PSM patch to reset device twice X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2003 19:27:08 -0000 This message is in MIME format --_=XFMail.1.5.4.FreeBSD:20030702152722:18153=_ Content-Type: text/plain; charset=us-ascii The attached patch will try to reset the mouse twice to try and wakeup some KVMs/mice. Specifically, this helps detect some Intellimouse mice through IOGear KVMs. Reseting the mouse multiple times shouldn't cause problems, and the patch makes the second reset non-fatal, however, please try the patch and report if it causes any problems with detecting mice. I plan to commit the patch this weekend unless there are problems with it. Thanks, Mike -- Mike Heffner --_=XFMail.1.5.4.FreeBSD:20030702152722:18153=_ Content-Disposition: attachment; filename="psm.reset.diff" Content-Transfer-Encoding: 7bit Content-Description: psm.reset.diff Content-Type: text/plain; charset=us-ascii; name=psm.reset.diff; SizeOnDisk=967 Index: psm.c =================================================================== RCS file: /cvs/ncvs/src/sys/isa/psm.c,v retrieving revision 1.59 diff -u -r1.59 psm.c --- psm.c 1 Jul 2003 14:41:16 -0000 1.59 +++ psm.c 2 Jul 2003 19:19:20 -0000 @@ -1040,6 +1040,10 @@ /* * 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 @@ 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); } } --_=XFMail.1.5.4.FreeBSD:20030702152722:18153=_-- End of MIME message