ReactOS 0.4.16-dev-297-gc569aee
fxusbpipe.hpp
Go to the documentation of this file.
1//
2// Copyright (C) Microsoft. All rights reserved.
3//
4#ifndef _FXUSBPIPE_H_
5#define _FXUSBPIPE_H_
6
8#include "fxusbinterface.hpp"
9
10//
11// Technically, EHCI can support 4MB, but the usb driver stack doesn't
12// allocate enough TDs for such a transfer, here I arbitrarily chose 2MB
13//
18};
19
22 __in FX_URB_TYPE UrbType
23 );
24
26 VOID
27 );
28
32 __in USBD_HANDLE USBDHandle
33 );
34
35 virtual
36 VOID
37 Dispose(
38 VOID
39 );
40
41 virtual
42 VOID
45 );
46
47 virtual
48 VOID
51 );
52
53 virtual
54 VOID
57 );
58
59 VOID
62 __in ULONG TransferFlags
63 );
64
67 VOID
68 );
69
70 ULONG
72 VOID
73 )
74 {
75#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
77#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
78 return m_UmUrb.UmUrbBulkOrInterruptTransfer.TransferBufferLength;
79#endif
80 }
81
82private:
83 USBD_HANDLE m_USBDHandle;
84
85public:
87
88 //
89 // m_Urb will either point to m_UrbLegacy or one allocated by USBD_UrbAllocate
90 //
92
94
96};
97
100 VOID
101 );
102
105 VOID
106 );
107
108 virtual
109 VOID
112 );
113
114 virtual
115 VOID
118 );
119
121};
122
125 __in FX_URB_TYPE FxUrbType
126 );
127
129 VOID
130 );
131
135 __in USBD_HANDLE USBDHandle
136 );
137
138 virtual
139 VOID
140 Dispose(
141 VOID
142 );
143
144 VOID
145 SetInfo(
149 );
150
151#if (FX_CORE_MODE == FX_CORE_USER_MODE)
152 VOID
153 SetInfo(
155 __in WINUSB_INTERFACE_HANDLE WinUsbHandle,
156 __in UCHAR PipeId,
158 );
159#endif
160
163 VOID
164 );
165
166private:
167 USBD_HANDLE m_USBDHandle;
168
169public:
171
172 //
173 // m_Urb will either point to m_UrbLegacy or one allocated by USBD_UrbAllocate
174 //
176
177};
178
180 //
181 // Request used to send IRPs
182 //
184
185 //
186 // IRP out of Request. Store it off so we don't have to call
187 // Request->GetSubmitIrp() everytime.
188 //
190
191 //
192 // The containing parent
193 //
195
196#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
197 //
198 // DPC to queue ourselves to when a read completes so that we don't spin in
199 // the same thread repeatedly.
200 //
202#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
203 //
204 // Workitem to queue ourselves to when a read completes so that we don't recurse in
205 // the same thread repeatedly.
206 //
207 MxWorkItem m_ReadWorkItem;
208
209 //
210 // Check if the CR got called on a recursive call
211 //
212 LONG ThreadOwnerId;
213#endif
214
215 //
216 // Event that is set when the reader has completed and is not
217 //
219};
220
221#define NUM_PENDING_READS_DEFAULT (2)
222#define NUM_PENDING_READS_MAX (10)
223
224//
225// Work-item callback flags
226//
227#define FX_USB_WORKITEM_IN_PROGRESS (0x00000001)
228#define FX_USB_WORKITEM_RERUN (0x00000002)
229
230//
231// In theory this can be a base class independent of bus type, but this is
232// easier for now and there is no need on another bus type yet.
233//
235public:
238 __in UCHAR NumReaders
239 );
240
242
245 Config(
247 __in size_t TotalBufferLength
248 );
249
250 PVOID
251 operator new(
252 __in size_t Size,
253 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
254 __range(1, NUM_PENDING_READS_MAX) ULONG NumReaders
255 );
256
261 );
262
263 VOID
265 VOID
266 );
267
268 ULONG
270 __in FxUsbPipeRepeatReader* Repeater,
272 );
273
274protected:
275 VOID
278 )
279 {
280 FxRequestContext* pContext;
281
282 pContext = Request->GetContext();
283 if (pContext != NULL && pContext->m_RequestMemory != NULL) {
284 pContext->m_RequestMemory->Delete();
285 //
286 // NOTE: Don't NULL out the m_RequestMemory member as this will
287 // prevent Reuse from releasing a reference on the m_RequestMemory object
288 // and hence these memory objects will not be freed.
289 //
290 }
291 }
292
293 BOOLEAN
296 );
297
298 __inline
299 VOID
301 __in FxUsbPipeRepeatReader* FailedRepeater
302 );
303
304 static
307
308 static
311
312
313 static
314 EVT_WDF_REQUEST_COMPLETION_ROUTINE
316
317 static
318 EVT_SYSTEMWORKITEM
320
321public:
322 //
323 // Completion routine for the client
324 //
326
327 //
328 // Context for completion routine
329 //
331
332 //
333 // Callback to invoke when a reader fails
334 //
336
337 //
338 // The owning pipe
339 //
341
342 //
343 // Lookaside list from which we will allocate buffers for each new read
344 //
346
347 //
348 // The devobj we are sending requests to
349 //
351
352 //
353 // Offsets and length into the memory buffers created by the lookaside list
354 //
356
357 //
358 // Work item to queue when we hit various errors
359 //
361
362 //
363 // Work item re-run context.
364 //
366
367 //
368 // This is a pointer to the work-item's thread object. This value is
369 // used for not deadlocking when misbehaved drivers (< v1.9) call
370 // WdfIoTargetStop from EvtUsbTargetPipeReadersFailed callback.
371 //
373
374 //
375 // Work item flags (see FX_USB_WORKITEM_Xxx defines).
376 //
378
379 //
380 // Number of readers who have failed due to internal allocation errors
381 //
383
384 //
385 // Number of readers
386 //
388
389 //
390 // Value to use with InterlockedXxx to test to see if a work item has been
391 // queued or not
392 //
394
395 //
396 // Track whether the readers should be submitted when moving into the start
397 // state. We cannot just track a start -> start transition and not send
398 // the readers on that particular state transition because the first time
399 // we need to send the readers, the target is already in the started state
400 //
402
403 //
404 // Open ended array of readers. MUST be the last element in this structure.
405 //
407};
408
409class FxUsbPipe : public FxIoTarget {
410public:
414
415 FxUsbPipe(
416 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
418 );
419
420 VOID
421 InitPipe(
425 );
426
427#if (FX_CORE_MODE == FX_CORE_USER_MODE)
428 VOID
429 InitPipe(
430 __in PWINUSB_PIPE_INFORMATION PipeInfo,
433 );
434#endif
435
437 virtual
440 __in PLIST_ENTRY RequestListHead,
442 );
443
444 virtual
445 VOID
448 __in PSINGLE_LIST_ENTRY SentRequestListHead,
450 __in BOOLEAN LockSelf
451 );
452
453 VOID
456 __in PLIST_ENTRY PendedRequestListHead,
457 __in PSINGLE_LIST_ENTRY SentRequestListHead,
459 __in BOOLEAN LockSelf
460 );
461
462 virtual
463 VOID
465 __in WDF_IO_TARGET_STATE NewState,
466 __in PLIST_ENTRY PendedRequestListHead,
467 __in PSINGLE_LIST_ENTRY SentRequestListHead,
470 );
471
472 virtual
473 VOID
475 VOID
476 );
477
478 __inline
479 VOID
481 VOID
482 )
483 {
485 }
486
487 VOID
490 );
491
492 BOOLEAN
493 IsType(
495 );
496
497
499 GetType(
500 VOID
501 );
502
503 WDFUSBPIPE
505 VOID
506 )
507 {
508 return (WDFUSBPIPE) GetObjectHandle();
509 }
510
511 __inline
512 BOOLEAN
514 VOID
515 )
516 {
517 //
518 // USB_ENDPOINT_DIRECTION_IN just does a bitwise compre so it could
519 // return 0 or some non zero value. Make sure the non zero value is
520 // TRUE
521 //
522#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
524#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
526#endif
527 }
528
529 __inline
530 BOOLEAN
532 VOID
533 )
534 {
535 //
536 // USB_ENDPOINT_DIRECTION_OUT just does a bitwise compre so it could
537 // return 0 or some non zero value. Make sure the non zero value is
538 // TRUE
539 //
540#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
542#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
544#endif
545 }
546
551 __in size_t TotalBufferLength
552 );
553
554 ULONG
556 VOID
557 )
558 {
559#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
561#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
562 return m_PipeInformationUm.MaximumPacketSize;
563#endif
564 }
565
569 __in size_t Length
570 )
571 {
572 //
573 // Assumes this is not a control pipe
574 //
575 if (m_CheckPacketSize &&
576#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
578#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
579 (Length % m_PipeInformationUm.MaximumPacketSize) != 0) {
580#endif
582 }
583 else {
584 return STATUS_SUCCESS;
585 }
586 }
587
593 __in ULONG TransferFlags = 0
594 );
595
600 );
601
606 );
607
608 static
612 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
613 __in WDFUSBPIPE Pipe,
614 __in WDFREQUEST Request,
615 __in_opt WDFMEMORY TransferMemory,
616 __in_opt PWDFMEMORY_OFFSET TransferOffsets,
618 );
619
620 static
624 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
625 __in WDFUSBPIPE Pipe,
626 __in_opt WDFREQUEST Request,
631 );
632
635 VOID
636 )
637 {
639 }
640
641 static
644 __in USBD_PIPE_TYPE UsbdPipeType
645 )
646 {
647 const static WDF_USB_PIPE_TYPE types[] = {
648 WdfUsbPipeTypeControl, // UsbdPipeTypeControl
649 WdfUsbPipeTypeIsochronous, // UsbdPipeTypeIsochronous
650 WdfUsbPipeTypeBulk, // UsbdPipeTypeBulk
651 WdfUsbPipeTypeInterrupt, // UsbdPipeTypeInterrupt
652 };
653
654 if (UsbdPipeType < sizeof(types)/sizeof(types[0])) {
655 return types[UsbdPipeType];
656 }
657 else {
659 }
660 }
661
663 Reset(
664 VOID
665 );
666
667 USBD_HANDLE
669 VOID
670 )
671 {
672 return m_USBDHandle;
673 }
674
677 VOID
678 )
679 {
680 return m_UrbType;
681 }
682
683public:
684 //
685 // Link for FxUsbDevice to use to hold a list of Pipes
686 //
688
689protected:
690 ~FxUsbPipe();
691
692 virtual
693 BOOLEAN
694 Dispose(
695 VOID
696 );
697
699
701
702 //
703 // If the pipe does not have a continuous reader, this field is NULL.
704 // It is also cleared within the pipe's Dispose function after deleting
705 // the continuous reader to prevent misbehaved drivers from
706 // crashing the system when they call WdfIoTargetStop from their usb pipe's
707 // destroy callback.
708 //
710
711 //
712 // Information about this pipe
713 //
715
716#if (FX_CORE_MODE == FX_CORE_USER_MODE)
717
718
719
720 WINUSB_PIPE_INFORMATION m_PipeInformationUm;
721#endif
722
723 //
724 // Interface associated with this pipe
725 //
727
728 //
729 // Indicates if we should check that the buffer being trasnfered is of a
730 // multiple of max packet size.
731 //
733
734 //
735 // The USBD_HANDLE exchanged by FxUsbDevice
736 //
737 USBD_HANDLE m_USBDHandle;
738
739 //
740 // If the client driver submits an URB to do a USB transfer, this field indicates
741 // the type of that Urb
742 //
744
745};
746
747#endif // _FXUSBPIPE_H_
unsigned char BOOLEAN
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1156
Definition: bufpool.h:45
FxUsbDevice * m_UsbDevice
Definition: fxusbpipe.hpp:698
VOID GotoPurgeState(__in WDF_IO_TARGET_PURGE_IO_ACTION Action, __in PLIST_ENTRY PendedRequestListHead, __in PSINGLE_LIST_ENTRY SentRequestListHead, __out PBOOLEAN Wait, __in BOOLEAN LockSelf)
Definition: fxusbpipe.cpp:1294
FX_URB_TYPE GetUrbType(VOID)
Definition: fxusbpipe.hpp:676
BOOLEAN IsType(__in WDF_USB_PIPE_TYPE Type)
__inline BOOLEAN IsInEndpoint(VOID)
Definition: fxusbpipe.hpp:513
USBD_HANDLE GetUSBDHandle(VOID)
Definition: fxusbpipe.hpp:668
static WDF_USB_PIPE_TYPE _UsbdPipeTypeToWdf(__in USBD_PIPE_TYPE UsbdPipeType)
Definition: fxusbpipe.hpp:643
__inline BOOLEAN IsOutEndpoint(VOID)
Definition: fxusbpipe.hpp:531
virtual VOID GotoStopState(__in WDF_IO_TARGET_SENT_IO_ACTION Action, __in PSINGLE_LIST_ENTRY SentRequestListHead, __out PBOOLEAN Wait, __in BOOLEAN LockSelf)
Definition: fxusbpipe.cpp:1217
BOOLEAN m_CheckPacketSize
Definition: fxusbpipe.hpp:732
_Must_inspect_result_ NTSTATUS FormatTransferRequest(__in FxRequestBase *Request, __in FxRequestBuffer *Buffer, __in ULONG TransferFlags=0)
virtual VOID GotoRemoveState(__in WDF_IO_TARGET_STATE NewState, __in PLIST_ENTRY PendedRequestListHead, __in PSINGLE_LIST_ENTRY SentRequestListHead, __in BOOLEAN Lock, __out PBOOLEAN Wait)
Definition: fxusbpipe.cpp:1367
_Must_inspect_result_ NTSTATUS FormatResetRequest(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:1783
USBD_PIPE_INFORMATION m_PipeInformation
Definition: fxusbpipe.hpp:714
FxUsbPipeContinuousReader * m_Reader
Definition: fxusbpipe.hpp:709
_Must_inspect_result_ NTSTATUS FormatAbortRequest(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:1710
FX_URB_TYPE m_UrbType
Definition: fxusbpipe.hpp:743
VOID InitPipe(__in PUSBD_PIPE_INFORMATION PipeInfo, __in UCHAR InterfaceNumber, __in FxUsbInterface *UsbInterface)
Definition: fxusbpipe.cpp:1073
friend FxUsbPipeContinuousReader
Definition: fxusbpipe.hpp:413
UCHAR m_InterfaceNumber
Definition: fxusbpipe.hpp:726
FxUsbInterface * m_UsbInterface
Definition: fxusbpipe.hpp:700
_Must_inspect_result_ NTSTATUS ValidateTransferLength(__in size_t Length)
Definition: fxusbpipe.hpp:568
WINUSB_PIPE_INFORMATION m_PipeInformationUm
Definition: fxusbpipe.hpp:720
virtual VOID WaitForSentIoToComplete(VOID)
Definition: fxusbpipe.cpp:1419
WDFUSBPIPE GetHandle(VOID)
Definition: fxusbpipe.hpp:504
friend FxUsbDevice
Definition: fxusbpipe.hpp:411
static _Must_inspect_result_ NTSTATUS _SendTransfer(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFUSBPIPE Pipe, __in_opt WDFREQUEST Request, __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions, __in_opt PWDF_MEMORY_DESCRIPTOR MemoryDescriptor, __out_opt PULONG BytesTransferred, __in ULONG Flags)
Definition: fxusbpipe.cpp:1625
virtual BOOLEAN Dispose(VOID)
Definition: fxusbpipe.cpp:1102
static _Must_inspect_result_ NTSTATUS _FormatTransfer(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFUSBPIPE Pipe, __in WDFREQUEST Request, __in_opt WDFMEMORY TransferMemory, __in_opt PWDFMEMORY_OFFSET TransferOffsets, __in ULONG Flags)
Definition: fxusbpipe.cpp:1536
NTSTATUS Reset(VOID)
Definition: fxusbpipe.cpp:1858
ULONG GetMaxPacketSize(VOID)
Definition: fxusbpipe.hpp:555
USBD_HANDLE m_USBDHandle
Definition: fxusbpipe.hpp:737
__inline VOID SetNoCheckPacketSize(VOID)
Definition: fxusbpipe.hpp:480
USBD_PIPE_HANDLE WdmGetPipeHandle(VOID)
Definition: fxusbpipe.hpp:634
friend FxUsbInterface
Definition: fxusbpipe.hpp:412
LIST_ENTRY m_ListEntry
Definition: fxusbpipe.hpp:687
_Must_inspect_result_ NTSTATUS InitContinuousReader(__in PWDF_USB_CONTINUOUS_READER_CONFIG Config, __in size_t TotalBufferLength)
Definition: fxusbpipe.cpp:1463
virtual _Must_inspect_result_ NTSTATUS GotoStartState(__in PLIST_ENTRY RequestListHead, __in BOOLEAN Lock=TRUE)
Definition: fxusbpipe.cpp:1133
virtual VOID Delete(VOID)=0
#define __out_opt
Definition: dbghelp.h:65
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
static HANDLE PipeHandle
Definition: dhcpcsvc.c:22
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
return pObject GetObjectHandle()
return pRequest GetInformation()
enum _FX_URB_TYPE FX_URB_TYPE
#define NUM_PENDING_READS_MAX
Definition: fxusbpipe.hpp:222
FxUsbPipeMaxTransferSize
Definition: fxusbpipe.hpp:14
@ FxUsbPipeHighSpeedMaxTransferSize
Definition: fxusbpipe.hpp:15
@ FxUsbPipeControlMaxTransferSize
Definition: fxusbpipe.hpp:17
@ FxUsbPipeLowSpeedMaxTransferSize
Definition: fxusbpipe.hpp:16
Status
Definition: gdiplustypes.h:25
KDEFERRED_ROUTINE MdDeferredRoutineType
Definition: mxkm.h:35
IWudfIrp * MdIrp
Definition: mxum.h:103
IO_WORKITEM_ROUTINE MX_WORKITEM_ROUTINE
Definition: mxworkitemkm.h:26
#define _Must_inspect_result_
Definition: no_sal2.h:62
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_INVALID_BUFFER_SIZE
Definition: ntstatus.h:650
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define __checkReturn
Definition: sal_old.h:113
#define STATUS_SUCCESS
Definition: shellext.h:65
#define __range(lb, ub)
Definition: specstrings.h:331
IFxMemory * m_RequestMemory
static EVT_SYSTEMWORKITEM _FxUsbPipeRequestWorkItemThunk
Definition: fxusbpipe.hpp:319
PFN_WDF_USB_READERS_FAILED m_ReadersFailedCallback
Definition: fxusbpipe.hpp:335
BOOLEAN QueueWorkItemLocked(__in FxUsbPipeRepeatReader *Repeater)
Definition: fxusbpipe.cpp:89
ULONG ResubmitRepeater(__in FxUsbPipeRepeatReader *Repeater, __out NTSTATUS *Status)
Definition: fxusbpipe.cpp:135
FxUsbPipeRepeatReader m_Readers[1]
Definition: fxusbpipe.hpp:406
MdDeviceObject m_TargetDevice
Definition: fxusbpipe.hpp:350
FxLookasideList * m_Lookaside
Definition: fxusbpipe.hpp:345
volatile POINTER_ALIGNMENT MxThread m_WorkItemThread
Definition: fxusbpipe.hpp:372
static MX_WORKITEM_ROUTINE _ReadWorkItem
Definition: fxusbpipe.hpp:310
_Must_inspect_result_ NTSTATUS FormatRepeater(__in FxUsbPipeRepeatReader *Repeater)
Definition: fxusbpipe.cpp:687
static MdDeferredRoutineType _FxUsbPipeContinuousReadDpc
Definition: fxusbpipe.hpp:306
VOID DeleteMemory(__in FxRequestBase *Request)
Definition: fxusbpipe.hpp:276
FxSystemWorkItem * m_WorkItem
Definition: fxusbpipe.hpp:360
PFN_WDF_USB_READER_COMPLETION_ROUTINE m_ReadCompleteCallback
Definition: fxusbpipe.hpp:325
WDFCONTEXT m_ReadCompleteContext
Definition: fxusbpipe.hpp:330
static EVT_WDF_REQUEST_COMPLETION_ROUTINE _FxUsbPipeRequestComplete
Definition: fxusbpipe.hpp:315
WDFMEMORY_OFFSET m_Offsets
Definition: fxusbpipe.hpp:355
__inline VOID FxUsbPipeRequestWorkItemHandler(__in FxUsbPipeRepeatReader *FailedRepeater)
Definition: fxusbpipe.cpp:395
FxUsbPipeContinuousReader * Parent
Definition: fxusbpipe.hpp:194
USBD_STATUS GetUsbdStatus(VOID)
Definition: fxusbpipe.cpp:1043
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
Definition: fxusbpipe.cpp:992
USBD_HANDLE m_USBDHandle
Definition: fxusbpipe.hpp:167
_URB_PIPE_REQUEST m_UrbLegacy
Definition: fxusbpipe.hpp:170
_URB_PIPE_REQUEST * m_Urb
Definition: fxusbpipe.hpp:175
VOID SetInfo(__in WDF_USB_REQUEST_TYPE Type, __in USBD_PIPE_HANDLE PipeHandle, __in USHORT Function)
Definition: fxusbpipe.cpp:1028
virtual VOID Dispose(VOID)
Definition: fxusbpipe.cpp:1016
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:861
virtual VOID CopyParameters(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:883
virtual VOID Dispose(VOID)
Definition: fxusbpipe.cpp:849
USBD_STATUS GetUsbdStatus(VOID)
Definition: fxusbpipe.cpp:913
_URB_BULK_OR_INTERRUPT_TRANSFER m_UrbLegacy
Definition: fxusbpipe.hpp:86
_URB_BULK_OR_INTERRUPT_TRANSFER * m_Urb
Definition: fxusbpipe.hpp:91
ULONG GetUrbTransferLength(VOID)
Definition: fxusbpipe.hpp:71
virtual VOID StoreAndReferenceMemory(__in FxRequestBuffer *Buffer)
Definition: fxusbpipekm.cpp:13
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
Definition: fxusbpipe.cpp:825
VOID SetUrbInfo(__in USBD_PIPE_HANDLE PipeHandle, __in ULONG TransferFlags)
Definition: fxusbpipe.cpp:903
USBD_HANDLE m_USBDHandle
Definition: fxusbpipe.hpp:83
virtual VOID StoreAndReferenceMemory(__in FxRequestBuffer *Buffer)
Definition: fxusbpipe.cpp:937
USBD_STATUS GetUsbdStatus(VOID)
Definition: fxusbpipe.cpp:929
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
Definition: fxusbpipe.cpp:955
Definition: ketypes.h:699
Definition: typedefs.h:120
Definition: ntbasedef.h:636
struct _UMURB_BULK_OR_INTERRUPT_TRANSFER UmUrbBulkOrInterruptTransfer
Definition: umusb.h:203
Definition: usb.h:529
USHORT MaximumPacketSize
Definition: usb.h:260
UCHAR EndpointAddress
Definition: usb.h:261
USBD_PIPE_HANDLE PipeHandle
Definition: usb.h:264
Definition: cmds.c:130
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define USB_ENDPOINT_DIRECTION_OUT(x)
Definition: usb100.h:75
#define USB_ENDPOINT_DIRECTION_IN(x)
Definition: usb100.h:76
enum _USBD_PIPE_TYPE USBD_PIPE_TYPE
LONG USBD_STATUS
Definition: usb.h:165
_In_ PVOID _In_ LONG InterfaceNumber
Definition: usbdlib.h:169
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
enum _WDF_IO_TARGET_PURGE_IO_ACTION WDF_IO_TARGET_PURGE_IO_ACTION
enum _WDF_IO_TARGET_SENT_IO_ACTION WDF_IO_TARGET_SENT_IO_ACTION
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
WDF_EXTERN_C_START enum _WDF_IO_TARGET_STATE WDF_IO_TARGET_STATE
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS RequestOptions
Definition: wdfiotarget.h:867
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
EVT_WDF_USB_READERS_FAILED * PFN_WDF_USB_READERS_FAILED
Definition: wdfusb.h:405
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_opt_ PWDF_USB_PIPE_INFORMATION PipeInfo
Definition: wdfusb.h:2543
_In_ WDFUSBINTERFACE UsbInterface
Definition: wdfusb.h:2276
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFUSBDEVICE * UsbDevice
Definition: wdfusb.h:906
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
Definition: wdfusb.h:1339
@ WdfUsbPipeTypeInterrupt
Definition: wdfusb.h:122
@ WdfUsbPipeTypeControl
Definition: wdfusb.h:119
@ WdfUsbPipeTypeBulk
Definition: wdfusb.h:121
@ WdfUsbPipeTypeIsochronous
Definition: wdfusb.h:120
@ WdfUsbPipeTypeInvalid
Definition: wdfusb.h:118
enum _WDF_USB_REQUEST_TYPE WDF_USB_REQUEST_TYPE
EVT_WDF_USB_READER_COMPLETION_ROUTINE * PFN_WDF_USB_READER_COMPLETION_ROUTINE
Definition: wdfusb.h:388
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ WDFMEMORY TransferMemory
Definition: wdfusb.h:1384
_In_ WDFUSBPIPE _Out_ PWDF_USB_PIPE_INFORMATION PipeInformation
Definition: wdfusb.h:1744
enum _WDF_USB_PIPE_TYPE WDF_USB_PIPE_TYPE
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred
Definition: wdfusb.h:1342
_In_ WDFUSBPIPE Pipe
Definition: wdfusb.h:1741
#define POINTER_ALIGNMENT
#define GetType(This)
Definition: conio.h:54
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char UCHAR
Definition: xmlstorage.h:181