mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 22:49:12 +00:00
[ISAPNP] Mark read data port as started, even if no ISAPNP card is present
CORE-17056
This commit is contained in:
parent
f454f4dc21
commit
e246b9947e
1 changed files with 9 additions and 3 deletions
|
@ -191,7 +191,7 @@ IsaPdoStartReadPort(
|
|||
IN PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
PCM_RESOURCE_LIST ResourceList = IrpSp->Parameters.StartDevice.AllocatedResources;
|
||||
NTSTATUS Status = STATUS_INVALID_PARAMETER;
|
||||
NTSTATUS Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
KIRQL OldIrql;
|
||||
ULONG i;
|
||||
|
||||
|
@ -209,11 +209,12 @@ IsaPdoStartReadPort(
|
|||
for (i = 0; i < ResourceList->List[0].PartialResourceList.Count; i++)
|
||||
{
|
||||
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor = &ResourceList->List[0].PartialResourceList.PartialDescriptors[i];
|
||||
if (PartialDescriptor->Type == CmResourceTypePort)
|
||||
if (PartialDescriptor->Type == CmResourceTypePort && PartialDescriptor->u.Port.Length > 1 && !FdoExt->ReadDataPort)
|
||||
{
|
||||
PUCHAR ReadDataPort = ULongToPtr(PartialDescriptor->u.Port.Start.u.LowPart + 3);
|
||||
if (PartialDescriptor->u.Port.Length > 1 && !FdoExt->ReadDataPort && NT_SUCCESS(IsaHwTryReadDataPort(ReadDataPort)))
|
||||
if (NT_SUCCESS(IsaHwTryReadDataPort(ReadDataPort)))
|
||||
{
|
||||
/* we detected some ISAPNP cards */
|
||||
FdoExt->ReadDataPort = ReadDataPort;
|
||||
KeAcquireSpinLock(&FdoExt->Lock, &OldIrql);
|
||||
Status = IsaHwFillDeviceList(FdoExt);
|
||||
|
@ -224,6 +225,11 @@ IsaPdoStartReadPort(
|
|||
IoInvalidateDeviceRelations(FdoExt->DataPortPdo, RemovalRelations);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* mark read data port as started, even if no card has been detected */
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue