ReactOS 0.4.16-dev-109-gf4cb10f
FxDmaSystemTransaction Class Reference

#include <fxdmatransaction.hpp>

Inheritance diagram for FxDmaSystemTransaction:
Collaboration diagram for FxDmaSystemTransaction:

Public Member Functions

 FxDmaSystemTransaction (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ExtraSize, __in FxDmaEnabler *DmaEnabler)
 
VOID SetConfigureChannelCallback (__in_opt PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL Callback, __in_opt PVOID Context)
 
VOID SetTransferCompleteCallback (__in_opt PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE Callback, __in_opt PVOID Context)
 
VOID StopTransfer (VOID)
 
- Public Member Functions inherited from FxDmaPacketTransaction
virtual _Must_inspect_result_ NTSTATUS InitializeResources (VOID)
 
_Must_inspect_result_ NTSTATUS ReserveAdapter (__in ULONG NumberOfMapRegisters, __in WDF_DMA_DIRECTION Direction, __in PFN_WDF_RESERVE_DMA Callback, __in_opt PVOID Context)
 
VOID ReleaseAdapter (VOID)
 
virtual _Must_inspect_result_ NTSTATUS StartTransfer (VOID)
 
virtual _Must_inspect_result_ NTSTATUS TransferCompleted (VOID)
 
virtual _Must_inspect_result_ NTSTATUS StageTransfer (VOID)
 
virtual VOID ReleaseResources (__in BOOLEAN ForceRelease)
 
VOID SetDeviceAddressOffset (__in ULONG Offset)
 
- Public Member Functions inherited from FxDmaTransactionBase
 FxDmaTransactionBase (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in USHORT ExtraSize, __in FxDmaEnabler *DmaEnabler)
 
virtual BOOLEAN Dispose (VOID)
 
_Must_inspect_result_ NTSTATUS Initialize (__in PFN_WDF_PROGRAM_DMA ProgramDmaFunction, __in WDF_DMA_DIRECTION DmaDirection, __in PMDL Mdl, __in size_t Offset, __in ULONG Length)
 
virtual _Must_inspect_result_ NTSTATUS InitializeResources (VOID)=0
 
_Must_inspect_result_ NTSTATUS Execute (__in PVOID Context)
 
virtual _Must_inspect_result_ NTSTATUS StartTransfer (VOID)=0
 
virtual _Must_inspect_result_ NTSTATUS StageTransfer (VOID)=0
 
BOOLEAN DmaCompleted (__in size_t TransferredLength, __out NTSTATUS *ReturnStatus, __in FxDmaCompletionType CompletionType)
 
virtual _Must_inspect_result_ NTSTATUS TransferCompleted (VOID)=0
 
VOID ReleaseForReuse (__in BOOLEAN ForceRelease)
 
virtual VOID ReleaseResources (__in BOOLEAN ForceRelease)=0
 
VOID GetTransferInfo (__out_opt ULONG *MapRegisterCount, __out_opt ULONG *ScatterGatherElementCount)
 
__forceinline size_t GetBytesTransferred (VOID)
 
__forceinline FxDmaEnablerGetDmaEnabler (VOID)
 
__forceinline FxRequestGetRequest (VOID)
 
__forceinline BOOLEAN IsRequestReferenced (VOID)
 
__forceinline VOID SetRequest (__in FxRequest *Request)
 
__forceinline VOID ReferenceRequest (VOID)
 
__forceinline VOID ReleaseButRetainRequest (VOID)
 
__forceinline VOID ClearRequest (VOID)
 
__forceinline size_t GetMaximumFragmentLength (VOID)
 
__forceinline VOID SetMaximumFragmentLength (size_t MaximumFragmentLength)
 
__forceinline size_t GetCurrentFragmentLength (VOID)
 
__forceinline WDFDMATRANSACTION GetHandle (VOID)
 
PVOID GetTransferContext (VOID)
 
VOID SetImmediateExecution (__in BOOLEAN Value)
 
BOOLEAN CancelResourceAllocation (VOID)
 
FxDmaTransactionState GetTransactionState (VOID)
 
- Public Member Functions inherited from FxNonPagedObject
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
virtual ~FxNonPagedObject (VOID)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_maxIRQL(DISPATCH_LEVEL) __drv_setsIRQL(DISPATCH_LEVEL) VOID Lock(__out __drv_deref(__drv_savesIRQL) PKIRQL PreviousIrql)
 
 _Releases_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID Unlock(__in __drv_restoresIRQL KIRQL PreviousIrql)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) VOID LockAtDispatch(VOID)
 
 _Requires_lock_held_ (this->m_NPLock.m_Lock) _Releases_lock_(this -> m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID UnlockFromDispatch(VOID)
 
- Public Member Functions inherited from FxObject
PVOID GetCOMWrapper ()
 
void SetCOMWrapper (__drv_aliasesMem PVOID Wrapper)
 
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
virtual ~FxObject (VOID)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType Type)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in USHORT ExtraSize=0)
 
VOID operator delete (__in PVOID Memory)
 
VOID SetNoContextHeader (VOID)
 
PVOID __inline GetObjectHandle (VOID)
 
__inline FxContextHeaderGetContextHeader (VOID)
 
__inline PFX_DRIVER_GLOBALS GetDriverGlobals (VOID)
 
WDFTYPE GetType (VOID)
 
USHORT GetObjectSize (VOID)
 
LONG GetRefCnt (VOID)
 
FxTagTrackerGetTagTracker (VOID)
 
CfxDeviceGetDevice (VOID)
 
CfxDeviceBaseGetDeviceBase (VOID)
 
VOID SetDeviceBase (__in CfxDeviceBase *DeviceBase)
 
__inline VOID CallCleanup (VOID)
 
ULONG __inline AddRef (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG Release (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG AddRefOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG ReleaseOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual _Must_inspect_result_ NTSTATUS QueryInterface (__in FxQueryInterfaceParams *Params)
 
VOID MarkTraceState (VOID)
 
BOOLEAN __inline IsTraceState (VOID)
 
VOID __inline TraceDroppedEvent (__in FxObjectDroppedEvent Event)
 
VOID MarkPassiveDispose (__in FxObjectLockState State=ObjectLock)
 
VOID MarkPassiveCallbacks (__in FxObjectLockState State=ObjectLock)
 
VOID MarkForceDisposeThread (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsPassiveCallbacks (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsPassiveDispose (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsForceDisposeThread (__in BOOLEAN AcquireLock=TRUE)
 
VOID MarkCommitted (VOID)
 
BOOLEAN IsCommitted (VOID)
 
VOID MarkDisposeOverride (__in FxObjectLockState State=ObjectLock)
 
VOID MarkNoDeleteDDI (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsNoDeleteDDI (VOID)
 
_Must_inspect_result_ NTSTATUS Commit (__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
 
VOID DeleteFromFailedCreate (VOID)
 
VOID ClearEvtCallbacks (VOID)
 
BOOLEAN EarlyDispose (VOID)
 
virtual VOID DeleteObject (VOID)
 
virtual BOOLEAN Dispose (VOID)
 
_Must_inspect_result_ NTSTATUS AssignParentObject (__in FxObject *ParentObject)
 
_Must_inspect_result_ NTSTATUS AddContext (__in FxContextHeader *Header, __in PVOID *Context, __in PWDF_OBJECT_ATTRIBUTES Attributes)
 
_Must_inspect_result_ NTSTATUS RemoveParentAssignment (VOID)
 
_Must_inspect_result_ FxObjectGetParentObjectReferenced (__in PVOID Tag)
 
BOOLEAN IsDisposed (VOID)
 

Static Public Member Functions

static _Must_inspect_result_ NTSTATUS _Create (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in FxDmaEnabler *DmaEnabler, __out WDFDMATRANSACTION *Transaction)
 
- Static Public Member Functions inherited from FxDmaPacketTransaction
static _Must_inspect_result_ NTSTATUS _Create (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in FxDmaEnabler *DmaEnabler, __out WDFDMATRANSACTION *Transaction)
 
- Static Public Member Functions inherited from FxDmaTransactionBase
static VOID _ComputeNextTransferAddress (__in PMDL CurrentMdl, __in size_t CurrentOffset, __in ULONG Transferred, __deref_out PMDL *NextMdl, __out size_t *NextOffset)
 
static _Must_inspect_result_ NTSTATUS _CalculateRequiredMapRegisters (__in PMDL Mdl, __in size_t CurrentOffset, __in ULONG Length, __in ULONG AvailableMapRegisters, __out_opt PULONG PossibleTransferLength, __out PULONG MapRegistersRequired)
 
- Static Public Member Functions inherited from FxObject
static FxObject_FromDisposeEntry (__in PSINGLE_LIST_ENTRY Entry)
 
static FxObject_GetObjectFromHandle (__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
 
static PVOID __inline _ToHandle (__in FxObject *Object)
 
static VOID __inline _ReferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static VOID __inline _DereferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static PVOID _GetDebugBase (__in FxObject *Object)
 
static PFX_POOL_HEADER _CleanupPointer (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Object)
 
static _Must_inspect_result_ NTSTATUS _GetEffectiveLock (__in FxObject *Object, __in_opt IFxHasCallbacks *Callbacks, __in BOOLEAN AutomaticLocking, __in BOOLEAN PassiveCallbacks, __out FxCallbackLock **CallbackLock, __out_opt FxObject **CallbackLockObject)
 
static _Must_inspect_result_ NTSTATUS _ObjectQuery (_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
 

Protected Member Functions

IO_ALLOCATION_ACTION GetAdapterControlReturnValue (VOID)
 
VOID FreeMapRegistersAndAdapter (VOID)
 
BOOLEAN CancelMappedTransfer (VOID)
 
VOID Reuse (VOID)
 
VOID CallEvtDmaCompleted (__in DMA_COMPLETION_STATUS Status)
 
virtual BOOLEAN PreMapTransfer (VOID)
 
virtual PDMA_COMPLETION_ROUTINE GetTransferCompletionRoutine (VOID)
 
- Protected Member Functions inherited from FxDmaPacketTransaction
 FxDmaPacketTransaction (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in USHORT ExtraSize, __in FxDmaEnabler *DmaEnabler)
 
virtual VOID Reuse (VOID)
 
void SetMapRegisterBase (__in PVOID Value)
 
void ClearMapRegisterBase (VOID)
 
BOOLEAN IsMapRegisterBaseSet (VOID)
 
PVOID GetMapRegisterBase (VOID)
 
virtual IO_ALLOCATION_ACTION GetAdapterControlReturnValue (VOID)
 
virtual BOOLEAN PreMapTransfer (VOID)
 
 _Acquires_lock_ (this) VOID __drv_raisesIRQL(DISPATCH_LEVEL) LockTransferState(__out __drv_deref(__drv_savesIRQL) KIRQL *OldIrql)
 
 _Requires_lock_held_ (this) _Releases_lock_(this) VOID UnlockTransferState(__in __drv_restoresIRQL KIRQL OldIrql)
 
virtual PDMA_COMPLETION_ROUTINE GetTransferCompletionRoutine (VOID)
 
_Must_inspect_result_ NTSTATUS AcquireDevice (VOID)
 
FORCEINLINE VOID ReleaseDevice (VOID)
 
_Must_inspect_result_ NTSTATUS AllocateAdapterChannel (__in BOOLEAN MapRegistersReserved)
 
FORCEINLINE NTSTATUS MapTransfer (__out_bcount_opt(ScatterGatherListCb) PSCATTER_GATHER_LIST ScatterGatherList, __in ULONG ScatterGatherListCb, __in_opt PDMA_COMPLETION_ROUTINE CompletionRoutine, __in_opt PVOID CompletionContext, __out ULONG *TransferLength)
 
FORCEINLINE NTSTATUS FlushAdapterBuffers (VOID)
 
virtual VOID FreeMapRegistersAndAdapter (VOID)
 
virtual VOID CallEvtDmaCompleted (__in DMA_COMPLETION_STATUS)
 
virtual VOID Reuse (VOID)
 
- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
FxObjectDebugExtensionGetDebugExtension (VOID)
 
BOOLEAN IsDebug (VOID)
 
VOID AllocateTagTracker (__in WDFTYPE Type)
 
virtual VOID SelfDestruct (VOID)
 
PVOID __inline GetObjectHandleUnchecked (VOID)
 
VOID __inline DestroyChildren (VOID)
 
VOID DeleteEarlyDisposedObject (VOID)
 

Protected Attributes

FxDmaTransactionConfigureChannel m_ConfigureChannelFunction
 
PVOID m_ConfigureChannelContext
 
FxDmaTransactionTransferComplete m_TransferCompleteFunction
 
PVOID m_TransferCompleteContext
 
- Protected Attributes inherited from FxDmaPacketTransaction
ULONG m_MapRegistersNeeded
 
PVOID m_MapRegisterBase
 
BOOLEAN m_MapRegisterBaseSet
 
ULONG m_DeviceAddressOffset
 
ULONG m_MapRegistersReserved
 
struct {
   PKTHREAD   CurrentStagingThread
 
   BOOLEAN   RerunStaging
 
   BOOLEAN   RerunCompletion
 
   DMA_COMPLETION_STATUS   CompletionStatus
 
m_TransferState
 
ULONG m_IsCancelled
 
- Protected Attributes inherited from FxDmaTransactionBase
FxDmaTransactionState m_State
 
WDF_DMA_DIRECTION m_DmaDirection
 
FxDmaEnablerm_DmaEnabler
 
FxDmaDescriptionm_AdapterInfo
 
FxRequestm_EncodedRequest
 
FxDmaTransactionProgramOrReserveDma m_DmaAcquiredFunction
 
PVOID m_DmaAcquiredContext
 
PVOID m_TransferContext
 
PMDL m_StartMdl
 
PMDL m_CurrentFragmentMdl
 
size_t m_StartOffset
 
size_t m_CurrentFragmentOffset
 
size_t m_MaxFragmentLength
 
size_t m_TransactionLength
 
size_t m_Remaining
 
size_t m_Transferred
 
size_t m_CurrentFragmentLength
 
ULONG m_Flags
 
- Protected Attributes inherited from FxObject
union {
   CfxDeviceBase *   m_DeviceBase
 
   CfxDevice *   m_Device
 
}; 
 

Static Protected Attributes

static DMA_COMPLETION_ROUTINE _SystemDmaCompletion
 

Private Attributes

friend FxDmaPacketTransaction
 

Additional Inherited Members

- Static Protected Member Functions inherited from FxDmaPacketTransaction
static IO_ALLOCATION_ACTION STDCALL _AdapterControl (__in PDEVICE_OBJECT DeviceObject, __in PIRP Irp, __in PVOID MapRegisterBase, __in PVOID Context)
 
- Static Protected Member Functions inherited from FxDmaTransactionBase
static PVOID GetStartVaFromOffset (__in PMDL Mdl, __in size_t Offset)
 
- Static Protected Member Functions inherited from FxObject
static PVOID _GetBase (__in FxObject *Object)
 

Detailed Description

Definition at line 1410 of file fxdmatransaction.hpp.

Constructor & Destructor Documentation

◆ FxDmaSystemTransaction()

FxDmaSystemTransaction::FxDmaSystemTransaction ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in USHORT  ExtraSize,
__in FxDmaEnabler DmaEnabler 
)

Definition at line 2210 of file fxdmatransaction.cpp.

2214 :
2215 FxDmaPacketTransaction(FxDriverGlobals, sizeof(FxDmaSystemTransaction), ExtraSize, DmaEnabler)
2216{
2217 return;
2218}
_Must_inspect_result_ _In_ WDFDMAENABLER DmaEnabler

Member Function Documentation

◆ _Create()

_Must_inspect_result_ NTSTATUS FxDmaSystemTransaction::_Create ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in PWDF_OBJECT_ATTRIBUTES  Attributes,
__in FxDmaEnabler DmaEnabler,
__out WDFDMATRANSACTION *  Transaction 
)
static

Definition at line 2222 of file fxdmatransaction.cpp.

2228{
2229 FxDmaPacketTransaction* pTransaction;
2230 WDFOBJECT hTransaction;
2232
2233 pTransaction = new (FxDriverGlobals, Attributes, DmaEnabler->GetTransferContextSize())
2234 FxDmaSystemTransaction(FxDriverGlobals, DmaEnabler->GetTransferContextSize(), DmaEnabler);
2235
2236 if (pTransaction == NULL) {
2239 FxDriverGlobals, TRACE_LEVEL_ERROR, TRACINGDMA,
2240 "Could not allocate memory for WDFTRANSACTION, %!STATUS!", status);
2241 return status;
2242 }
2243
2244 //
2245 // Commit and apply the attributes
2246 //
2247 status = pTransaction->Commit(Attributes, &hTransaction, DmaEnabler);
2248 if (NT_SUCCESS(status)) {
2249 *Transaction = (WDFDMATRANSACTION)hTransaction;
2250 }
2251 else {
2252 //
2253 // This will properly clean up the target's state and free it
2254 //
2255 pTransaction->DeleteFromFailedCreate();
2256 }
2257
2258 return status;
2259}
LONG NTSTATUS
Definition: precomp.h:26
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
#define TRACINGDMA
Definition: dbgtrace.h:71
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes

Referenced by switch().

◆ CallEvtDmaCompleted()

VOID FxDmaSystemTransaction::CallEvtDmaCompleted ( __in DMA_COMPLETION_STATUS  Status)
protectedvirtual

Reimplemented from FxDmaPacketTransaction.

Definition at line 2313 of file fxdmatransaction.cpp.

2316{
2317 //
2318 // Call the TransferComplete callback to indicate that the
2319 // transfer was aborted.
2320 //
2322 GetHandle(),
2326 Status
2327 );
2328}
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
FxDmaTransactionTransferComplete m_TransferCompleteFunction
FxDmaEnabler * m_DmaEnabler
WDF_DMA_DIRECTION m_DmaDirection
VOID Invoke(__in WDFDMATRANSACTION Transaction, __in WDFDEVICE Device, __in WDFCONTEXT Context, __in WDF_DMA_DIRECTION Direction, __in DMA_COMPLETION_STATUS Status)
CfxDevice * m_Device
Definition: fxobject.hpp:329
Status
Definition: gdiplustypes.h:25
#define GetHandle(h)
Definition: treelist.c:116

◆ CancelMappedTransfer()

BOOLEAN FxDmaSystemTransaction::CancelMappedTransfer ( VOID  )
inlineprotected

Definition at line 1503 of file fxdmatransaction.hpp.

1506 {
1508
1510
1511 //
1512 // Cancel the transfer. if it's not yet mapped this will mark the
1513 // TC so that mapping will fail. If it's running this will invoke the
1514 // DMA completion routine.
1515 //
1516 status =
1517 m_AdapterInfo->AdapterObject->DmaOperations->CancelMappedTransfer(
1520 );
1521
1523 "Stopping WDFDMATRANSACTION %p returned status %!STATUS!",
1524 GetHandle(),
1525 status);
1526
1527 return NT_SUCCESS(status);
1528 }
BOOLEAN UsesDmaV3(VOID)
FxDmaDescription * m_AdapterInfo
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
return pDmaTrans GetTransferContext()
#define ASSERT(a)
Definition: mode.c:44
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
PDMA_ADAPTER AdapterObject

Referenced by StopTransfer().

◆ FreeMapRegistersAndAdapter()

VOID FxDmaSystemTransaction::FreeMapRegistersAndAdapter ( VOID  )
inlineprotectedvirtual

Reimplemented from FxDmaPacketTransaction.

Definition at line 1480 of file fxdmatransaction.hpp.

1483 {
1485 KIRQL irql;
1486
1488
1491 "Freeing adapter channel for WDFDMATRANSACTION %p",
1492 GetHandle());
1493 }
1494
1496 FreeAdapterChannel(m_AdapterInfo->AdapterObject);
1498
1499 return;
1500 }
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
PFX_DRIVER_GLOBALS pFxDriverGlobals
BOOLEAN FxVerifierOn
Definition: fxglobals.h:420

◆ GetAdapterControlReturnValue()

IO_ALLOCATION_ACTION FxDmaSystemTransaction::GetAdapterControlReturnValue ( VOID  )
inlineprotectedvirtual

Reimplemented from FxDmaPacketTransaction.

Definition at line 1472 of file fxdmatransaction.hpp.

1475 {
1476 return KeepObject;
1477 }
@ KeepObject
Definition: iotypes.h:202

◆ GetTransferCompletionRoutine()

PDMA_COMPLETION_ROUTINE FxDmaSystemTransaction::GetTransferCompletionRoutine ( VOID  )
protectedvirtual

Reimplemented from FxDmaPacketTransaction.

Definition at line 2300 of file fxdmatransaction.cpp.

2303{
2305 return NULL;
2306 }
2307 else {
2308 return _SystemDmaCompletion;
2309 }
2310}
static DMA_COMPLETION_ROUTINE _SystemDmaCompletion
PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE Method

◆ PreMapTransfer()

BOOLEAN FxDmaSystemTransaction::PreMapTransfer ( VOID  )
protectedvirtual

Reimplemented from FxDmaPacketTransaction.

Definition at line 2262 of file fxdmatransaction.cpp.

2265{
2268
2270 //
2271 // Invoke the callback. If it returns false then the driver has
2272 // completed the transaction in the callback and we must abort
2273 // processing.
2274 //
2275
2278 "Invoking ConfigureChannel callback %p (context "
2279 "%p) for WDFDMATRANSACTION %p.",
2282 GetHandle());
2283 }
2284
2286 GetHandle(),
2292 );
2293 }
2294
2295 return result;
2296}
unsigned char BOOLEAN
FxDmaTransactionConfigureChannel m_ConfigureChannelFunction
_Must_inspect_result_ BOOLEAN Invoke(__in WDFDMATRANSACTION DmaTransaction, __in WDFDEVICE Device, __in PVOID Context, __in_opt PMDL Mdl, __in size_t Offset, __in size_t Length)
PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL Method
CfxDeviceBase * m_DeviceBase
Definition: fxobject.hpp:328
#define TRUE
Definition: types.h:120
GLuint64EXT * result
Definition: glext.h:11304

