Sync with trunk r58740.
[reactos.git] / drivers / bus / pcix / dispatch.c
index c30322d..e4ab2c6 100644 (file)
@@ -49,7 +49,7 @@ PciCallDownIrpStack(IN PPCI_FDO_EXTENSION DeviceExtension,
     IoSetCompletionRoutine(Irp, PciSetEventCompletion, &Event, TRUE, TRUE, TRUE);
 
     /* Call the attached device */
-    Status = IofCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
+    Status = IoCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
     if (Status == STATUS_PENDING)
     {
         /* Wait for it to complete the request, and get its status */
@@ -83,7 +83,7 @@ PciPassIrpFromFdoToPdo(IN PPCI_FDO_EXTENSION DeviceExtension,
     {
         /* For a normal IRP, just call the next driver in the stack */
         IoSkipCurrentIrpStackLocation(Irp);
-        Status = IofCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
+        Status = IoCallDriver(DeviceExtension->AttachedDeviceObject, Irp);
     }
 
     /* Return the status back to the caller */
@@ -102,8 +102,8 @@ PciDispatchIrp(IN PDEVICE_OBJECT DeviceObject,
     NTSTATUS Status;
     PPCI_MN_DISPATCH_TABLE TableArray = NULL, Table;
     USHORT MaxMinor;
-    PCI_DISPATCH_STYLE DispatchStyle;
-    PCI_DISPATCH_FUNCTION DispatchFunction;
+    PCI_DISPATCH_STYLE DispatchStyle = 0;
+    PCI_DISPATCH_FUNCTION DispatchFunction = NULL;
     DPRINT1("PCI: Dispatch IRP\n");
 
     /* Get the extension and I/O stack location for this IRP */
@@ -146,7 +146,7 @@ PciDispatchIrp(IN PDEVICE_OBJECT DeviceObject,
                 /* WMI IRPs */
                 DispatchFunction = IrpDispatchTable->SystemControlIrpDispatchFunction;
                 DispatchStyle = IrpDispatchTable->SystemControlIrpDispatchStyle;
-                MaxMinor = -1;
+                MaxMinor = 0xFFFF;
                 break;
 
             default:
@@ -154,12 +154,12 @@ PciDispatchIrp(IN PDEVICE_OBJECT DeviceObject,
                 /* Unrecognized IRPs */
                 DispatchFunction = IrpDispatchTable->OtherIrpDispatchFunction;
                 DispatchStyle = IrpDispatchTable->OtherIrpDispatchStyle;
-                MaxMinor = -1;
+                MaxMinor = 0xFFFF;
                 break;
         }
 
         /* Only deal with recognized IRPs */
-        if (MaxMinor != -1)
+        if (MaxMinor != 0xFFFF)
         {
             /* Make sure the function is recognized */
             if (IoStackLocation->MinorFunction > MaxMinor)
@@ -245,7 +245,7 @@ PciDispatchIrp(IN PDEVICE_OBJECT DeviceObject,
         if (IoStackLocation->MajorFunction == IRP_MJ_POWER) PoStartNextPowerIrp(Irp);
 
         /* And now this IRP can be completed */
-        IofCompleteRequest(Irp, IO_NO_INCREMENT);
+        IoCompleteRequest(Irp, IO_NO_INCREMENT);
     }
 
     /* And the status returned back to the caller */
@@ -260,8 +260,18 @@ PciIrpNotSupported(IN PIRP Irp,
 {
     /* Not supported */
     DPRINT1("WARNING: PCI received unsupported IRP!\n");
-    DbgBreakPoint();
+    //DbgBreakPoint();
     return STATUS_NOT_SUPPORTED;
 }
 
+NTSTATUS
+NTAPI
+PciIrpInvalidDeviceRequest(IN PIRP Irp,
+                           IN PIO_STACK_LOCATION IoStackLocation,
+                           IN PPCI_FDO_EXTENSION DeviceExtension)
+{
+    /* Not supported */
+    return STATUS_INVALID_DEVICE_REQUEST;
+}
+
 /* EOF */