mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[PCIX]
- Ignore invalid extended capabilities pointer - Don't hang on unimplemented IRPs that we actually use svn path=/branches/usb-bringup-trunk/; revision=55539
This commit is contained in:
parent
a8c87a2245
commit
66246c5c2d
3 changed files with 67 additions and 63 deletions
|
@ -1196,9 +1196,16 @@ PciGetEnhancedCapabilities(IN PPCI_PDO_EXTENSION PdoExtension,
|
|||
CapPtr = PciData->u.type0.CapabilitiesPtr;
|
||||
}
|
||||
|
||||
/* Make sure the pointer is spec-aligned and located, and save it */
|
||||
/* Skip garbage capabilities pointer */
|
||||
if (((CapPtr & 0x3) != 0) || (CapPtr < PCI_COMMON_HDR_LENGTH))
|
||||
{
|
||||
/* Report no extended capabilities */
|
||||
PdoExtension->CapabilitiesPtr = 0;
|
||||
PdoExtension->HackFlags |= PCI_HACK_NO_PM_CAPS;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Device has capabilities at: %lx\n", CapPtr);
|
||||
ASSERT(((CapPtr & 0x3) == 0) && (CapPtr >= PCI_COMMON_HDR_LENGTH));
|
||||
PdoExtension->CapabilitiesPtr = CapPtr;
|
||||
|
||||
/* Check for PCI-to-PCI Bridges and AGP bridges */
|
||||
|
@ -1264,6 +1271,7 @@ PciGetEnhancedCapabilities(IN PPCI_PDO_EXTENSION PdoExtension,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* At the very end of all this, does this device not have power management? */
|
||||
if (PdoExtension->HackFlags & PCI_HACK_NO_PM_CAPS)
|
||||
|
|
|
@ -127,7 +127,6 @@ PciFdoIrpQueryRemoveDevice(IN PIRP Irp,
|
|||
IN PPCI_FDO_EXTENSION DeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
while (TRUE);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,6 @@ PciPdoSetPowerState(IN PIRP Irp,
|
|||
IN PPCI_PDO_EXTENSION DeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
while (TRUE);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -210,7 +209,6 @@ PciPdoIrpQueryRemoveDevice(IN PIRP Irp,
|
|||
IN PPCI_PDO_EXTENSION DeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
while (TRUE);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -429,7 +427,6 @@ PciPdoIrpQueryDeviceState(IN PIRP Irp,
|
|||
IN PPCI_PDO_EXTENSION DeviceExtension)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
while (TRUE);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue