Author: mjmartin
Date: Fri Apr 15 06:44:13 2011
New Revision: 51344
URL:
http://svn.reactos.org/svn/reactos?rev=51344&view=rev
Log:
[usbdriver]
- KbdDispatch: Set Status vice IoStatus.Status for all branches of switch. Use break
instead of goto intcontfailure.
The previous code would set Status to what ever was in the IoStatus.Status of the IRP and
return that Status.
Some times this would be STATUS_PENDING, which IIRC is a no-no.
This caused the kbdclass to enter into a wait that would never be satisifed hence blocking
the keyboard thread.
This should fix the failure of keyboard input bugs.
Modified:
trunk/reactos/drivers/usb/nt4compat/usbdriver/keyboard.c
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/keyboard.c [iso-8859-1] Fri Apr 15
06:44:13 2011
@@ -392,8 +392,8 @@
if (Stack->Parameters.DeviceIoControl.InputBufferLength
< sizeof(CONNECT_DATA)) {
usb_dbg_print(DBGLVL_MAXIMUM, ("Keyboard
IOCTL_INTERNAL_KEYBOARD_CONNECT "
"invalid buffer size\n"));
- Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
- goto intcontfailure;
+ Status = STATUS_INVALID_PARAMETER;
+ break;
}
RtlCopyMemory(&DeviceExtension->ConnectData,
@@ -408,14 +408,14 @@
sizeof(KEYBOARD_ATTRIBUTES)) {
usb_dbg_print(DBGLVL_MAXIMUM, ("Keyboard
IOCTL_KEYBOARD_QUERY_ATTRIBUTES: "
"invalid buffer size\n"));
- Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
- goto intcontfailure;
+ Status = STATUS_BUFFER_TOO_SMALL;
+ break;
}
/*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
&DevExt->KeyboardAttributes,
sizeof(KEYBOARD_ATTRIBUTES));*/
- Irp->IoStatus.Status = STATUS_SUCCESS;
+ Status = STATUS_SUCCESS;
break;
case IOCTL_KEYBOARD_QUERY_INDICATORS:
usb_dbg_print(DBGLVL_MAXIMUM,
("IOCTL_KEYBOARD_QUERY_INDICATORS\n"));
@@ -439,8 +439,8 @@
sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) {
usb_dbg_print(DBGLVL_MAXIMUM, ("Keyboard
IOCTL_KEYBOARD_QUERY_TYPEMATIC: "
"invalid buffer size\n"));
- Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
- goto intcontfailure;
+ Status = STATUS_BUFFER_TOO_SMALL;
+ break;
}
/*RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
&DevExt->KeyboardTypematic,
@@ -454,8 +454,8 @@
sizeof(KEYBOARD_INDICATOR_PARAMETERS)) {
usb_dbg_print(DBGLVL_MAXIMUM, ("Keyboard
IOCTL_KEYBOARD_SET_INDICTATORS: "
"invalid buffer size\n"));
- Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
- goto intcontfailure;
+ Status = STATUS_BUFFER_TOO_SMALL;
+ break;
}
RtlCopyMemory(&DeviceExtension->KeyboardIndicators,
@@ -472,8 +472,8 @@
sizeof(KEYBOARD_TYPEMATIC_PARAMETERS)) {
usb_dbg_print(DBGLVL_MAXIMUM, ("Keyboard
IOCTL_KEYBOARD_SET_TYPEMATIC "
"invalid buffer size\n"));
- Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
- goto intcontfailure;
+ Status = STATUS_BUFFER_TOO_SMALL;
+ break;
}
/*RtlCopyMemory(&DevExt->KeyboardTypematic,
@@ -501,10 +501,7 @@
Status = STATUS_SUCCESS;//STATUS_INVALID_DEVICE_REQUEST;
break;
}
-intcontfailure:
- Status = Irp->IoStatus.Status;
- }
-
+ }
if (Status == STATUS_INVALID_DEVICE_REQUEST)
{