[PORTCLS]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 25 Dec 2009 12:24:42 +0000 (12:24 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 25 Dec 2009 12:24:42 +0000 (12:24 +0000)
- Return status code of operation
- Cancel all irps when pin state is set to stop. Fixes ReactOS portcls regression under WindowsXP
- Handle IRP_MN_READ_CONFIG

svn path=/trunk/; revision=44758

reactos/drivers/wdm/audio/backpln/portcls/irp.cpp
reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp

index 18a089d..f30f9de 100644 (file)
@@ -141,6 +141,10 @@ PortClsPnp(
             DPRINT("IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
             Status = PcForwardIrpSynchronous(DeviceObject, Irp);
             return PcCompleteIrp(DeviceObject, Irp, Status);
+       case IRP_MN_READ_CONFIG:
+            DPRINT("IRP_MN_READ_CONFIG\n");
+            Status = PcForwardIrpSynchronous(DeviceObject, Irp);
+            return PcCompleteIrp(DeviceObject, Irp, Status);
     }
 
     DPRINT("unhandled function %u\n", IoStack->MinorFunction);
index 22682f9..14be43f 100644 (file)
@@ -451,9 +451,14 @@ PinWaveCyclicState(
                 // complete with successful state
                 Pin->m_IrpQueue->CancelBuffers();
             }
+            else if (Pin->m_State == KSSTATE_STOP)
+            {
+                Pin->m_IrpQueue->CancelBuffers();
+            }
             // store result
             Irp->IoStatus.Information = sizeof(KSSTATE);
         }
+        return Status;
     }
     else if (Request->Flags & KSPROPERTY_TYPE_GET)
     {
@@ -848,7 +853,6 @@ CPortPinWaveCyclic::DeviceIoControl(
     }
     else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_RESET_STATE)
     {
-        /// FIXME
         Status = KsAcquireResetValue(Irp, &ResetValue);
         DPRINT("Status %x Value %u\n", Status, ResetValue);
         /* check for success */