X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Fbus%2Fpcix%2Fpdo.c;h=8ed578c1251e3f481f58fbd306d625d2fc49ca94;hp=2e2bd57bc1fc93b2f4b1aa373cb1b46a3b3fdf40;hb=af01479fbfc43d41eb62ef48643a4451d861f240;hpb=912704ceb87cec9705e6ff8901749e87086aad7a diff --git a/reactos/drivers/bus/pcix/pdo.c b/reactos/drivers/bus/pcix/pdo.c index 2e2bd57bc1f..8ed578c1251 100644 --- a/reactos/drivers/bus/pcix/pdo.c +++ b/reactos/drivers/bus/pcix/pdo.c @@ -200,9 +200,32 @@ PciPdoIrpQueryDeviceRelations(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + NTSTATUS Status; + PAGED_CODE(); + + /* Are ejection relations being queried? */ + if (IoStackLocation->Parameters.QueryDeviceRelations.Type == EjectionRelations) + { + /* Call the worker function */ + Status = PciQueryEjectionRelations(DeviceExtension, + (PDEVICE_RELATIONS*)&Irp-> + IoStatus.Information); + } + else if (IoStackLocation->Parameters.QueryDeviceRelations.Type == TargetDeviceRelation) + { + /* The only other relation supported is the target device relation */ + Status = PciQueryTargetDeviceRelations(DeviceExtension, + (PDEVICE_RELATIONS*)&Irp-> + IoStatus.Information); + } + else + { + /* All other relations are unsupported */ + Status = STATUS_NOT_SUPPORTED; + } + + /* Return either the result of the worker function, or unsupported status */ + return Status; } NTSTATUS @@ -211,9 +234,12 @@ PciPdoIrpQueryCapabilities(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + PAGED_CODE(); + + /* Call the worker function */ + return PciQueryCapabilities(DeviceExtension, + IoStackLocation-> + Parameters.DeviceCapabilities.Capabilities); } NTSTATUS @@ -222,9 +248,11 @@ PciPdoIrpQueryResources(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + PAGED_CODE(); + + /* Call the worker function */ + return PciQueryResources(DeviceExtension, + (PCM_RESOURCE_LIST*)&Irp->IoStatus.Information); } NTSTATUS @@ -233,9 +261,12 @@ PciPdoIrpQueryResourceRequirements(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + PAGED_CODE(); + + /* Call the worker function */ + return PciQueryRequirements(DeviceExtension, + (PIO_RESOURCE_REQUIREMENTS_LIST*)&Irp-> + IoStatus.Information); } NTSTATUS @@ -244,9 +275,15 @@ PciPdoIrpQueryDeviceText(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + PAGED_CODE(); + + /* Call the worker function */ + return PciQueryDeviceText(DeviceExtension, + IoStackLocation-> + Parameters.QueryDeviceText.DeviceTextType, + IoStackLocation-> + Parameters.QueryDeviceText.LocaleId, + (PWCHAR*)&Irp->IoStatus.Information); } NTSTATUS @@ -255,9 +292,12 @@ PciPdoIrpQueryId(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + PAGED_CODE(); + + /* Call the worker function */ + return PciQueryId(DeviceExtension, + IoStackLocation->Parameters.QueryId.IdType, + (PWCHAR*)&Irp->IoStatus.Information); } NTSTATUS @@ -266,9 +306,12 @@ PciPdoIrpQueryBusInformation(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_NOT_SUPPORTED; + PAGED_CODE(); + + /* Call the worker function */ + return PciQueryBusInformation(DeviceExtension, + (PPNP_BUS_INFORMATION*)&Irp-> + IoStatus.Information); } NTSTATUS