Subject: Re: -current and USB mouse
To: Johan Ihren <johani@autonomica.se>
From: Tero Kivinen <kivinen@ssh.fi>
List: current-users
Date: 06/04/2002 00:31:42
johani@autonomica.se (Johan Ihren) writes:
> > This sound like a problem with your USB controller:
> >=20
> > > uhub0: device problem, disabling port 1
> Not having caught the previous message, I'm not so sure. I've seen
> messages like this on my laptop when I (rather infrequently) use USB
> devices on it and I assumed that it was a hardware problem:
>=20
> Mar 21 16:59:17 snout /netbsd: uhub0: device problem, disabling port =
1
> Mar 21 16:59:17 snout /netbsd: uhub0: port error, restarting port 1
> Mar 21 16:59:17 snout /netbsd: uhub0: port error, giving up port 1
> Mar 21 16:59:19 snout /netbsd: uhub0: device problem, disabling port =
1
> Mar 21 16:59:19 snout /netbsd: uhub0: port error, restarting port 1
> Mar 21 16:59:19 snout /netbsd: uhub0: port error, giving up port 1
>=20
> However, I just noticed a few days ago that I've started to get
> similar messages on at least one other machine. Has anyone else
> started seeing messages like this om machines running currentish
> NetBSD or is it only a hardware virus targeting USB controllers loose=

> in my house?

I started to see them immediately when I connected my belkin usb-serial=
 port
adaptor to my desktop machine. I wrote the driver for that device on
my laptop and it is working there, but every time I connect the device
to my desktop machine it decides that there is something wrong and
disables the usb port. The only way to recover from that is to
reboot... The thing that makes this little harder to debug is that I
am using the usb keyboard and mouse in the desktop machine, so the
debugging is little hard (actually I have second pc keyboard and mouse
connected to the machine, but they are in the machine room, and
debugging things there are not that confortable).

I assumed that there was something wrong with my driver and decided
that I will debug it later when I have more time.

My setup is little complicated, I have my desktop machine in my
machine room, and then I have 5 meter long USB cable to the USB hub,
which has another 5 meter long USB cable to another USB hub, and that
USB hub then have my USB keyboard and mouse. Here is my kernel debug
messages from the case:


Apr  7 02:28:53 haste /netbsd: uhci0 at pci0 dev 4 function 2: VIA Tech=
nologies VT83C572 USB Controller (rev. 0x16)
Apr  7 02:28:53 haste /netbsd: uhci0: interrupting at irq 5
Apr  7 02:28:53 haste /netbsd: usb0 at uhci0: USB revision 1.0
Apr  7 02:28:53 haste /netbsd: uhub0 at usb0
Apr  7 02:28:53 haste /netbsd: uhub0: VIA Technologie UHCI root hub, cl=
ass 9/0, rev 1.00/1.00, addr 1
Apr  7 02:28:53 haste /netbsd: uhub0: 2 ports with 2 removable, self po=
wered
Apr  7 02:28:53 haste /netbsd: uhci1 at pci0 dev 4 function 3: VIA Tech=
nologies VT83C572 USB Controller (rev. 0x16)
Apr  7 02:28:53 haste /netbsd: uhci1: interrupting at irq 5
Apr  7 02:28:53 haste /netbsd: usb1 at uhci1: USB revision 1.0
Apr  7 02:28:54 haste /netbsd: uhub1 at usb1
Apr  7 02:28:54 haste /netbsd: uhub1: VIA Technologie UHCI root hub, cl=
ass 9/0, rev 1.00/1.00, addr 1
Apr  7 02:28:54 haste /netbsd: uhub1: 2 ports with 2 removable, self po=
wered
...
Apr  7 02:28:54 haste /netbsd: uhub2 at uhub0 port 2
Apr  7 02:28:54 haste /netbsd: uhub2: vendor 0x0000 USB HUB, class 9/0,=
 rev 1.10/0.04, addr 2
Apr  7 02:28:54 haste /netbsd: uhub2: 4 ports with 4 removable, self po=
wered
Apr  7 02:28:54 haste /netbsd: uhub3 at uhub2 port 1
Apr  7 02:28:54 haste /netbsd: uhub3: vendor 0x0000 USB HUB, class 9/0,=
 rev 1.10/0.04, addr 3
Apr  7 02:28:54 haste /netbsd: uhub3: 4 ports with 4 removable, self po=
wered
Apr  7 02:28:54 haste /netbsd: uhidev0 at uhub3 port 1 configuration 1 =
interface 0
Apr  7 02:28:54 haste /netbsd: uhidev0: Microsoft Microsoft=AE Office K=
eyboard, rev 2.00/1.24, addr 4, iclass 3/1
Apr  7 02:28:55 haste /netbsd: ukbd0 at uhidev0ukbd: id=3D0 kind=3D3 us=
age=3D0x10006 flags=3D0x0 pos=3D0 size=3D0 cnt=3D0
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e0 fl=
ags=3D0x2 pos=3D0 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e1 fl=
ags=3D0x2 pos=3D1 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e2 fl=
ags=3D0x2 pos=3D2 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e3 fl=
ags=3D0x2 pos=3D3 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e4 fl=
ags=3D0x2 pos=3D4 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e5 fl=
ags=3D0x2 pos=3D5 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e6 fl=
ags=3D0x2 pos=3D6 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x700e7 fl=
ags=3D0x2 pos=3D7 size=3D1 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x70000 fl=
ags=3D0x1 pos=3D8 size=3D8 cnt=3D1
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D0 usage=3D0x70000 fl=
ags=3D0x0 pos=3D16 size=3D8 cnt=3D6
Apr  7 02:28:55 haste /netbsd: ukbd: id=3D0 kind=3D4 usage=3D0x0 flags=3D=
0x0 pos=3D64 size=3D8 cnt=3D6
Apr  7 02:28:55 haste /netbsd:=20
Apr  7 02:28:55 haste /netbsd: wskbd1 at ukbd0 mux 1
Apr  7 02:28:55 haste /netbsd: wskbd1: connecting to wsdisplay0
Apr  7 02:28:55 haste /netbsd: uhidev1 at uhub3 port 1 configuration 1 =
interface 1
Apr  7 02:28:55 haste /netbsd: uhidev1: Microsoft Microsoft=AE Office K=
eyboard, rev 2.00/1.24, addr 4, iclass 3/0
Apr  7 02:28:55 haste /netbsd: uhidev1: 2 report ids
Apr  7 02:28:55 haste /netbsd: uhid0 at uhidev1 reportid 1: input=3D7, =
output=3D0, feature=3D0
Apr  7 02:28:55 haste /netbsd: uhid1 at uhidev1 reportid 2: input=3D1, =
output=3D0, feature=3D0
Apr  7 02:28:55 haste /netbsd: uhidev2 at uhub3 port 2 configuration 1 =
interface 0
Apr  7 02:28:55 haste /netbsd: uhidev2: Logitech USB-PS/2 Optical Mouse=
, rev 2.00/11.00, addr 5, iclass 3/1
Apr  7 02:28:55 haste /netbsd: ums0 at uhidev2: 3 buttons and Z dir.
Apr  7 02:28:55 haste /netbsd: wsmouse1 at ums0 mux 0

Then I connected the belkin serial device:

