mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
- Return STATUS_SUCCESS for root bus PDO PnP IRPs so that function drivers can process them.
svn path=/trunk/; revision=11408
This commit is contained in:
parent
cad7a781f2
commit
b02b780b4a
1 changed files with 36 additions and 44 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: pnproot.c,v 1.23 2004/08/15 16:39:03 chorns Exp $
|
||||
/* $Id: pnproot.c,v 1.24 2004/10/24 09:13:18 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -250,8 +250,9 @@ PdoQueryResources(
|
|||
PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
PCM_RESOURCE_LIST ResourceList;
|
||||
ULONG ResourceListSize = FIELD_OFFSET(CM_RESOURCE_LIST, List);
|
||||
|
||||
ResourceList = ExAllocatePool(PagedPool, sizeof(CM_RESOURCE_LIST));
|
||||
ResourceList = ExAllocatePool(PagedPool, ResourceListSize);
|
||||
if (ResourceList == NULL)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
|
@ -263,6 +264,28 @@ PdoQueryResources(
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
PdoQueryResourceRequirements(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
PIO_RESOURCE_REQUIREMENTS_LIST ResourceList;
|
||||
ULONG ResourceListSize = FIELD_OFFSET(IO_RESOURCE_REQUIREMENTS_LIST, List);
|
||||
|
||||
ResourceList = ExAllocatePool(PagedPool, ResourceListSize);
|
||||
if (ResourceList == NULL)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
RtlZeroMemory(ResourceList, ResourceListSize);
|
||||
ResourceList->ListSize = ResourceListSize;
|
||||
|
||||
Irp->IoStatus.Information = (ULONG_PTR)ResourceList;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
PnpRootPdoPnpControl(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
|
@ -280,75 +303,44 @@ PnpRootPdoPnpControl(
|
|||
NTSTATUS Status;
|
||||
|
||||
DPRINT("Called\n");
|
||||
|
||||
|
||||
Status = Irp->IoStatus.Status;
|
||||
|
||||
IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
switch (IrpSp->MinorFunction) {
|
||||
#if 0
|
||||
case IRP_MN_CANCEL_REMOVE_DEVICE:
|
||||
break;
|
||||
|
||||
case IRP_MN_CANCEL_STOP_DEVICE:
|
||||
break;
|
||||
|
||||
case IRP_MN_DEVICE_USAGE_NOTIFICATION:
|
||||
break;
|
||||
|
||||
case IRP_MN_EJECT:
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_BUS_INFORMATION:
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_CAPABILITIES:
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
||||
/* FIXME: Possibly handle for RemovalRelations */
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_DEVICE_TEXT:
|
||||
/* FIXME: Handle for TargetDeviceRelation */
|
||||
break;
|
||||
#endif
|
||||
|
||||
case IRP_MN_QUERY_ID:
|
||||
Status = PdoQueryId(DeviceObject, Irp, IrpSp);
|
||||
break;
|
||||
#if 0
|
||||
case IRP_MN_QUERY_PNP_DEVICE_STATE:
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_REMOVE_DEVICE:
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
|
||||
Status = PdoQueryResourceRequirements(DeviceObject, Irp, IrpSp);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case IRP_MN_QUERY_RESOURCES:
|
||||
Status = PdoQueryResources(DeviceObject, Irp, IrpSp);
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case IRP_MN_QUERY_STOP_DEVICE:
|
||||
break;
|
||||
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
break;
|
||||
|
||||
case IRP_MN_SET_LOCK:
|
||||
break;
|
||||
|
||||
case IRP_MN_START_DEVICE:
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_STOP_DEVICE:
|
||||
case IRP_MN_CANCEL_STOP_DEVICE:
|
||||
case IRP_MN_STOP_DEVICE:
|
||||
case IRP_MN_QUERY_REMOVE_DEVICE:
|
||||
case IRP_MN_CANCEL_REMOVE_DEVICE:
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
case IRP_MN_SURPRISE_REMOVAL:
|
||||
Status = STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
case IRP_MN_SURPRISE_REMOVAL:
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
DPRINT("Unknown IOCTL 0x%X\n", IrpSp->MinorFunction);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue