mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
Dmitry G. Gorbachev: After kbd controller init, the System Flag should be set to 1.
Fixes rebooting on real hardware (famous "Flushing cache" hang). See issue #1842 for more details. svn path=/trunk/; revision=24744
This commit is contained in:
@@ -599,6 +599,7 @@ static NTSTATUS STDCALL I8042BasicDetect(PDEVICE_EXTENSION DevExt)
|
||||
static NTSTATUS STDCALL I8042Initialize(PDEVICE_EXTENSION DevExt)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UCHAR Value = 0;
|
||||
|
||||
Status = I8042BasicDetect(DevExt);
|
||||
if (!NT_SUCCESS(Status)) {
|
||||
@@ -632,6 +633,32 @@ static NTSTATUS STDCALL I8042Initialize(PDEVICE_EXTENSION DevExt)
|
||||
I8042MouseEnable(DevExt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Some machines do not reboot if SF is not set.
|
||||
*/
|
||||
if (!I8042Write(DevExt, I8042_CTRL_PORT, KBD_READ_MODE)) {
|
||||
DPRINT1("Can't read i8042 mode\n");
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = I8042ReadDataWait(DevExt, &Value);
|
||||
if (!NT_SUCCESS(Status)) {
|
||||
DPRINT1("No response after read i8042 mode\n");
|
||||
return Status;
|
||||
}
|
||||
|
||||
Value |= CCB_SYSTEM_FLAG;
|
||||
|
||||
if (!I8042Write(DevExt, I8042_CTRL_PORT, KBD_WRITE_MODE)) {
|
||||
DPRINT1("Can't set i8042 mode\n");
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (!I8042Write(DevExt, I8042_DATA_PORT, Value)) {
|
||||
DPRINT1("Can't send i8042 mode\n");
|
||||
return Status;
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user