Apr  7 02:30:59 haste /netbsd: ubelkin0 at uhub3 port 3
Apr  7 02:31:09 haste /netbsd:=20
Apr  7 02:31:09 haste /netbsd: ubelkin0: Belkin Components F5U103 Seria=
l adapter, rev 1.10/2.08, addr 6
Apr  7 02:31:14 haste /netbsd:=20
Apr  7 02:31:14 haste /netbsd: ubelkin0: failed to set configuration, e=
rr=3DTIMEOUT
Apr  7 02:33:03 haste /netbsd: uhub2: at uhub0 port 2 (addr 2) disconne=
cted
Apr  7 02:33:03 haste /netbsd: uhub3: at uhub2 port 1 (addr 3) disconne=
cted
Apr  7 02:33:03 haste /netbsd: uhidev0: at uhub3 port 1 (addr 4) discon=
nected
Apr  7 02:33:03 haste /netbsd: wskbd1: disconnecting from wsdisplay0
Apr  7 02:33:03 haste /netbsd: wskbd1 detached
Apr  7 02:33:03 haste /netbsd: ukbd0 detached
Apr  7 02:33:03 haste /netbsd: uhidev0 detached
Apr  7 02:33:03 haste /netbsd: uhidev1: at uhub3 port 1 (addr 4) discon=
nected
Apr  7 02:33:03 haste /netbsd: uhid0 detached
Apr  7 02:33:03 haste /netbsd: uhid1 detached
Apr  7 02:33:03 haste /netbsd: uhidev1 detached
Apr  7 02:33:03 haste /netbsd: uhidev2: at uhub3 port 2 (addr 5) discon=
nected
Apr  7 02:33:03 haste /netbsd: wsmouse1 detached
Apr  7 02:33:03 haste /netbsd: ums0 detached
Apr  7 02:33:03 haste /netbsd: uhidev2 detached
Apr  7 02:33:03 haste /netbsd: ubelkin0: at uhub3 port 3 (addr 6) disco=
nnected
Apr  7 02:33:03 haste /netbsd: ubelkin0 detached
Apr  7 02:33:03 haste /netbsd: uhub3 detached
Apr  7 02:33:03 haste /netbsd: uhub2 detached
Apr  7 02:33:22 haste /netbsd: usbd_new_device: addr=3D2, getting first=
 desc failed
Apr  7 02:33:22 haste /netbsd: uhub_explore: usb_new_device failed, err=
or=3DTIMEOUT
Apr  7 02:33:22 haste /netbsd: uhub0: device problem, disabling port 2
Apr  7 02:33:24 haste /netbsd: uhub0: port error, restarting port 2
Apr  7 02:33:41 haste /netbsd: usbd_new_device: addr=3D2, getting first=
 desc failed
Apr  7 02:33:41 haste /netbsd: uhub_explore: usb_new_device failed, err=
or=3DTIMEOUT
Apr  7 02:33:41 haste /netbsd: uhub0: device problem, disabling port 2
Apr  7 02:33:41 haste /netbsd: uhub0: port error, restarting port 2
Apr  7 02:33:58 haste /netbsd: usbd_new_device: addr=3D2, getting first=
 desc failed
Apr  7 02:33:58 haste /netbsd: uhub_explore: usb_new_device failed, err=
or=3DTIMEOUT
Apr  7 02:33:58 haste /netbsd: uhub0: device problem, disabling port 2
Apr  7 02:34:14 haste /netbsd: usbd_new_device: addr=3D2, getting first=
 desc failed
Apr  7 02:34:14 haste /netbsd: uhub_explore: usb_new_device failed, err=
or=3DTIMEOUT
Apr  7 02:34:14 haste /netbsd: uhub0: device problem, disabling port 1
Apr  7 02:34:14 haste /netbsd: uhub0: port error, restarting port 2
Apr  7 02:34:16 haste /netbsd: uhub0: port error, restarting port 1

At that point both USB ports on the machine are completely dead, and
the only way to recover them is to reboot (I tried unplugging all the
usb device, and replugging them one by one, but it didn't help).

I haven't had time to debug this (i.e try to see if the belkin device
does the same thing on my laptop if connected to the hub instead of
directly). Hopefully I have time check this again soon...
--=20
kivinen@ssh.fi
SSH Communications Security                  http://www.ssh.fi/
SSH IPSEC Toolkit                            http://www.ssh.fi/ipsec/