mirror of
https://github.com/reactos/reactos.git
synced 2024-07-29 15:49:03 +00:00
- Enable IopReferenceDeviceObject in IopParseDevice (not much use for now except OS "Correctness" and identifying broken drivers). DO referencing isn't fully used in the kernel yet.
- Fix broken drivers: i8042 and videoprt. NDIS might be broken too, but downloading worked fine for me, so it's not hitting the check in IopParseDevice. svn path=/trunk/; revision=23325
This commit is contained in:
parent
bef11ebb29
commit
48d3c8e74f
|
@ -741,6 +741,7 @@ static NTSTATUS STDCALL I8042AddDevice(PDRIVER_OBJECT DriverObject,
|
||||||
KeInitializeTimer(&DevExt->TimerMouseTimeout);
|
KeInitializeTimer(&DevExt->TimerMouseTimeout);
|
||||||
|
|
||||||
Status = I8042Initialize(DevExt);
|
Status = I8042Initialize(DevExt);
|
||||||
|
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
|
||||||
if (!NT_SUCCESS(STATUS_SUCCESS)) {
|
if (!NT_SUCCESS(STATUS_SUCCESS)) {
|
||||||
DPRINT1("Initialization failure: %x\n", Status);
|
DPRINT1("Initialization failure: %x\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -790,6 +791,7 @@ static NTSTATUS STDCALL I8042AddDevice(PDRIVER_OBJECT DriverObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
InsertTailList(&DevExt->BusDevices, &FdoDevExt->BusDevices);
|
InsertTailList(&DevExt->BusDevices, &FdoDevExt->BusDevices);
|
||||||
|
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DevExt->KeyboardExists = FALSE;
|
DevExt->KeyboardExists = FALSE;
|
||||||
|
@ -838,6 +840,7 @@ static NTSTATUS STDCALL I8042AddDevice(PDRIVER_OBJECT DriverObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
InsertTailList(&DevExt->BusDevices, &FdoDevExt->BusDevices);
|
InsertTailList(&DevExt->BusDevices, &FdoDevExt->BusDevices);
|
||||||
|
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DevExt->MouseExists = FALSE;
|
DevExt->MouseExists = FALSE;
|
||||||
|
|
|
@ -362,6 +362,8 @@ IntVideoPortCreateAdapterDeviceObject(
|
||||||
DeviceExtension->NextDeviceObject = IoAttachDeviceToDeviceStack(
|
DeviceExtension->NextDeviceObject = IoAttachDeviceToDeviceStack(
|
||||||
*DeviceObject, PhysicalDeviceObject);
|
*DeviceObject, PhysicalDeviceObject);
|
||||||
|
|
||||||
|
/* Remove the initailizing flag */
|
||||||
|
(*DeviceObject)->Flags &= ~DO_DEVICE_INITIALIZING;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,9 @@ IopReferenceDeviceObject(IN PDEVICE_OBJECT DeviceObject)
|
||||||
(DeviceObject->Flags & DO_DEVICE_INITIALIZING))
|
(DeviceObject->Flags & DO_DEVICE_INITIALIZING))
|
||||||
{
|
{
|
||||||
/* It's unloading or initializing, so fail */
|
/* It's unloading or initializing, so fail */
|
||||||
|
DPRINT1("You are seeing this because the following ROS driver: %wZ\n"
|
||||||
|
" sucks. Please fix it's AddDevice Routine\n",
|
||||||
|
&DeviceObject->DriverObject->DriverName);
|
||||||
return STATUS_NO_SUCH_DEVICE;
|
return STATUS_NO_SUCH_DEVICE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -622,8 +622,6 @@ IopInitializeDriverModule(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
IopReinitializeDrivers();
|
|
||||||
|
|
||||||
/* Set the driver as initialized */
|
/* Set the driver as initialized */
|
||||||
Driver->Flags |= DRVO_INITIALIZED;
|
Driver->Flags |= DRVO_INITIALIZED;
|
||||||
DeviceObject = Driver->DeviceObject;
|
DeviceObject = Driver->DeviceObject;
|
||||||
|
@ -634,6 +632,8 @@ IopInitializeDriverModule(
|
||||||
DeviceObject = DeviceObject->NextDevice;
|
DeviceObject = DeviceObject->NextDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IopReinitializeDrivers();
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,9 @@ IopParseDevice(IN PVOID ParseObject,
|
||||||
OriginalDeviceObject = OpenPacket->RelatedFileObject->DeviceObject;
|
OriginalDeviceObject = OpenPacket->RelatedFileObject->DeviceObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reference the DO FIXME: Don't allow failure */
|
/* Reference the DO */
|
||||||
//Status = IopReferenceDeviceObject(OriginalDeviceObject);
|
Status = IopReferenceDeviceObject(OriginalDeviceObject);
|
||||||
OriginalDeviceObject->ReferenceCount++;
|
if (!NT_SUCCESS(Status)) return Status;
|
||||||
|
|
||||||
/* Map the generic mask and set the new mapping in the access state */
|
/* Map the generic mask and set the new mapping in the access state */
|
||||||
RtlMapGenericMask(&AccessState->RemainingDesiredAccess,
|
RtlMapGenericMask(&AccessState->RemainingDesiredAccess,
|
||||||
|
|
Loading…
Reference in a new issue