Author: janderwald
Date: Fri Mar 13 17:07:03 2009
New Revision: 40001
URL:
http://svn.reactos.org/svn/reactos?rev=40001&view=rev
Log:
- Remove hack in IDmaChannel::PhysicalAddress as it will hide the bug and not prevent
es1370mp from crashing
- Fix a horrible where the Mdl was not created for the common buffer
- Might fix other audio related crashes
- Forward IRP_MN_QUERY_INTERFACE to next lower device object
- Fix & enable PcForwardIrpSynchronous implementation
- Add debug print to IServiceGroup when a unknown IID is requested
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] Fri Mar 13
17:07:03 2009
@@ -125,7 +125,7 @@
This->BufferSize = BufferSize;
This->AllocatedBufferSize = BufferSize;
- DPRINT1("IDmaChannelSlave_fnAllocateBuffer Success Buffer %u Address %x
%p\n", BufferSize, This->Address, PhysicalAddressConstraint);
+ DPRINT1("IDmaChannelSlave_fnAllocateBuffer Success Buffer %p BufferSize %u
Address %x\n", This->Buffer, BufferSize, This->Address);
return STATUS_SUCCESS;
}
@@ -227,17 +227,11 @@
IN IDmaChannelSlave * iface)
{
PHYSICAL_ADDRESS Address;
+
IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface;
DPRINT("IDmaChannelSlave_PhysicalAdress: This %p Virtuell %p Physical High %x
Low %x%\n", This, This->Buffer, This->Address.HighPart,
This->Address.LowPart);
-#if 1
-
- /// HACK
- /// Prevent ES1371 driver from crashing by returning the vaddr instead of physical
address
- Address.QuadPart = (ULONG_PTR)This->Buffer;
-#else
- Address.QuadPart = This->Address.QuadPart;
-#endif
+ Address = This->Address;
return Address;
}
@@ -351,7 +345,7 @@
if (!This->Mdl)
{
- This->Mdl = IoAllocateMdl(&This->Buffer, This->MaximumBufferSize,
FALSE, FALSE, NULL);
+ This->Mdl = IoAllocateMdl(This->Buffer, This->MaximumBufferSize, FALSE,
FALSE, NULL);
if (!This->Mdl)
{
return STATUS_INSUFFICIENT_RESOURCES;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] Fri Mar 13 17:07:03
2009
@@ -135,12 +135,8 @@
return STATUS_SUCCESS;
case IRP_MN_QUERY_INTERFACE:
- DPRINT1("FIXME: IRP_MN_QUERY_INTERFACE: call next lower device
object\n");
- /* FIXME
- * call next lower device object */
- Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return STATUS_UNSUCCESSFUL;
+ DPRINT("IRP_MN_QUERY_INTERFACE\n");
+ return PcForwardIrpSynchronous(DeviceObject, Irp);
case IRP_MN_QUERY_DEVICE_RELATIONS:
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
@@ -264,6 +260,21 @@
return STATUS_UNSUCCESSFUL;
}
+NTSTATUS
+NTAPI
+CompletionRoutine(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp,
+ IN PVOID Context)
+{
+ if (Irp->PendingReturned == TRUE)
+ {
+ KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE);
+ }
+ return STATUS_MORE_PROCESSING_REQUIRED;
+}
+
+
/*
* @implemented
*/
@@ -279,14 +290,15 @@
DPRINT1("PcForwardIrpSynchronous\n");
DeviceExt = (PPCLASS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
-return STATUS_SUCCESS;
+
/* initialize the notification event */
KeInitializeEvent(&Event, NotificationEvent, FALSE);
- /* copy the current stack location */
IoCopyCurrentIrpStackLocationToNext(Irp);
DPRINT1("PcForwardIrpSynchronous %p Irp %p\n",
DeviceExt->PrevDeviceObject, Irp);
+
+ IoSetCompletionRoutine(Irp, CompletionRoutine, (PVOID)&Event, TRUE, TRUE, TRUE);
/* now call the driver */
Status = IoCallDriver(DeviceExt->PrevDeviceObject, Irp);
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c [iso-8859-1] Fri Mar
13 17:07:03 2009
@@ -35,6 +35,7 @@
IN REFIID refiid,
OUT PVOID* Output)
{
+ WCHAR Buffer[100];
IServiceGroupImpl * This = (IServiceGroupImpl*)iface;
if (IsEqualGUIDAligned(refiid, &IID_IServiceGroup) ||
IsEqualGUIDAligned(refiid, &IID_IServiceSink) ||
@@ -44,6 +45,10 @@
InterlockedIncrement(&This->ref);
return STATUS_SUCCESS;
}
+
+ StringFromCLSID(refiid, Buffer);
+ DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n",
Buffer);
+
return STATUS_UNSUCCESSFUL;
}