Merge 20261 and part of 20256 from trunk:
- Fix little bug which prevented IRP_MJ_PNP to be forwarded to lower
driver
- Fix serial mouse type detection
- Shut up some debug message
Modified:
branches/ros-branch-0_2_9/reactos/drivers/bus/serenum/serenum.c
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/mouclass/mouclass.c
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/detect.c
Modified: branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/fdo.c
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/readmouse.c
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/sermouse.c
_____
Modified:
branches/ros-branch-0_2_9/reactos/drivers/bus/serenum/serenum.c
--- branches/ros-branch-0_2_9/reactos/drivers/bus/serenum/serenum.c
2005-12-18 23:00:00 UTC (rev 20261)
+++ branches/ros-branch-0_2_9/reactos/drivers/bus/serenum/serenum.c
2005-12-18 23:02:36 UTC (rev 20262)
@@ -100,7 +100,7 @@
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SerenumAddDevice;
- for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+ for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
//DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
SerialQueryInformation;
_____
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/mouclass/mouclass.c
--- branches/ros-branch-0_2_9/reactos/drivers/input/mouclass/mouclass.c
2005-12-18 23:00:00 UTC (rev 20261)
+++ branches/ros-branch-0_2_9/reactos/drivers/input/mouclass/mouclass.c
2005-12-18 23:02:36 UTC (rev 20262)
@@ -136,6 +136,7 @@
/* Forward some IRPs to lower device */
switch
(IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
{
+ case IRP_MJ_PNP:
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
return ForwardIrpAndForget(DeviceObject,
Irp);
default:
@@ -788,7 +789,7 @@
DriverObject->DriverExtension->AddDevice = ClassAddDevice;
DriverObject->DriverUnload = DriverUnload;
- for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+ for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] =
ClassCreate;
_____
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/detect.c
--- branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/detect.c
2005-12-18 23:00:00 UTC (rev 20261)
+++ branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/detect.c
2005-12-18 23:02:36 UTC (rev 20262)
@@ -186,7 +186,7 @@
&Fcr, sizeof(Fcr), NULL, NULL);
if (!NT_SUCCESS(Status)) goto ByeBye;
/* Set serial port speed */
- BaudRate = SERIAL_BAUD_1200;
+ BaudRate = 1200;
Status = SermouseDeviceIoControl(LowerDevice,
IOCTL_SERIAL_SET_BAUD_RATE,
&BaudRate, sizeof(BaudRate), NULL, NULL);
if (!NT_SUCCESS(Status)) goto ByeBye;
_____
Modified: branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/fdo.c
--- branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/fdo.c
2005-12-18 23:00:00 UTC (rev 20261)
+++ branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/fdo.c
2005-12-18 23:02:36 UTC (rev 20262)
@@ -115,8 +115,6 @@
Fdo->Flags |= DO_BUFFERED_IO;
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
- /* FIXME: create registry entry in
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP */
-
ExFreePool(DeviceNameU.Buffer);
return STATUS_SUCCESS;
@@ -124,6 +122,8 @@
cleanupFDO:
if (DeviceExtension)
{
+ if (DeviceExtension->LowerDevice)
+ IoDetachDevice(DeviceExtension->LowerDevice);
ExFreePool(DeviceExtension->MouseInputData[0]);
ExFreePool(DeviceExtension->MouseInputData[1]);
}
@@ -177,7 +177,7 @@
/* Override the number of buttons */
DeviceExtension->AttributesInformation.NumberOfButtons =
DeviceExtension->DriverExtension->NumberOfButtons;
- DeviceExtension->AttributesInformation.SampleRate = 1200 / 8;
+ DeviceExtension->AttributesInformation.SampleRate =
DeviceExtension->DriverExtension->SampleRate / 8;
DeviceExtension->AttributesInformation.InputDataQueueLength =
DeviceExtension->DriverExtension->MouseDataQueueSize;
DeviceExtension->MouseType = MouseType;
DeviceExtension->PnpState = dsStarted;
_____
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/readmouse.c
--- branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/readmouse.c
2005-12-18 23:00:00 UTC (rev 20261)
+++ branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/readmouse.c
2005-12-18 23:02:36 UTC (rev 20262)
@@ -172,7 +172,7 @@
for (i = 0; i < ioStatus.Information; i++)
{
ReceivedByte = Buffer[i];
- DPRINT1("ReceivedByte 0x%02x\n", ReceivedByte);
+ DPRINT("ReceivedByte 0x%02x\n", ReceivedByte);
/* Synchronize */
if ((ReceivedByte & 0x40) == 0x40)
_____
Modified:
branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/sermouse.c
--- branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/sermouse.c
2005-12-18 23:00:00 UTC (rev 20261)
+++ branches/ros-branch-0_2_9/reactos/drivers/input/sermouse/sermouse.c
2005-12-18 23:02:36 UTC (rev 20262)
@@ -150,7 +150,7 @@
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SermouseAddDevice;
- for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+ for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
DriverObject->MajorFunction[IRP_MJ_CREATE] = SermouseCreate;