Author: cgutman
Date: Fri Nov 7 21:13:30 2008
New Revision: 37249
URL:
http://svn.reactos.org/svn/reactos?rev=37249&view=rev
Log:
- Don't hardcode the access mode
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/lock.c
branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/lock.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] Fri Nov 7
21:13:30 2008
@@ -25,7 +25,7 @@
NULL );
if( Irp->MdlAddress ) {
_SEH_TRY {
- MmProbeAndLockPages( Irp->MdlAddress, KernelMode, IoModifyAccess );
+ MmProbeAndLockPages( Irp->MdlAddress, Irp->RequestorMode, IoModifyAccess );
} _SEH_HANDLE {
LockFailed = TRUE;
} _SEH_END;
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/tdi.c [iso-8859-1] Fri Nov 7
21:13:30 2008
@@ -853,7 +853,7 @@
BufferLength, /* Length of buffer */
FALSE, /* Not secondary */
FALSE, /* Don't charge quota */
- *Irp); /* use IRP */
+ *Irp); /* Use IRP */
if (!Mdl) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
IoFreeIrp(*Irp);
@@ -862,7 +862,7 @@
}
_SEH_TRY {
- MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
+ MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
IoFreeMdl(Mdl);
@@ -934,7 +934,7 @@
BufferLength, /* Length of buffer */
FALSE, /* Not secondary */
FALSE, /* Don't charge quota */
- *Irp); /* Don't use IRP */
+ *Irp); /* Use IRP */
if (!Mdl) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
IoFreeIrp(*Irp);
@@ -944,7 +944,7 @@
_SEH_TRY {
AFD_DbgPrint(MIN_TRACE, ("probe and lock\n"));
- MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
+ MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
AFD_DbgPrint(MIN_TRACE, ("probe and lock done\n"));
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
@@ -1034,7 +1034,7 @@
BufferLength, /* Length of buffer */
FALSE, /* Not secondary */
FALSE, /* Don't charge quota */
- *Irp); /* Don't use IRP */
+ *Irp); /* Use IRP */
if (!Mdl) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
IoFreeIrp(*Irp);
@@ -1043,7 +1043,7 @@
}
_SEH_TRY {
- MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
+ MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
IoFreeMdl(Mdl);
@@ -1132,7 +1132,7 @@
BufferLength, /* Length of buffer */
FALSE, /* Not secondary */
FALSE, /* Don't charge quota */
- *Irp); /* Don't use IRP */
+ *Irp); /* Use IRP */
if (!Mdl) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -1142,7 +1142,7 @@
}
_SEH_TRY {
- MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
+ MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
} _SEH_HANDLE {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
IoFreeMdl(Mdl);