cvs commit: src/sys/dev/usb usb.c

Maxim Maximov mcsi at
Tue Mar 29 21:34:19 PST 2005

Bill Paul wrote:
>>In message <20050327173421.6F6C616A4CE at>, wpaul at writ
>>>uhub2: at uhub1 port 1 (addr 2) disconnected
>>>ukbd0: at uhub2 port 1 (addr 3) disconnected
>>>ukbd0: detached
>>>Fatal trap 12: page fault while in kernel mode
>>>cpuid = 0; apic id = 00
>>>fault virtual address   = 0xc
>>>fault code              = supervisor read, page not present
>>>It looks as if the ukbd_timeout() routine is not always disabled when
>>>the ukbd driver is detached. I suspect there is a race condition somewhere
>>>that only manifests on SMP, but I haven't been able to track it down.
>>>This is with the 6.0 SNAP002 CD from March 18th. It also happened with
>>>the SNAP001 CD.
>>The ukbd driver uses the timeout()/untimeout() API, which makes it
>>pretty much impossible to cancel timeouts reliably. That may not
>>be the real problem here, but could be related - does the patch
>>below make any difference?
> Hm... yeah, this seems to have stopped it crashing:
> [power off]
> uhub2: at uhub1 port 1 (addr 2) disconnected
> ukbd0: at uhub2 port 1 (addr 3) disconnected
> ukbd0: detached
> ums0: at uhub2 port 2 (addr 4) disconnected
> ums0: detached
> uhub2: detached
> [power on]
> uhub2: NEC Corporation USB2.0 Hub Controller, class 9/0, rev 2.00/1.00, addr 2
> uhub2: 4 ports with 4 removable, self powered
> ukbd0: vendor 0x0430 product 0x0005, rev 1.10/2.00, addr 3, iclass 3/1
> kbd1 at ukbd0
> ums0: vendor 0x0430 product 0x0100, rev 2.00/1.07, addr 4, iclass 3/1
> ums0: 3 buttons.
> Thanks!


I haven't had the time to test it by myself, but I believe if you commit 
this patch, usb/76847 can be closed. Thanks!

Maxim Maximov

More information about the cvs-all mailing list