From nobody@FreeBSD.org  Sat Sep 18 17:55:16 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5CF4116A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Sep 2004 17:55:16 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4EE0F43D1F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Sep 2004 17:55:16 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i8IHtFPJ038597
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Sep 2004 17:55:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i8IHtFZX038595;
	Sat, 18 Sep 2004 17:55:15 GMT
	(envelope-from nobody)
Message-Id: <200409181755.i8IHtFZX038595@www.freebsd.org>
Date: Sat, 18 Sep 2004 17:55:15 GMT
From: Silvere THOMMEREL <sthommerel@osiatis.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Losing keyboard after plugging a bluetooth usb dongle
X-Send-Pr-Version: www-2.3

>Number:         71887
>Category:       kern
>Synopsis:       [kbd] Losing keyboard after plugging a bluetooth usb dongle
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-usb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 18 18:00:45 GMT 2004
>Closed-Date:    Wed Jan 12 22:49:32 GMT 2005
>Last-Modified:  Thu Jan 13 01:00:33 GMT 2005
>Originator:     Silvere THOMMEREL
>Release:        6.0-CURRENT
>Organization:
not applicable here
>Environment:
FreeBSD DareDevil 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sat Sep 18 16:12:09 CEST 2004     root@DareDevil:/usr/obj/usr/src/sys/DAREDEVIL  i386
>Description:
I did a "make world' today. 
I use a bluetooth dongle. 

First I load ng_ubt : kldload ng_ubt
# kldload ng_ubt

Then I plug the dongle (below extract from all.log):

Sep 18 17:25:23 DareDevil kernel: uhub2: Broadcom product 0x3535, class 9/0, rev 2.00/1.00, addr 2
Sep 18 17:25:23 DareDevil kernel: uhub2: 3 ports with 0 removable, bus powered
Sep 18 17:25:24 DareDevil kernel: ubt0: Broadcom Corp Bluetooth Transceiver, rev 1.10/1.00, addr 3
Sep 18 17:25:24 DareDevil kernel: ubt0: Broadcom Corp Bluetooth Transceiver, rev 1.10/1.00, addr 3
Sep 18 17:25:24 DareDevil kernel: ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
Sep 18 17:25:24 DareDevil kernel: ubt0: Interface 1 (alt.config 4) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=64; nframes=5, buffer size=320
Sep 18 17:25:25 DareDevil kernel: ukbd0: Broadcom product 0x3502, rev 1.10/1.00, addr 4, iclass 3/1
Sep 18 17:25:25 DareDevil kernel: kbd1 at ukbd0
Sep 18 17:25:25 DareDevil kernel: ums1: Broadcom product 0x3503, rev 1.10/1.00, addr 5, iclass 3/1
Sep 18 17:25:25 DareDevil kernel: ums1: 3 buttons
Sep 18 17:25:40 DareDevil kernel: uhub2: at uhub1 port 2 (addr 2) disconnected
Sep 18 17:25:40 DareDevil kernel: ubt0: detached
Sep 18 17:25:40 DareDevil kernel: ukbd0: detached
Sep 18 17:25:40 DareDevil kernel: ums1: detached
Sep 18 17:25:40 DareDevil moused: unable to open /dev/ums1: No such file or directory
Sep 18 17:26:45 DareDevil syslogd: restart

I use a non USB keyboard which gets superseded by a virtual bluetooth one (I guess).
Removing the USB dongle at this point causes a kernel panic.
>How-To-Repeat:
Ugrade the system and kernel to 18.09.04 then use a bluetooth dongle...
>Fix:
      
>Release-Note:
>Audit-Trail:

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Silvere THOMMEREL <sthommerel@osiatis.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/71887: Loosing keyboard after plugging a bluetooth usb dongle
Date: Sat, 18 Sep 2004 14:27:12 -0700

 Please try commenting out the following lines in your devd.conf.
 Currently we only support one keyboard at a time and this entry switches
 to a USB keyboard if you add one.  The panic sounds like a usb or
 bluetooth bug.
 
 # When a USB keyboard arrives, attach it as the console keyboard
 attach 100 {
         device-name "ukbd0";
         action "test -c /dev/kbd1 && kbdcontrol -k /dev/kbd1 <
 /dev/console";
 };
 detach 100 {
         device-name "ukbd0";
         action "kbdcontrol -k /dev/kbd0 < /dev/console";
 };
 
 -- Brooks

From: "Silvere THOMMEREL" <silvere.thommerel@noos.fr>
To: brooks@one-eyed-alien.net, freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/71887: Loosing keyboard after plugging a bluetooth usb dongle
Date: Sun, 19 Sep 2004 23:53:13 +0200

 Hi,
 Thanks a lot for your quick response, I fixed the problem by removing the  
 following line from my kernel configuration:
 
 #device         ukbd            # Keyboard
 
 I works now as expected from me.
 I did not try your fix, but I probably will, the next time I am allowed to  
 reboot as it seems cleaner.
 
 Thanks again,
 Regards
 
 -- 
 Silvere THOMMEREL
 
Responsible-Changed-From-To: freebsd-bugs->freebsd-usb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Nov 4 07:12:14 GMT 2004 
Responsible-Changed-Why:  
Reassign to appropriate mailing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71887 

From: Julian Elischer <julian@elischer.org>
To: freebsd-gnats-submit@FreeBSD.org, sthommerel@osiatis.com
Cc:  
Subject: Re: kern/71887: [kbd] Losing keyboard after plugging a bluetooth
 usb dongle
Date: Sun, 09 Jan 2005 21:19:57 -0800

 This should probably be in "doc" or somewhere..
 maybe in the bluetooth handbook page.
 
 My Bt adapter also has a keyboard and mouse adapter built in
 and the same thing happens.. It produces the keyboard device
 whether or not it has found a bluetooth keyboard to attach to,
 so having a USB keyboard automatically over-ride teh standard
 keyboard in this situation is dubious at best.
 
 It probably should not be a USB PR but I can't think of a
 better place..  maybe the PR should just be closed and the
 problem documented.
 
State-Changed-From-To: open->closed 
State-Changed-By: emax 
State-Changed-When: Wed Jan 12 22:40:29 GMT 2005 
State-Changed-Why:  
This is NOT USB problem NOR its Bluetooth problem. Few USB Bluetooth 
dongles have this feature to allow use of Bluetooth keyboard and mouse  
on non-Bluetooth enabled systems. Hardware MUST pretend that there is 
USB keyboard, because actual Bluetooth keyboard (or mouse) could be 
powered off or it could be out of range. It just easier to pretend that 
keyboard is connected but it just does not send any data. 

This is just like KVM switch - it pretends that PS/2 keyboard and mouse 
are plugged in, even if actual keyboard/mouse input is redirected to 
another port on KVM switch. This is just another example why we need 
keyboard mux driver. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71887 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: freebsd-gnats-submit@freebsd.org
Cc: Maksim Yevmenkin <emax@freebsd.org>, sthommerel@osiatis.com,
	freebsd-usb@freebsd.org
Subject: Re: kern/71887: [kbd] Losing keyboard after plugging a bluetooth usb dongle
Date: Wed, 12 Jan 2005 15:09:14 -0800

 The fact that:
 
 > Removing the USB dongle at this point causes a kernel panic.
 
 is presumably either a USB or bluetooth problem (I'd bet on USB).  It
 would be nice to know if that still happens.  Hopefully it was fixed in
 all the recent USB fixes.
 
 -- Brooks
 
 --=20
 Any statement of the form "X is the one, true Y" is FALSE.
 PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

From: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: freebsd-gnats-submit@freebsd.org,
	Maksim Yevmenkin <emax@freebsd.org>, sthommerel@osiatis.com,
	freebsd-usb@freebsd.org
Subject: Re: kern/71887: [kbd] Losing keyboard after plugging a bluetooth usb dongle
Date: Wed, 12 Jan 2005 15:59:34 -0800

 Brooks,
 
 > The fact that:
 > 
 > > Removing the USB dongle at this point causes a kernel panic.
 > 
 > is presumably either a USB or bluetooth problem (I'd bet on USB).  It
 
 i would think this is a usb related problem. i doubt it is a bluetooth
 problem because none of the bluetooth related modules were involved.
 
 > would be nice to know if that still happens.  Hopefully it was fixed in
 > all the recent USB fixes.
 
 indeed. the system should not crash when usb device is unplugged.
 
 thanks,
 max

From: Julian Elischer <julian@elischer.org>
To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc: Brooks Davis <brooks@one-eyed-alien.net>,
	freebsd-gnats-submit@freebsd.org,
	Maksim Yevmenkin <emax@freebsd.org>, sthommerel@osiatis.com,
	freebsd-usb@freebsd.org
Subject: Re: kern/71887: [kbd] Losing keyboard after plugging a bluetooth
 usb dongle
Date: Wed, 12 Jan 2005 16:57:21 -0800

 Maksim Yevmenkin wrote:
 
 >Brooks,
 >
 >  
 >
 >>would be nice to know if that still happens.  Hopefully it was fixed in
 >>all the recent USB fixes.
 >>    
 >>
 >
 >indeed. the system should not crash when usb device is unplugged.
 >
 
 it doesn't crash when I remove miine....
 
 >
 >  
 >
 
>Unformatted:
