From walter@pelissero.de  Sun Aug 31 13:00:23 2003
Return-Path: <walter@pelissero.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 36DBB16A4BF
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 31 Aug 2003 13:00:23 -0700 (PDT)
Received: from webmail.tiscali.de (relay1.tiscali.de [62.26.116.129])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DE27643FEA
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 31 Aug 2003 13:00:21 -0700 (PDT)
	(envelope-from walter@pelissero.de)
Received: from daemon.home.loc (62.246.19.246) by webmail.tiscali.de (6.7.019)
        id 3F2FA201007AA936 for FreeBSD-gnats-submit@freebsd.org; Sun, 31 Aug 2003 22:00:20 +0200
Received: from hyde.home.loc (hyde.home.loc [10.0.0.2])
	by daemon.home.loc (8.12.9/8.12.8) with ESMTP id h7VJwijl001343
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 31 Aug 2003 21:58:45 +0200 (CEST)
	(envelope-from wcp@hyde.home.loc)
Received: from hyde.home.loc (localhost [127.0.0.1])
	by hyde.home.loc (8.12.9/8.12.8) with ESMTP id h7VJwhZf074719
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 31 Aug 2003 21:58:43 +0200 (CEST)
	(envelope-from wcp@hyde.home.loc)
Received: (from wcp@localhost)
	by hyde.home.loc (8.12.9/8.12.6/Submit) id h7VJwg5a074718;
	Sun, 31 Aug 2003 21:58:42 +0200 (CEST)
	(envelope-from wcp)
Message-Id: <200308311958.h7VJwg5a074718@hyde.home.loc>
Date: Sun, 31 Aug 2003 21:58:42 +0200 (CEST)
From: "Walter C. Pelissero" <walter@pelissero.de>
Reply-To: walter@pelissero.de
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ums doesn't work with MCT based PS/2 converters
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         56250
>Category:       kern
>Synopsis:       [ums] [patch] ums(4) doesn't work with MCT based PS/2 converters
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 31 13:10:07 PDT 2003
>Closed-Date:    
>Last-Modified:  Mon Oct 24 17:59:13 GMT 2005
>Originator:     Walter C. Pelissero
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD hyde.home.loc 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #28: Sun Aug 31 14:33:47 CEST 2003 root@hyde.home.loc:/.amd_mnt/daemon/host/usr/src/sys/compile/PCG-XG9 i386


>Description:
	Mice connected to a MCT Corp PS/2 converter don't work.  This
	seems to be due to a test in ums.c.  Changing the test the
	device works.
>How-To-Repeat:
	Connect to a MCT based USB->PS/2 converter a PS/2 mouse and
	try to use it.
>Fix:

	The following patch solves the problem, but the possible side
	effects are unknown to me.  For instance, what happens if
	sc->sc_ibuf[0] != sc->sc_iid ?

--- /sys/dev/usb/ums.c	Wed Nov  6 21:23:50 2002
+++ ums.c	Sun Aug 31 15:08:52 2003
@@ -428,10 +428,8 @@
 	}
 
 	ibuf = sc->sc_ibuf;
-	if (sc->sc_iid) {
-		if (*ibuf++ != sc->sc_iid)
-			return;
-	}
+	if (sc->sc_iid)
+		ibuf++;
 
 	dx =  hid_get_data(ibuf, &sc->sc_loc_x);
 	dy = -hid_get_data(ibuf, &sc->sc_loc_y);
>Release-Note:
>Audit-Trail:
>Unformatted:
