179 SrbProcessing = FDODeviceExtension->IrpPendingCount != 0;
192 FDODeviceExtension->IrpPendingCount++;
203 IrpListFreeze = FDODeviceExtension->IrpListFreeze;
220 ASSERT(FDODeviceExtension->ActiveSrb !=
NULL);
226 ASSERT(FDODeviceExtension->ActiveSrb ==
NULL);
228 FDODeviceExtension->ActiveSrb =
Request;
235 if (
Irp->Cancel && OldDriverCancel ==
NULL)
256 DPRINT(
"IrpListFreeze: %lu IrpPendingCount %lu\n", IrpListFreeze, FDODeviceExtension->IrpPendingCount);
258 return (IrpListFreeze || SrbProcessing);
288 if (!
IsListEmpty(&FDODeviceExtension->IrpListHead))
361 FDODeviceExtension->IrpPendingCount--;
366 if (FDODeviceExtension->ActiveSrb ==
Request)
371 FDODeviceExtension->ActiveSrb =
NULL;
377 if (FDODeviceExtension->IrpPendingCount == 0 &&
378 FDODeviceExtension->ActiveSrb ==
NULL)
412 if (FDODeviceExtension->ActiveSrb !=
NULL ||
413 FDODeviceExtension->IrpListFreeze)
456 FDODeviceExtension->ActiveSrb =
Request;
497 FDODeviceExtension->IrpListFreeze =
FALSE;
552 DPRINT(
"USBSTOR_StartIo\n");
588 Irp->IoStatus.Information = 0;
624 ResetInProgress = FDODeviceExtension->ResetInProgress;
655 Irp->IoStatus.Information = 0;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
VOID NTAPI USBSTOR_Cancel(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
BOOLEAN USBSTOR_QueueAddIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID USBSTOR_QueueRelease(IN PDEVICE_OBJECT DeviceObject)
PIRP USBSTOR_RemoveIrp(IN PDEVICE_OBJECT DeviceObject)
VOID USBSTOR_QueueInitialize(PFDO_DEVICE_EXTENSION FDODeviceExtension)
VOID USBSTOR_QueueTerminateRequest(IN PDEVICE_OBJECT FDODeviceObject, IN PIRP Irp)
VOID USBSTOR_QueueWaitForPendingRequests(IN PDEVICE_OBJECT DeviceObject)
VOID USBSTOR_QueueNextRequest(IN PDEVICE_OBJECT DeviceObject)
VOID NTAPI USBSTOR_CancelIo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID NTAPI USBSTOR_StartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeReleaseSpinLock(sl, irql)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define KeGetCurrentIrql()
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
IoSetCancelRoutine(Irp, CancelRoutine)
VOID NTAPI IoStartPacket(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PULONG Key, IN PDRIVER_CANCEL CancelFunction)
VOID NTAPI IoStartNextPacket(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Cancelable)
#define IoCompleteRequest
VOID NTAPI IoReleaseCancelSpinLock(IN KIRQL Irql)
VOID NTAPI IoAcquireCancelSpinLock(OUT PKIRQL Irql)
#define STATUS_DEVICE_DOES_NOT_EXIST
#define KeAcquireSpinLockAtDpcLevel(SpinLock)
#define KeReleaseSpinLockFromDpcLevel(SpinLock)
base of all file and directory entries
COMMON_DEVICE_EXTENSION Common
PDEVICE_OBJECT DeviceObject
struct _IO_STACK_LOCATION::@3978::@4017 Others
union _IO_STACK_LOCATION::@1579 Parameters
COMMON_DEVICE_EXTENSION Common
#define CONTAINING_RECORD(address, type, field)
NTSTATUS USBSTOR_HandleExecuteSCSI(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
_In_ PDEVICE_OBJECT DeviceObject
DRIVER_CANCEL * PDRIVER_CANCEL