Subject: usb keyboard timing issue?
To: None <tech-kern@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 02/20/2002 01:27:15
----Next_Part(Wed_Feb_20_01:27:15_2002_389)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

hi.

when I attached my usb keyboard to a NetBSD/i386 machine,
I got following messages repeating.
uhub0: port 1, device disappeared after reset

i'm using recent -current kernel.

I noticed that this device will disappear unless
we reset the port that it connected very soon.
with attached patch, it's detected as following and works fine.

uhidev0 at uhub0 port 1 configuration 1 interface 0
uhidev0: NOVATEK Keyboard NT6881, rev 1.00/1.00, addr 2, iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub0 port 1 configuration 1 interface 1
uhidev1: NOVATEK Keyboard NT6881, rev 1.00/1.00, addr 2, iclass 3/1
uhidev1: 2 report ids
ums0 at uhidev1 reportid 1: 3 buttons and Z dir.
wsmouse1 at ums0 mux 0
uhid0 at uhidev1 reportid 2: input=1, output=0, feature=0

(this keyboard has ps/2 mouse port.
I guess that it's detected as ums0.)

this keyboard was used with win98.

any ideas?

thanks.

---
YAMAMOTO Takashi<yamt@mwd.biglobe.ne.jp>

----Next_Part(Wed_Feb_20_01:27:15_2002_389)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="uhub.c.nodelay.diff"

Index: uhub.c
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/dev/usb/uhub.c,v
retrieving revision 1.57
diff -u -p -r1.57 uhub.c
--- uhub.c	2001/11/20 16:08:37	1.57
+++ uhub.c	2002/02/19 16:18:53
@@ -423,7 +423,7 @@ uhub_explore(usbd_device_handle dev)
 			       USBDEVNAME(sc->sc_dev), port);
 
 		/* Wait for maximum device power up time. */
-		usbd_delay_ms(dev, USB_PORT_POWERUP_DELAY);
+		/*usbd_delay_ms(dev, USB_PORT_POWERUP_DELAY);*/
 
 		/* Reset port, which implies enabling it. */
 		if (usbd_reset_port(dev, port, &up->status)) {

----Next_Part(Wed_Feb_20_01:27:15_2002_389)----