mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 11:25:13 +00:00
[0.4.15][KS] Restore old hack for MS portcls
Hackfix for CORE-17237. Restores an old hack required by MS portcls driver. Replaces the current hack from 22d1e7a4e4
with an old one that was removed in 563682ad9a5751a7d5c3f9ffb4ac4f67bf0adc71
This allows ReactOS to boot and play sound properly with the portcls.sys driver from Windows XP/2003.
Co-Authored-By: Oleg Dubinskiy <oleg.dubinskiy@reactos.org>
This commit is contained in:
parent
1acaa988bc
commit
85d6175995
1 changed files with 6 additions and 12 deletions
|
@ -940,6 +940,9 @@ ProbeMdl:
|
|||
goto ProbeMdl;
|
||||
}
|
||||
|
||||
// HACK for MS portcls
|
||||
HeaderSize = Length;
|
||||
|
||||
/* probe user mode buffers */
|
||||
if (Length && ( (!HeaderSize) || (Length % HeaderSize == 0) || ((ProbeFlags & KSPROBE_ALLOWFORMATCHANGE) && (Length == sizeof(KSSTREAM_HEADER))) ) )
|
||||
{
|
||||
|
@ -1683,18 +1686,6 @@ KsAddIrpToCancelableQueue(
|
|||
|
||||
DPRINT("KsAddIrpToCancelableQueue QueueHead %p SpinLock %p Irp %p ListLocation %x DriverCancel %p\n", QueueHead, SpinLock, Irp, ListLocation, DriverCancel);
|
||||
|
||||
// HACK for ms portcls
|
||||
if (IoStack->MajorFunction == IRP_MJ_CREATE)
|
||||
{
|
||||
// complete the request
|
||||
DPRINT1("MS HACK\n");
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
CompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!DriverCancel)
|
||||
{
|
||||
/* default to KsCancelRoutine */
|
||||
|
@ -2053,6 +2044,9 @@ KsSetMajorFunctionHandler(
|
|||
{
|
||||
DPRINT("KsSetMajorFunctionHandler Function %x\n", MajorFunction);
|
||||
|
||||
// HACK for MS portcls
|
||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = KspCreate;
|
||||
|
||||
switch ( MajorFunction )
|
||||
{
|
||||
case IRP_MJ_CREATE:
|
||||
|
|
Loading…
Reference in a new issue