◆ Reuse()

VOID FxDmaSystemTransaction::Reuse ( VOID  )
inlineprotectedvirtual

Reimplemented from FxDmaPacketTransaction.

Definition at line 1531 of file fxdmatransaction.hpp.

◆ SetConfigureChannelCallback()

VOID FxDmaSystemTransaction::SetConfigureChannelCallback ( __in_opt PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL  Callback,
__in_opt PVOID  Context 
)
inline

Definition at line 1433 of file fxdmatransaction.hpp.

1437 {
1440 }
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458

◆ SetTransferCompleteCallback()

VOID FxDmaSystemTransaction::SetTransferCompleteCallback ( __in_opt PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE  Callback,
__in_opt PVOID  Context 
)
inline

Definition at line 1443 of file fxdmatransaction.hpp.

◆ StopTransfer()

VOID FxDmaSystemTransaction::StopTransfer ( VOID  )

Definition at line 2498 of file fxdmatransaction.cpp.

2501{
2502 //
2503 // Mark the transfer cancelled so we have a record of it even if
2504 // a racing call to FlushAdapterBuffers clears the TC.
2505 //
2507
2508 //
2509 // Cancel the system DMA transfer. This arranges for one of two things
2510 // to happen:
2511 // * the next call to MapTransfer will fail
2512 // * the DMA completion routine will run
2513 //
2514 if (CancelMappedTransfer() == FALSE) {
2515
2516 //
2517 // The cancel failed. Someone has already stopped this transfer.
2518 // That's illegal.
2519 //
2521
2523 "WDFDMATRANSACTION %p has already been stopped",
2524 GetHandle());
2525
2528 WDF_DMA_FATAL_ERROR, // type
2529 (ULONG_PTR) GetObjectHandle(), // parm 2
2530 (ULONG_PTR) m_State); // parm 3
2531 }
2532 }
2533}
BOOLEAN CancelMappedTransfer(VOID)
FxDmaTransactionState m_State
#define FALSE
Definition: types.h:117
return pObject GetObjectHandle()
@ OkForDownLevel
Definition: fxglobals.h:80
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
_Must_inspect_result_ BOOLEAN IsVerificationEnabled(__in ULONG Major, __in ULONG Minor, __in FxVerifierDownlevelOption DownLevel)
Definition: fxglobals.h:286
uint32_t ULONG_PTR
Definition: typedefs.h:65
@ WDF_DMA_FATAL_ERROR
Definition: wdfbugcodes.h:65

Member Data Documentation

◆ _SystemDmaCompletion

VOID FxDmaSystemTransaction::_SystemDmaCompletion
staticprotected

Definition at line 1560 of file fxdmatransaction.hpp.

Referenced by GetTransferCompletionRoutine().

◆ FxDmaPacketTransaction

friend FxDmaSystemTransaction::FxDmaPacketTransaction
private

Definition at line 1412 of file fxdmatransaction.hpp.

◆ m_ConfigureChannelContext

PVOID FxDmaSystemTransaction::m_ConfigureChannelContext
protected

Definition at line 1463 of file fxdmatransaction.hpp.

Referenced by PreMapTransfer(), Reuse(), and SetConfigureChannelCallback().

◆ m_ConfigureChannelFunction

FxDmaTransactionConfigureChannel FxDmaSystemTransaction::m_ConfigureChannelFunction
protected

Definition at line 1462 of file fxdmatransaction.hpp.

Referenced by PreMapTransfer(), Reuse(), and SetConfigureChannelCallback().

◆ m_TransferCompleteContext

PVOID FxDmaSystemTransaction::m_TransferCompleteContext
protected

◆ m_TransferCompleteFunction


The documentation for this class was generated from the following files: