Author: evb
Date: Wed Jun 30 01:39:21 2010
New Revision: 47912
URL:
http://svn.reactos.org/svn/reactos?rev=47912&view=rev
Log:
Implemented IRP dispatch to work in new PCI driver (PciDispatchIrp), fill out FDO IRP
handlers which all stubs now, make up/down-call work (PciPassIrpFromFdoToPdo,
PciPassDownIrp)
Added the helper debug routines
PCI driver receive IRP_QUERY_INTERFACE now and hit stub
Modified:
trunk/reactos/drivers/bus/pcix/debug.c
trunk/reactos/drivers/bus/pcix/dispatch.c
trunk/reactos/drivers/bus/pcix/fdo.c
trunk/reactos/drivers/bus/pcix/init.c
trunk/reactos/drivers/bus/pcix/pci.h
trunk/reactos/drivers/bus/pcix/power.c
Modified: trunk/reactos/drivers/bus/pcix/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/debug.c?r…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/debug.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/debug.c [iso-8859-1] Wed Jun 30 01:39:21 2010
@@ -14,6 +14,171 @@
/* GLOBALS ********************************************************************/
+PCHAR PnpCodes[] =
+{
+ "START_DEVICE",
+ "QUERY_REMOVE_DEVICE",
+ "REMOVE_DEVICE",
+ "CANCEL_REMOVE_DEVICE",
+ "STOP_DEVICE",
+ "QUERY_STOP_DEVICE",
+ "CANCEL_STOP_DEVICE",
+ "QUERY_DEVICE_RELATIONS",
+ "QUERY_INTERFACE",
+ "QUERY_CAPABILITIES",
+ "QUERY_RESOURCES",
+ "QUERY_RESOURCE_REQUIREMENTS",
+ "QUERY_DEVICE_TEXT",
+ "FILTER_RESOURCE_REQUIREMENTS",
+ "** UNKNOWN PNP IRP Minor Code **",
+ "READ_CONFIG",
+ "WRITE_CONFIG",
+ "EJECT",
+ "SET_LOCK",
+ "QUERY_ID",
+ "QUERY_PNP_DEVICE_STATE",
+ "QUERY_BUS_INFORMATION",
+ "DEVICE_USAGE_NOTIFICATION"
+};
+
+PCHAR PoCodes[] =
+{
+ "WAIT_WAKE",
+ "POWER_SEQUENCE",
+ "SET_POWER",
+ "QUERY_POWER",
+};
+
+ULONG PciBreakOnPdoPowerIrp, PciBreakOnFdoPowerIrp;
+ULONG PciBreakOnPdoPnpIrp, PciBreakOnFdoPnpIrp;
+
/* FUNCTIONS ******************************************************************/
+PCHAR
+NTAPI
+PciDebugPnpIrpTypeToText(IN USHORT MinorFunction)
+{
+ PCHAR Text;
+
+ /* Catch invalid code */
+ if (MinorFunction >= IRP_MN_SURPRISE_REMOVAL)
+ {
+ /* New version of Windows? Or driver bug */
+ Text = "** UNKNOWN PNP IRP Minor Code **";
+ }
+ else
+ {
+ /* Get the right text for it */
+ Text = PnpCodes[MinorFunction];
+ }
+
+ /* Return the symbolic name for the IRP */
+ return Text;
+}
+
+PCHAR
+NTAPI
+PciDebugPoIrpTypeToText(IN USHORT MinorFunction)
+{
+ PCHAR Text;
+
+ /* Catch invalid code */
+ if (MinorFunction >= IRP_MN_QUERY_POWER)
+ {
+ /* New version of Windows? Or driver bug */
+ Text = "** UNKNOWN PO IRP Minor Code **";
+ }
+ else
+ {
+ /* Get the right text for it */
+ Text = PoCodes[MinorFunction];
+ }
+
+ /* Return the symbolic name for the IRP */
+ return Text;
+}
+
+BOOLEAN
+NTAPI
+PciDebugIrpDispatchDisplay(IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension,
+ IN USHORT MaxMinor)
+{
+ //PPCI_PDO_EXTENSION PdoDeviceExtension;
+ ULONG BreakMask, DebugLevel = 0;
+ PCHAR IrpString;
+
+ /* Only two functions are recognized */
+ switch (IoStackLocation->MajorFunction)
+ {
+ case IRP_MJ_POWER:
+
+ /* Get the string and the correct break mask for the extension */
+ BreakMask = (DeviceExtension->ExtensionType == PciPdoExtensionType) ?
+ PciBreakOnPdoPowerIrp : PciBreakOnFdoPowerIrp;
+ IrpString = PciDebugPoIrpTypeToText(IoStackLocation->MinorFunction);
+ break;
+
+ case IRP_MJ_PNP:
+
+ /* Get the string and the correct break mask for the extension */
+ BreakMask = (DeviceExtension->ExtensionType == PciFdoExtensionType) ?
+ PciBreakOnPdoPnpIrp : PciBreakOnFdoPnpIrp;
+ IrpString = PciDebugPnpIrpTypeToText(IoStackLocation->MinorFunction);
+ break;
+
+ default:
+
+ /* Other functions are not decoded */
+ BreakMask = FALSE;
+ IrpString = "";
+ break;
+ }
+
+ /* Check if this is a PDO */
+ if (DeviceExtension->ExtensionType == PciPdoExtensionType)
+ {
+ /* Choose the correct debug level based on which function this is */
+ if (IoStackLocation->MajorFunction == IRP_MJ_POWER)
+ {
+ DebugLevel = 0x500;
+ }
+ else if (IoStackLocation->MajorFunction == IRP_MJ_PNP)
+ {
+ DebugLevel = 0x200;
+ }
+#if 0 // after commit PDO support
+ /* For a PDO, print out the bus, device, and function number */
+ PdoDeviceExtension = (PVOID)DeviceExtension;
+ DPRINT1("PDO(b=0x%x, d=0x%x, f=0x%x)<-%s\n",
+ PdoDeviceExtension->ParentFdoExtension->BaseBus,
+ PdoDeviceExtension->Slot.u.bits.DeviceNumber,
+ PdoDeviceExtension->Slot.u.bits.FunctionNumber,
+ IrpString);
+#endif
+ }
+ else if (DeviceExtension->ExtensionType == PciFdoExtensionType)
+ {
+ /* Choose the correct debug level based on which function this is */
+ if (IoStackLocation->MajorFunction == IRP_MJ_POWER)
+ {
+ DebugLevel = 0x400;
+ }
+ else if (IoStackLocation->MajorFunction == IRP_MJ_PNP)
+ {
+ DebugLevel = 0x100;
+ }
+
+ /* For an FDO, just dump the extension pointer and IRP string */
+ DPRINT1("FDO(%x)<-%s\n", DeviceExtension, IrpString);
+ }
+
+ /* If the function is illegal for this extension, complain */
+ if (IoStackLocation->MinorFunction > MaxMinor)
+ DPRINT1("Unknown IRP, minor = 0x%x\n",
IoStackLocation->MinorFunction);
+
+ /* Return whether or not the debugger should be broken into for this IRP */
+ return ((1 << IoStackLocation->MinorFunction) & BreakMask);
+}
+
/* EOF */
Modified: trunk/reactos/drivers/bus/pcix/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/dispatch.…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/dispatch.c [iso-8859-1] Wed Jun 30 01:39:21 2010
@@ -18,13 +18,238 @@
NTSTATUS
NTAPI
+PciSetEventCompletion(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp,
+ IN PVOID Context)
+{
+ PKEVENT Event = (PVOID)Context;
+ ASSERT(Event);
+
+ /* Set the event and return the appropriate status code */
+ KeSetEvent(Event, FALSE, IO_NO_INCREMENT);
+ return STATUS_MORE_PROCESSING_REQUIRED;
+}
+
+NTSTATUS
+NTAPI
+PciCallDownIrpStack(IN PPCI_FDO_EXTENSION DeviceExtension,
+ IN PIRP Irp)
+{
+ NTSTATUS Status;
+ KEVENT Event;
+ PAGED_CODE();
+ DPRINT1("PciCallDownIrpStack ...\n");
+ ASSERT_FDO(DeviceExtension);
+
+ /* Initialize the wait event */
+ KeInitializeEvent(&Event, SynchronizationEvent, 0);
+
+ /* Setup a completion routine */
+ IoCopyCurrentIrpStackLocationToNext(Irp);
+ IoSetCompletionRoutine(Irp, PciSetEventCompletion, &Event, TRUE, TRUE, TRUE);
+
+ /* Call the attached device */
+ Status = IofCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
+ if (Status == STATUS_PENDING)
+ {
+ /* Wait for it to complete the request, and get its status */
+ KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
+ Status = Irp->IoStatus.Status;
+ }
+
+ /* Return that status back to the caller */
+ return Status;
+}
+
+NTSTATUS
+NTAPI
+PciPassIrpFromFdoToPdo(IN PPCI_FDO_EXTENSION DeviceExtension,
+ IN PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStackLocation;
+ NTSTATUS Status;
+ DPRINT1("Pci PassIrp ...\n");
+
+ /* Get the stack location to check which function this is */
+ IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
+ if (IoStackLocation->MajorFunction == IRP_MJ_POWER)
+ {
+ /* Power IRPs are special since we have to notify the Power Manager */
+ IoCopyCurrentIrpStackLocationToNext(Irp);
+ PoStartNextPowerIrp(Irp);
+ Status = PoCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
+ }
+ else
+ {
+ /* For a normal IRP, just call the next driver in the stack */
+ IoSkipCurrentIrpStackLocation(Irp);
+ Status = IofCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
+ }
+
+ /* Return the status back to the caller */
+ return Status;
+}
+
+NTSTATUS
+NTAPI
PciDispatchIrp(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
- /* This function is not yet implemented */
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_SUCCESS;
+ PPCI_FDO_EXTENSION DeviceExtension;
+ PIO_STACK_LOCATION IoStackLocation;
+ PPCI_MJ_DISPATCH_TABLE IrpDispatchTable;
+ BOOLEAN PassToPdo;
+ NTSTATUS Status;
+ PPCI_MN_DISPATCH_TABLE TableArray = NULL, Table;
+ USHORT MaxMinor;
+ PCI_DISPATCH_STYLE DispatchStyle;
+ PCI_DISPATCH_FUNCTION DispatchFunction;
+ DPRINT1("PCI: Dispatch IRP\n");
+
+ /* Get the extension and I/O stack location for this IRP */
+ DeviceExtension = (PPCI_FDO_EXTENSION)DeviceObject->DeviceExtension;
+ IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT((DeviceExtension->ExtensionType == PciPdoExtensionType) ||
+ (DeviceExtension->ExtensionType == PciFdoExtensionType));
+
+ /* Deleted extensions don't respond to IRPs */
+ if (DeviceExtension->DeviceState == PciDeleted)
+ {
+ /* Fail this IRP */
+ Status = STATUS_NO_SUCH_DEVICE;
+ PassToPdo = FALSE;
+ }
+ else
+ {
+ /* Otherwise, get the dispatch table for the extension */
+ IrpDispatchTable = DeviceExtension->IrpDispatchTable;
+
+ /* And choose which function table to use */
+ switch (IoStackLocation->MajorFunction)
+ {
+ case IRP_MJ_POWER:
+
+ /* Power Manager IRPs */
+ TableArray = IrpDispatchTable->PowerIrpDispatchTable;
+ MaxMinor = IrpDispatchTable->PowerIrpMaximumMinorFunction;
+ break;
+
+ case IRP_MJ_PNP:
+
+ /* Plug-and-Play Manager IRPs */
+ TableArray = IrpDispatchTable->PnpIrpDispatchTable;
+ MaxMinor = IrpDispatchTable->PnpIrpMaximumMinorFunction;
+ break;
+
+ case IRP_MJ_SYSTEM_CONTROL:
+
+ /* WMI IRPs */
+ DispatchFunction =
IrpDispatchTable->SystemControlIrpDispatchFunction;
+ DispatchStyle = IrpDispatchTable->SystemControlIrpDispatchStyle;
+ MaxMinor = -1;
+ break;
+
+ default:
+
+ /* Unrecognized IRPs */
+ DispatchFunction = IrpDispatchTable->OtherIrpDispatchFunction;
+ DispatchStyle = IrpDispatchTable->OtherIrpDispatchStyle;
+ MaxMinor = -1;
+ break;
+ }
+
+ /* Only deal with recognized IRPs */
+ if (MaxMinor != -1)
+ {
+ /* Make sure the function is recognized */
+ if (IoStackLocation->MinorFunction > MaxMinor)
+ {
+ /* Pick the terminator, which should return unrecognized */
+ Table = &TableArray[MaxMinor + 1];
+ }
+ else
+ {
+ /* Pick the appropriate table for this function */
+ Table = &TableArray[IoStackLocation->MinorFunction];
+ }
+
+ /* From that table, get the function code and dispatch style */
+ DispatchStyle = Table->DispatchStyle;
+ DispatchFunction = Table->DispatchFunction;
+ }
+
+ /* Print out debugging information, and see if we should break */
+ if (PciDebugIrpDispatchDisplay(IoStackLocation,
+ DeviceExtension,
+ MaxMinor))
+ {
+ /* The developer/user wants us to break for this IRP, do it */
+ DbgBreakPoint();
+ }
+
+ /* Check if this IRP should be sent up the stack first */
+ if (DispatchStyle == IRP_UPWARD)
+ {
+ /* Do it now before handling it ourselves */
+ PciCallDownIrpStack(DeviceExtension, Irp);
+ }
+
+ /* Call the our driver's handler for this IRP and deal with the IRP */
+ Status = DispatchFunction(Irp, IoStackLocation, DeviceExtension);
+ switch (DispatchStyle)
+ {
+ /* Complete IRPs are completely immediately by our driver */
+ case IRP_COMPLETE:
+ PassToPdo = FALSE;
+ break;
+
+ /* Downward IRPs are send to the attached FDO */
+ case IRP_DOWNWARD:
+ PassToPdo = TRUE;
+ break;
+
+ /* Upward IRPs are completed immediately by our driver */
+ case IRP_UPWARD:
+ PassToPdo = FALSE;
+ break;
+
+ /* Dispatch IRPs are immediately returned */
+ case IRP_DISPATCH:
+ return Status;
+
+ /* There aren't any other dispatch styles! */
+ default:
+ ASSERT(FALSE);
+ return Status;
+ }
+ }
+
+ /* Pending IRPs are returned immediately */
+ if (Status == STATUS_PENDING) return Status;
+
+ /* Handled IRPs return their status in the status block */
+ if (Status != STATUS_NOT_SUPPORTED) Irp->IoStatus.Status = Status;
+
+ /* Successful, or unhandled IRPs that are "DOWNWARD" are sent to the PDO
*/
+ if ((PassToPdo) && ((NT_SUCCESS(Status)) || (Status ==
STATUS_NOT_SUPPORTED)))
+ {
+ /* Let the PDO deal with it */
+ Status = PciPassIrpFromFdoToPdo(DeviceExtension, Irp);
+ }
+ else
+ {
+ /* Otherwise, the IRP is returned with its status */
+ Status = Irp->IoStatus.Status;
+
+ /* Power IRPs need to notify the Power Manager that the next IRP can go */
+ if (IoStackLocation->MajorFunction == IRP_MJ_POWER) PoStartNextPowerIrp(Irp);
+
+ /* And now this IRP can be completed */
+ IofCompleteRequest(Irp, IO_NO_INCREMENT);
+ }
+
+ /* And the status returned back to the caller */
+ return Status;
}
NTSTATUS
Modified: trunk/reactos/drivers/bus/pcix/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/fdo.c?rev…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/fdo.c [iso-8859-1] Wed Jun 30 01:39:21 2010
@@ -19,40 +19,40 @@
PCI_MN_DISPATCH_TABLE PciFdoDispatchPowerTable[] =
{
- {IRP_DISPATCH, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DISPATCH, PciFdoWaitWake},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciFdoSetPowerState},
+ {IRP_DOWNWARD, PciFdoIrpQueryPower},
{IRP_DOWNWARD, PciIrpNotSupported}
};
PCI_MN_DISPATCH_TABLE PciFdoDispatchPnpTable[] =
{
- {IRP_UPWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DISPATCH, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DISPATCH, PciIrpNotSupported},
- {IRP_UPWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_UPWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
- {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_UPWARD, PciFdoIrpStartDevice},
+ {IRP_DOWNWARD, PciFdoIrpQueryRemoveDevice},
+ {IRP_DISPATCH, PciFdoIrpRemoveDevice},
+ {IRP_DOWNWARD, PciFdoIrpCancelRemoveDevice},
+ {IRP_DOWNWARD, PciFdoIrpStopDevice},
+ {IRP_DOWNWARD, PciFdoIrpQueryStopDevice},
+ {IRP_DOWNWARD, PciFdoIrpCancelStopDevice},
+ {IRP_DOWNWARD, PciFdoIrpQueryDeviceRelations},
+ {IRP_DISPATCH, PciFdoIrpQueryInterface},
+ {IRP_UPWARD, PciFdoIrpQueryCapabilities},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_DOWNWARD, PciIrpNotSupported},
+ {IRP_UPWARD, PciFdoIrpDeviceUsageNotification},
+ {IRP_DOWNWARD, PciFdoIrpSurpriseRemoval},
+ {IRP_DOWNWARD, PciFdoIrpQueryLegacyBusInformation},
{IRP_DOWNWARD, PciIrpNotSupported}
};
@@ -69,6 +69,149 @@
};
/* FUNCTIONS ******************************************************************/
+
+NTSTATUS
+NTAPI
+PciFdoIrpStartDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryRemoveDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpRemoveDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpCancelRemoveDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpStopDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryStopDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpCancelStopDevice(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryDeviceRelations(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryInterface(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryCapabilities(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpDeviceUsageNotification(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpSurpriseRemoval(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryLegacyBusInformation(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
VOID
NTAPI
Modified: trunk/reactos/drivers/bus/pcix/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/init.c?re…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/init.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/init.c [iso-8859-1] Wed Jun 30 01:39:21 2010
@@ -389,7 +389,7 @@
Length,
&NumberOfBytes);
if (Status == STATUS_NO_MORE_ENTRIES) break;
-
+
/* Null-terminate the keyname, because the kernel does not */
KeyInfo->Name[KeyInfo->NameLength / sizeof(WCHAR)] = UNICODE_NULL;
Modified: trunk/reactos/drivers/bus/pcix/pci.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/pci.h?rev…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/pci.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/pci.h [iso-8859-1] Wed Jun 30 01:39:21 2010
@@ -289,6 +289,33 @@
);
//
+// Power Routines
+//
+NTSTATUS
+NTAPI
+PciFdoWaitWake(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoSetPowerState(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryPower(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+//
// Bus FDO Routines
//
NTSTATUS
@@ -296,6 +323,110 @@
PciAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpStartDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryRemoveDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpRemoveDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpCancelRemoveDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpStopDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryStopDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpCancelStopDevice(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryDeviceRelations(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryInterface(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryCapabilities(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpDeviceUsageNotification(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpSurpriseRemoval(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
+);
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryLegacyBusInformation(
+ IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension
);
//
@@ -439,6 +570,17 @@
);
//
+// Debug Helpers
+//
+BOOLEAN
+NTAPI
+PciDebugIrpDispatchDisplay(
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension,
+ IN USHORT MaxMinor
+);
+
+//
// External Resources
//
extern SINGLE_LIST_ENTRY PciFdoExtensionListHead;
Modified: trunk/reactos/drivers/bus/pcix/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/power.c?r…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/power.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/power.c [iso-8859-1] Wed Jun 30 01:39:21 2010
@@ -16,4 +16,37 @@
/* FUNCTIONS ******************************************************************/
+NTSTATUS
+NTAPI
+PciFdoWaitWake(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoSetPowerState(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
+NTSTATUS
+NTAPI
+PciFdoIrpQueryPower(IN PIRP Irp,
+ IN PIO_STACK_LOCATION IoStackLocation,
+ IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ while (TRUE);
+ return STATUS_NOT_SUPPORTED;
+}
+
/* EOF */