mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 11:00:55 +00:00
[ACPI]
- Start reporting compatible IDs for ACPI-enumerated devices other than processors - Not sure how this was overlooked for so long... svn path=/trunk/; revision=63345
This commit is contained in:
parent
689159fedc
commit
ae4a8102df
|
@ -400,7 +400,7 @@ Bus_PDO_QueryDeviceId(
|
||||||
PIO_STACK_LOCATION stack;
|
PIO_STACK_LOCATION stack;
|
||||||
PWCHAR buffer, src;
|
PWCHAR buffer, src;
|
||||||
WCHAR temp[256];
|
WCHAR temp[256];
|
||||||
ULONG length;
|
ULONG length, i;
|
||||||
NTSTATUS status = STATUS_SUCCESS;
|
NTSTATUS status = STATUS_SUCCESS;
|
||||||
struct acpi_device *Device;
|
struct acpi_device *Device;
|
||||||
|
|
||||||
|
@ -490,12 +490,19 @@ Bus_PDO_QueryDeviceId(
|
||||||
|
|
||||||
/* This is a REG_MULTI_SZ value */
|
/* This is a REG_MULTI_SZ value */
|
||||||
length = 0;
|
length = 0;
|
||||||
|
status = STATUS_NOT_SUPPORTED;
|
||||||
|
|
||||||
/* See comment in BusQueryDeviceID case */
|
/* See comment in BusQueryDeviceID case */
|
||||||
if (DeviceData->AcpiHandle)
|
if (DeviceData->AcpiHandle)
|
||||||
{
|
{
|
||||||
acpi_bus_get_device(DeviceData->AcpiHandle, &Device);
|
acpi_bus_get_device(DeviceData->AcpiHandle, &Device);
|
||||||
|
|
||||||
|
if (!Device->flags.hardware_id)
|
||||||
|
{
|
||||||
|
/* We don't have the ID to satisfy this request */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
DPRINT("Device name: %s\n", Device->pnp.device_name);
|
DPRINT("Device name: %s\n", Device->pnp.device_name);
|
||||||
DPRINT("Hardware ID: %s\n", Device->pnp.hardware_id);
|
DPRINT("Hardware ID: %s\n", Device->pnp.hardware_id);
|
||||||
|
|
||||||
|
@ -557,11 +564,17 @@ Bus_PDO_QueryDeviceId(
|
||||||
{
|
{
|
||||||
acpi_bus_get_device(DeviceData->AcpiHandle, &Device);
|
acpi_bus_get_device(DeviceData->AcpiHandle, &Device);
|
||||||
|
|
||||||
if (strcmp(Device->pnp.hardware_id, "Processor") == 0)
|
if (!Device->flags.hardware_id)
|
||||||
{
|
{
|
||||||
|
/* We don't have the ID to satisfy this request */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
DPRINT("Device name: %s\n", Device->pnp.device_name);
|
DPRINT("Device name: %s\n", Device->pnp.device_name);
|
||||||
DPRINT("Hardware ID: %s\n", Device->pnp.hardware_id);
|
DPRINT("Hardware ID: %s\n", Device->pnp.hardware_id);
|
||||||
|
|
||||||
|
if (strcmp(Device->pnp.hardware_id, "Processor") == 0)
|
||||||
|
{
|
||||||
length += swprintf(&temp[length],
|
length += swprintf(&temp[length],
|
||||||
L"ACPI\\%hs",
|
L"ACPI\\%hs",
|
||||||
Device->pnp.hardware_id);
|
Device->pnp.hardware_id);
|
||||||
|
@ -572,6 +585,29 @@ Bus_PDO_QueryDeviceId(
|
||||||
Device->pnp.hardware_id);
|
Device->pnp.hardware_id);
|
||||||
temp[length++] = UNICODE_NULL;
|
temp[length++] = UNICODE_NULL;
|
||||||
temp[length++] = UNICODE_NULL;
|
temp[length++] = UNICODE_NULL;
|
||||||
|
}
|
||||||
|
else if (Device->flags.compatible_ids)
|
||||||
|
{
|
||||||
|
for (i = 0; i < Device->pnp.cid_list->Count; i++)
|
||||||
|
{
|
||||||
|
length += swprintf(&temp[length],
|
||||||
|
L"ACPI\\%hs",
|
||||||
|
Device->pnp.cid_list->Ids[i].String);
|
||||||
|
temp[length++] = UNICODE_NULL;
|
||||||
|
|
||||||
|
length += swprintf(&temp[length],
|
||||||
|
L"*%hs",
|
||||||
|
Device->pnp.cid_list->Ids[i].String);
|
||||||
|
temp[length++] = UNICODE_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
temp[length++] = UNICODE_NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* No compatible IDs */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
|
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
|
||||||
|
|
||||||
|
@ -584,10 +620,9 @@ Bus_PDO_QueryDeviceId(
|
||||||
|
|
||||||
RtlCopyMemory (buffer, temp, length * sizeof(WCHAR));
|
RtlCopyMemory (buffer, temp, length * sizeof(WCHAR));
|
||||||
Irp->IoStatus.Information = (ULONG_PTR) buffer;
|
Irp->IoStatus.Information = (ULONG_PTR) buffer;
|
||||||
DPRINT("BusQueryHardwareIDs: %ls\n",buffer);
|
DPRINT("BusQueryCompatibleIDs: %ls\n",buffer);
|
||||||
status = STATUS_SUCCESS;
|
status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue