[ISAPNP] Fix device capabilities

- The bus does not supply an address.
- Read Port ID is always unique.

This reverts commit fc0a0b9f84.
See also commit 21514e473f.

CORE-17034
This commit is contained in:
Dmitry Borisov 2021-03-04 18:46:50 +06:00
parent 21514e473f
commit 2d367001bd

View file

@ -53,23 +53,26 @@ IsaPdoQueryCapabilities(
_In_ PIO_STACK_LOCATION IrpSp)
{
PDEVICE_CAPABILITIES DeviceCapabilities;
PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice;
ULONG i;
UNREFERENCED_PARAMETER(Irp);
PAGED_CODE();
DeviceCapabilities = IrpSp->Parameters.DeviceCapabilities.Capabilities;
if (DeviceCapabilities->Version != 1)
return STATUS_REVISION_MISMATCH;
if (LogDev)
DeviceCapabilities->LockSupported =
DeviceCapabilities->EjectSupported =
DeviceCapabilities->Removable =
DeviceCapabilities->DockDevice = FALSE;
DeviceCapabilities->UniqueID = TRUE;
if (PdoExt->FdoExt->ReadPortPdo &&
PdoExt->Common.Self == PdoExt->FdoExt->ReadPortPdo)
{
DeviceCapabilities->UniqueID = TRUE;
DeviceCapabilities->Address = LogDev->CSN;
}
else
{
DeviceCapabilities->UniqueID = FALSE;
DeviceCapabilities->RawDeviceOK = TRUE;
DeviceCapabilities->SilentInstall = TRUE;
}