Keith and others,

Attached is a fix for 4.1/4.2/4.3 versions of KDB which removes a panic
if USB keyboard option is configured and user presses CTRL-A from
serial/VT console.  The problem was that urb is null, and the usb
keyread function expects urb to contain a valid urb.  The fix drops out
if urb is null in the poll function.

I have tested this patch by typing help (h) on usb keyboard, (e) on
serial keyboard, (l) on usb keyboard, (p) on serial keyboard (enter) on
usb keyboard, to see the help displayed to my serial console.

Thanks
-steve
diff -uNr 2420_start/arch/i386/kdb/kdba_io.c 2420_kdb/arch/i386/kdb/kdba_io.c
--- 2420_start/arch/i386/kdb/kdba_io.c	2003-04-30 12:13:15.000000000 -0700
+++ 2420_kdb/arch/i386/kdb/kdba_io.c	2003-09-03 17:09:35.000000000 -0700
@@ -86,7 +86,7 @@
 	extern u_short  plain_map[], shift_map[], ctrl_map[];
 
 	/* Is USB initialized ? */
-	if(!kdb_usb_infos.poll_func)
+	if(!kdb_usb_infos.poll_func || !kdb_usb_infos.urb)
     		return -1;
 
 	/* Transfer char if they are present */

Reply via email to