22 return Irp->MdlAddress;
24 return Irp->AssociatedIrp.SystemBuffer;
40 PVOID ObjectsArray[2];
51 INFO_(SERIAL,
"UseIntervalTimeout = %s, IntervalTimeout = %lu\n",
54 INFO_(SERIAL,
"UseTotalTimeout = %s\n",
76 INFO_(SERIAL,
"Reading byte from buffer: 0x%02x\n", ReceivedByte);
86 INFO_(SERIAL,
"All bytes read\n");
93 INFO_(SERIAL,
"Buffer empty. Don't wait more bytes\n");
110 TRACE_(SERIAL,
"Timeout when reading bytes. Status = 0x%08lx\n",
Status);
134 TRACE_(SERIAL,
"SerialReadWorkItem() called\n");
160 TRACE_(SERIAL,
"IRP_MJ_READ\n");
225 TotalTimeout * 10000;
240 INFO_(SERIAL,
"Insufficient resources\n");
271 TRACE_(SERIAL,
"IRP_MJ_WRITE\n");
307 WARN_(SERIAL,
"Buffer overrun on COM%lu\n", DeviceExtension->
ComPort);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
NTSTATUS PushCircularBufferEntry(IN PCIRCULAR_BUFFER pBuffer, IN UCHAR Entry)
BOOLEAN IsCircularBufferEmpty(IN PCIRCULAR_BUFFER pBuffer)
NTSTATUS PopCircularBufferEntry(IN PCIRCULAR_BUFFER pBuffer, OUT PUCHAR Entry)
#define NT_SUCCESS(StatCode)
VOID NTAPI SerialSendByte(IN PKDPC Dpc, IN PVOID pDeviceExtension, IN PVOID Unused1, IN PVOID Unused2)
static VOID ReadBytes(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, PWORKITEM_DATA WorkItemData)
static PVOID SerialGetUserBuffer(IN PIRP Irp)
static IO_WORKITEM_ROUTINE SerialReadWorkItem
struct _SERIAL_DEVICE_EXTENSION * PSERIAL_DEVICE_EXTENSION
struct _WORKITEM_DATA * PWORKITEM_DATA
DRIVER_DISPATCH SerialRead
DRIVER_DISPATCH SerialWrite
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
#define KeQuerySystemTime(t)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
#define ExFreePoolWithTag(_P, _T)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IoCompleteRequest
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
#define STATUS_BUFFER_TOO_SMALL
struct _IO_STACK_LOCATION::@3979::@3983 Read
union _IO_STACK_LOCATION::@1580 Parameters
ULONG BufferOverrunErrorCount
KSPIN_LOCK OutputBufferLock
KSPIN_LOCK InputBufferLock
IO_REMOVE_LOCK RemoveLock
KEVENT InputBufferNotEmpty
CIRCULAR_BUFFER InputBuffer
CIRCULAR_BUFFER OutputBuffer
SERIALPERF_STATS SerialPerfStats
SERIAL_TIMEOUTS SerialTimeOuts
ULONG ReadTotalTimeoutConstant
ULONG ReadTotalTimeoutMultiplier
ULONG ReadIntervalTimeout
LARGE_INTEGER TotalTimeoutTime
LARGE_INTEGER IntervalTimeout
BOOLEAN ReadAtLeastOneByte
BOOLEAN UseIntervalTimeout
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
#define IoAcquireRemoveLock(RemoveLock, Tag)
#define IoReleaseRemoveLock(_RemoveLock, _Tag)