mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:35:43 +00:00
- 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 svn path=/trunk/; revision=40001
This commit is contained in:
parent
d45772c95a
commit
360606f98b
3 changed files with 29 additions and 18 deletions
|
@ -125,7 +125,7 @@ IDmaChannelSlave_fnAllocateBuffer(
|
||||||
|
|
||||||
This->BufferSize = BufferSize;
|
This->BufferSize = BufferSize;
|
||||||
This->AllocatedBufferSize = 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;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -227,17 +227,11 @@ IDmaChannelSlave_fnPhysicalAdress(
|
||||||
IN IDmaChannelSlave * iface)
|
IN IDmaChannelSlave * iface)
|
||||||
{
|
{
|
||||||
PHYSICAL_ADDRESS Address;
|
PHYSICAL_ADDRESS Address;
|
||||||
|
|
||||||
IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface;
|
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);
|
DPRINT("IDmaChannelSlave_PhysicalAdress: This %p Virtuell %p Physical High %x Low %x%\n", This, This->Buffer, This->Address.HighPart, This->Address.LowPart);
|
||||||
|
|
||||||
#if 1
|
Address = This->Address;
|
||||||
|
|
||||||
/// 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
|
|
||||||
return Address;
|
return Address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +345,7 @@ IDmaChannelSlave_fnStart(
|
||||||
|
|
||||||
if (!This->Mdl)
|
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)
|
if (!This->Mdl)
|
||||||
{
|
{
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
|
@ -135,12 +135,8 @@ PortClsPnp(
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
||||||
case IRP_MN_QUERY_INTERFACE:
|
case IRP_MN_QUERY_INTERFACE:
|
||||||
DPRINT1("FIXME: IRP_MN_QUERY_INTERFACE: call next lower device object\n");
|
DPRINT("IRP_MN_QUERY_INTERFACE\n");
|
||||||
/* FIXME
|
return PcForwardIrpSynchronous(DeviceObject, Irp);
|
||||||
* call next lower device object */
|
|
||||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
|
||||||
|
|
||||||
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
case IRP_MN_QUERY_DEVICE_RELATIONS:
|
||||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||||
|
@ -264,6 +260,21 @@ PcCompleteIrp(
|
||||||
return STATUS_UNSUCCESSFUL;
|
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
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -279,15 +290,16 @@ PcForwardIrpSynchronous(
|
||||||
DPRINT1("PcForwardIrpSynchronous\n");
|
DPRINT1("PcForwardIrpSynchronous\n");
|
||||||
|
|
||||||
DeviceExt = (PPCLASS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
DeviceExt = (PPCLASS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
return STATUS_SUCCESS;
|
|
||||||
/* initialize the notification event */
|
/* initialize the notification event */
|
||||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||||
|
|
||||||
/* copy the current stack location */
|
|
||||||
IoCopyCurrentIrpStackLocationToNext(Irp);
|
IoCopyCurrentIrpStackLocationToNext(Irp);
|
||||||
|
|
||||||
DPRINT1("PcForwardIrpSynchronous %p Irp %p\n", DeviceExt->PrevDeviceObject, Irp);
|
DPRINT1("PcForwardIrpSynchronous %p Irp %p\n", DeviceExt->PrevDeviceObject, Irp);
|
||||||
|
|
||||||
|
IoSetCompletionRoutine(Irp, CompletionRoutine, (PVOID)&Event, TRUE, TRUE, TRUE);
|
||||||
|
|
||||||
/* now call the driver */
|
/* now call the driver */
|
||||||
Status = IoCallDriver(DeviceExt->PrevDeviceObject, Irp);
|
Status = IoCallDriver(DeviceExt->PrevDeviceObject, Irp);
|
||||||
/* did the request complete yet */
|
/* did the request complete yet */
|
||||||
|
|
|
@ -35,6 +35,7 @@ IServiceGroup_fnQueryInterface(
|
||||||
IN REFIID refiid,
|
IN REFIID refiid,
|
||||||
OUT PVOID* Output)
|
OUT PVOID* Output)
|
||||||
{
|
{
|
||||||
|
WCHAR Buffer[100];
|
||||||
IServiceGroupImpl * This = (IServiceGroupImpl*)iface;
|
IServiceGroupImpl * This = (IServiceGroupImpl*)iface;
|
||||||
if (IsEqualGUIDAligned(refiid, &IID_IServiceGroup) ||
|
if (IsEqualGUIDAligned(refiid, &IID_IServiceGroup) ||
|
||||||
IsEqualGUIDAligned(refiid, &IID_IServiceSink) ||
|
IsEqualGUIDAligned(refiid, &IID_IServiceSink) ||
|
||||||
|
@ -44,6 +45,10 @@ IServiceGroup_fnQueryInterface(
|
||||||
InterlockedIncrement(&This->ref);
|
InterlockedIncrement(&This->ref);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringFromCLSID(refiid, Buffer);
|
||||||
|
DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", Buffer);
|
||||||
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue