FIELD_OFFSET(DEVICE_RELATIONS,
Objects) +
sizeof(PDEVICE_OBJECT) * PdoCount,
- ' laH');
+ TAG_HAL);
if (!FdoRelations) return STATUS_INSUFFICIENT_RESOURCES;
/* Save our count */
/* Only one entry */
PdoRelations = ExAllocatePoolWithTag(PagedPool,
sizeof(DEVICE_RELATIONS),
- ' laH');
+ TAG_HAL);
if (!PdoRelations) return STATUS_INSUFFICIENT_RESOURCES;
/* Fill it out and reference us */
/* Allocate the resourcel ist */
ResourceList = ExAllocatePoolWithTag(PagedPool,
sizeof(CM_RESOURCE_LIST),
- ' laH');
+ TAG_HAL);
if (!ResourceList )
{
/* Fail, no memory */
Status = STATUS_INSUFFICIENT_RESOURCES;
-// ExFreePoolWithTag(RequirementsList, ' laH');
+// ExFreePoolWithTag(RequirementsList, TAG_HAL);
return Status;
}
/* Return resources and success */
*Resources = ResourceList;
-// ExFreePoolWithTag(RequirementsList, ' laH');
+// ExFreePoolWithTag(RequirementsList, TAG_HAL);
return STATUS_SUCCESS;
}
/* Allocate the buffer */
Buffer = ExAllocatePoolWithTag(PagedPool,
Length + sizeof(UNICODE_NULL),
- ' laH');
+ TAG_HAL);
if (Buffer)
{
/* Copy the string and null-terminate it */
/* Allocate the buffer */
Buffer = ExAllocatePoolWithTag(PagedPool,
Length + sizeof(UNICODE_NULL),
- ' laH');
+ TAG_HAL);
if (Buffer)
{
/* Copy the string and null-terminate it */
case IRP_MN_START_DEVICE:
/* We only care about a PCI PDO */
- DPRINT1("Start device received\n");
+ DPRINT("Start device received\n");
/* Complete the IRP normally */
break;
case IRP_MN_REMOVE_DEVICE:
/* Check if this is a PCI device */
- DPRINT1("Remove device received\n");
+ DPRINT("Remove device received\n");
/* We're done */
Status = STATUS_SUCCESS;
case IRP_MN_SURPRISE_REMOVAL:
/* Inherit whatever status we had */
- DPRINT1("Surprise removal IRP\n");
+ DPRINT("Surprise removal IRP\n");
Status = Irp->IoStatus.Status;
break;
default:
/* We don't handle anything else, so inherit the old state */
- DPRINT("Illegal IRP: %lx\n", Minor);
+ DPRINT1("Illegal IRP: %lx\n", Minor);
Status = Irp->IoStatus.Status;
break;
}
HalpDispatchPower(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
+ PFDO_EXTENSION FdoExtension;
+
DPRINT1("HAL: PnP Driver Power!\n");
- return STATUS_SUCCESS;
+ FdoExtension = DeviceObject->DeviceExtension;
+ if (FdoExtension->ExtensionType == FdoExtensionType)
+ {
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(FdoExtension->AttachedDeviceObject, Irp);
+ }
+ else
+ {
+ PoStartNextPowerIrp(Irp);
+ Irp->IoStatus.Status = STATUS_SUCCESS;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return STATUS_SUCCESS;
+ }
}
NTSTATUS