Hi Iain. Sorry, I should have consulted you before committing this.
On 1 sty 2012, at 20:44, Iain Hibbert wrote: > On Sat, 31 Dec 2011, Radoslaw Kujawa wrote: > >> Module Name: src >> Committed By: rkujawa >> Date: Sat Dec 31 01:16:09 UTC 2011 >> >> Modified Files: >> src/sys/dev/bluetooth: bthidev.c btkbd.c >> >> Log Message: >> Fix panic triggered by pressing the caps lock key: >> http://c0ff33.net/drop/bt_caps_panic.jpg > > this does not seem right - I've never had such a panic, I can easily reproduce this problem with Apple Wireless Keyboard (version without numeric keypad) on NetBSD/amd64 HEAD. If this patch is not applied, pressing caps lock always results in panic, as in photo. > and btkbd should > really be Bluetooth agnostic since its the same as ukbd (except that > ukbd is tied too closely to the USB stack) So we shouldn't fiddle with bt_lock in btkbd.c ? > btkbd_set_leds() may be called from wskbd directly (by pressing caps lock > on your built-in keyboard for instance) I've tested this patch by pressing the caps lock key on bt keyboard and issuing wsconsctl ledstate=1, and both methods work. > probably it should be that bt_lock is released in bthidev_input() before > calling the hid_output function.. I'm not sure if I understand correctly. The bthidev_input() does not acquire bt_lock at all. -- Best regards, Radoslaw Kujawa