mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[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. svn path=/trunk/; revision=51344
This commit is contained in:
parent
1b2e00d581
commit
3b717045b6
1 changed files with 11 additions and 14 deletions
|
@ -392,8 +392,8 @@ KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
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 @@ KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
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 @@ KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
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 @@ KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
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 @@ KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
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,11 +501,8 @@ KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
Status = STATUS_SUCCESS;//STATUS_INVALID_DEVICE_REQUEST;
|
||||
break;
|
||||
}
|
||||
intcontfailure:
|
||||
Status = Irp->IoStatus.Status;
|
||||
}
|
||||
|
||||
|
||||
if (Status == STATUS_INVALID_DEVICE_REQUEST)
|
||||
{
|
||||
usb_dbg_print(DBGLVL_MINIMUM, ("Invalid internal device request!\n"));
|
||||
|
|
Loading…
Reference in a new issue