USB -> PS/2

Walter C. Pelissero walter at pelissero.de
Sun Aug 31 06:13:44 PDT 2003


Ok, today I spent some time deciphering the ums log and came up
with this patch.

--- /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);

Unfortunately my knowledge (or rather lack of it) of the USB/UMS
driver doesn't give me very much confidence that I didn't break
something else.

What was that conditional return suposed to protect from?
Is it safe to remove it?

The PS/2 mouse works now and the USB one as well.

Cheers,

-- 
walter pelissero
http://www.pelissero.de



Bruce M Simpson writes:
 > On Sat, Aug 30, 2003 at 01:51:27PM +0200, Walter C. Pelissero wrote:
 > > I just bought a USB -> PS/2 keyboard and mouse converter for my
 > > laptop.  It's a Sitecom brand and it gets recognised as MCT Corp.
 > 
 > I had similar problems with a Tangtop USB->PS/2 k+m adapter.
 > 
 > In the end it turned out that this device was causing uhci to report
 > an error, even though the movement data coming in looked fine. I never
 > got round to fixing it.
 > 
 > Perhaps you could try throwing all the debug switches on in the usb drivers
 > and usbd and seeing if you get similar behaviour?
 > 
 > Thanks for the patch, this was the other thing that needed fixing!
 > 
 > BMS


More information about the freebsd-questions mailing list