2011-05-14 18:09:00 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Universal Serial Bus Bulk Storage Driver
|
2019-03-24 20:01:43 +00:00
|
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
2011-05-14 18:09:00 +00:00
|
|
|
* PURPOSE: USB block storage device driver.
|
2019-03-24 20:01:43 +00:00
|
|
|
* COPYRIGHT: 2005-2006 James Tabor
|
|
|
|
* 2011-2012 Michael Martin (michael.martin@reactos.org)
|
|
|
|
* 2011-2013 Johannes Anderwald (johannes.anderwald@reactos.org)
|
2011-05-14 18:09:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "usbstor.h"
|
|
|
|
|
2013-12-23 14:50:17 +00:00
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
2019-03-24 20:01:43 +00:00
|
|
|
|
2011-05-14 18:09:00 +00:00
|
|
|
VOID
|
|
|
|
USBSTOR_QueueInitialize(
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension)
|
|
|
|
{
|
2011-05-15 14:59:16 +00:00
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
2011-05-14 18:09:00 +00:00
|
|
|
KeInitializeSpinLock(&FDODeviceExtension->IrpListLock);
|
|
|
|
InitializeListHead(&FDODeviceExtension->IrpListHead);
|
2012-01-31 15:59:59 +00:00
|
|
|
KeInitializeEvent(&FDODeviceExtension->NoPendingRequests, NotificationEvent, TRUE);
|
2011-05-14 18:09:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
USBSTOR_CancelIo(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp)
|
|
|
|
{
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
|
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
2019-03-24 20:01:43 +00:00
|
|
|
ASSERT_IRQL_EQUAL(DISPATCH_LEVEL);
|
2011-05-14 18:09:00 +00:00
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
|
|
|
|
2012-01-24 04:39:09 +00:00
|
|
|
// this IRP isn't in our list here
|
|
|
|
// now release the cancel lock
|
|
|
|
IoReleaseCancelSpinLock(Irp->CancelIrql);
|
|
|
|
Irp->IoStatus.Status = STATUS_CANCELLED;
|
|
|
|
|
2012-01-24 23:04:31 +00:00
|
|
|
USBSTOR_QueueTerminateRequest(DeviceObject, Irp);
|
2012-01-24 04:39:09 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
2012-01-24 23:04:31 +00:00
|
|
|
|
|
|
|
USBSTOR_QueueNextRequest(DeviceObject);
|
2012-01-24 04:39:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
USBSTOR_Cancel(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp)
|
|
|
|
{
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
|
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
2019-03-24 20:01:43 +00:00
|
|
|
ASSERT_IRQL_EQUAL(DISPATCH_LEVEL);
|
2012-01-24 04:39:09 +00:00
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
|
|
|
|
2011-05-14 18:09:00 +00:00
|
|
|
KeAcquireSpinLockAtDpcLevel(&FDODeviceExtension->IrpListLock);
|
|
|
|
RemoveEntryList(&Irp->Tail.Overlay.ListEntry);
|
2021-06-11 12:29:21 +00:00
|
|
|
KeReleaseSpinLockFromDpcLevel(&FDODeviceExtension->IrpListLock);
|
2011-06-03 05:38:27 +00:00
|
|
|
|
|
|
|
IoReleaseCancelSpinLock(Irp->CancelIrql);
|
2011-05-14 18:09:00 +00:00
|
|
|
Irp->IoStatus.Status = STATUS_CANCELLED;
|
|
|
|
|
2012-01-24 23:04:31 +00:00
|
|
|
USBSTOR_QueueTerminateRequest(DeviceObject, Irp);
|
2011-05-14 18:09:00 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
2012-01-24 23:04:31 +00:00
|
|
|
|
|
|
|
USBSTOR_QueueNextRequest(DeviceObject);
|
2011-05-14 18:09:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
USBSTOR_QueueAddIrp(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp)
|
|
|
|
{
|
|
|
|
PDRIVER_CANCEL OldDriverCancel;
|
|
|
|
KIRQL OldLevel;
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
BOOLEAN IrpListFreeze;
|
2011-05-15 12:47:54 +00:00
|
|
|
BOOLEAN SrbProcessing;
|
2012-01-25 01:46:35 +00:00
|
|
|
PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp);
|
|
|
|
PSCSI_REQUEST_BLOCK Request = (PSCSI_REQUEST_BLOCK)IoStack->Parameters.Others.Argument1;
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
IoMarkIrpPending(Irp);
|
|
|
|
|
|
|
|
KeAcquireSpinLock(&FDODeviceExtension->IrpListLock, &OldLevel);
|
|
|
|
|
2011-05-15 12:47:54 +00:00
|
|
|
SrbProcessing = FDODeviceExtension->IrpPendingCount != 0;
|
|
|
|
|
|
|
|
if (SrbProcessing)
|
|
|
|
{
|
|
|
|
// add irp to queue
|
|
|
|
InsertTailList(&FDODeviceExtension->IrpListHead, &Irp->Tail.Overlay.ListEntry);
|
2012-01-31 15:33:32 +00:00
|
|
|
}
|
2011-05-15 12:47:54 +00:00
|
|
|
|
2012-01-31 15:33:32 +00:00
|
|
|
FDODeviceExtension->IrpPendingCount++;
|
|
|
|
KeClearEvent(&FDODeviceExtension->NoPendingRequests);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2011-06-03 05:38:27 +00:00
|
|
|
// check if queue is freezed
|
2019-04-13 12:48:14 +00:00
|
|
|
IrpListFreeze = BooleanFlagOn(FDODeviceExtension->Flags, USBSTOR_FDO_FLAGS_IRP_LIST_FREEZE);
|
2011-06-03 05:38:27 +00:00
|
|
|
|
|
|
|
KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel);
|
|
|
|
|
|
|
|
// synchronize with cancellations by holding the cancel lock
|
|
|
|
IoAcquireCancelSpinLock(&Irp->CancelIrql);
|
|
|
|
|
2012-01-24 04:39:09 +00:00
|
|
|
if (SrbProcessing)
|
|
|
|
{
|
2012-01-25 01:46:35 +00:00
|
|
|
ASSERT(FDODeviceExtension->ActiveSrb != NULL);
|
|
|
|
|
2012-01-24 04:39:09 +00:00
|
|
|
OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_Cancel);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-01-25 01:46:35 +00:00
|
|
|
ASSERT(FDODeviceExtension->ActiveSrb == NULL);
|
|
|
|
|
|
|
|
FDODeviceExtension->ActiveSrb = Request;
|
2012-01-24 04:39:09 +00:00
|
|
|
OldDriverCancel = IoSetCancelRoutine(Irp, USBSTOR_CancelIo);
|
|
|
|
}
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
// check if the irp has already been cancelled
|
|
|
|
if (Irp->Cancel && OldDriverCancel == NULL)
|
|
|
|
{
|
|
|
|
// cancel irp
|
2012-01-24 04:39:09 +00:00
|
|
|
Irp->CancelRoutine(DeviceObject, Irp);
|
2011-05-14 18:09:00 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2011-06-03 05:38:27 +00:00
|
|
|
IoReleaseCancelSpinLock(Irp->CancelIrql);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
// if list is freezed, dont start this packet
|
2011-05-15 17:57:02 +00:00
|
|
|
DPRINT("IrpListFreeze: %lu IrpPendingCount %lu\n", IrpListFreeze, FDODeviceExtension->IrpPendingCount);
|
2011-05-15 12:47:54 +00:00
|
|
|
|
|
|
|
return (IrpListFreeze || SrbProcessing);
|
2011-05-14 18:09:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PIRP
|
|
|
|
USBSTOR_RemoveIrp(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject)
|
|
|
|
{
|
|
|
|
KIRQL OldLevel;
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
PLIST_ENTRY Entry;
|
|
|
|
PIRP Irp = NULL;
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
KeAcquireSpinLock(&FDODeviceExtension->IrpListLock, &OldLevel);
|
|
|
|
|
|
|
|
if (!IsListEmpty(&FDODeviceExtension->IrpListHead))
|
|
|
|
{
|
|
|
|
Entry = RemoveHeadList(&FDODeviceExtension->IrpListHead);
|
|
|
|
|
|
|
|
// get offset to start of irp
|
|
|
|
Irp = (PIRP)CONTAINING_RECORD(Entry, IRP, Tail.Overlay.ListEntry);
|
|
|
|
}
|
|
|
|
|
|
|
|
KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel);
|
|
|
|
|
|
|
|
return Irp;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
2012-01-31 15:33:32 +00:00
|
|
|
USBSTOR_QueueWaitForPendingRequests(
|
2011-05-14 18:09:00 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject)
|
|
|
|
{
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2012-01-31 15:33:32 +00:00
|
|
|
KeWaitForSingleObject(&FDODeviceExtension->NoPendingRequests,
|
|
|
|
Executive,
|
|
|
|
KernelMode,
|
|
|
|
FALSE,
|
|
|
|
NULL);
|
2011-05-14 18:09:00 +00:00
|
|
|
}
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
VOID
|
|
|
|
USBSTOR_QueueTerminateRequest(
|
|
|
|
IN PDEVICE_OBJECT FDODeviceObject,
|
2012-01-24 23:04:31 +00:00
|
|
|
IN PIRP Irp)
|
2011-05-15 14:59:16 +00:00
|
|
|
{
|
|
|
|
KIRQL OldLevel;
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
2012-01-24 23:04:31 +00:00
|
|
|
PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp);
|
|
|
|
PSCSI_REQUEST_BLOCK Request = (PSCSI_REQUEST_BLOCK)IoStack->Parameters.Others.Argument1;
|
2011-05-15 14:59:16 +00:00
|
|
|
|
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)FDODeviceObject->DeviceExtension;
|
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
|
|
|
|
|
|
|
KeAcquireSpinLock(&FDODeviceExtension->IrpListLock, &OldLevel);
|
|
|
|
|
|
|
|
FDODeviceExtension->IrpPendingCount--;
|
|
|
|
|
2012-01-24 23:04:31 +00:00
|
|
|
// check if this was our current active SRB
|
|
|
|
if (FDODeviceExtension->ActiveSrb == Request)
|
2011-05-15 14:59:16 +00:00
|
|
|
{
|
|
|
|
// indicate processing is completed
|
2012-01-24 23:04:31 +00:00
|
|
|
FDODeviceExtension->ActiveSrb = NULL;
|
2011-05-15 14:59:16 +00:00
|
|
|
}
|
|
|
|
|
2012-01-31 15:33:32 +00:00
|
|
|
// Set the event if nothing else is pending
|
|
|
|
if (FDODeviceExtension->IrpPendingCount == 0 &&
|
|
|
|
FDODeviceExtension->ActiveSrb == NULL)
|
|
|
|
{
|
|
|
|
KeSetEvent(&FDODeviceExtension->NoPendingRequests, IO_NO_INCREMENT, FALSE);
|
|
|
|
}
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel);
|
|
|
|
}
|
|
|
|
|
2011-05-14 18:09:00 +00:00
|
|
|
VOID
|
|
|
|
USBSTOR_QueueNextRequest(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject)
|
|
|
|
{
|
2011-05-15 14:59:16 +00:00
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
2011-05-14 18:09:00 +00:00
|
|
|
PIRP Irp;
|
|
|
|
PIO_STACK_LOCATION IoStack;
|
|
|
|
PSCSI_REQUEST_BLOCK Request;
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2012-01-24 23:04:31 +00:00
|
|
|
// check first if there's already a request pending or the queue is frozen
|
|
|
|
if (FDODeviceExtension->ActiveSrb != NULL ||
|
2019-04-13 12:48:14 +00:00
|
|
|
BooleanFlagOn(FDODeviceExtension->Flags, USBSTOR_FDO_FLAGS_IRP_LIST_FREEZE))
|
2012-01-24 23:04:31 +00:00
|
|
|
{
|
|
|
|
// no work to do yet
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-05-14 18:09:00 +00:00
|
|
|
// remove first irp from list
|
|
|
|
Irp = USBSTOR_RemoveIrp(DeviceObject);
|
|
|
|
|
|
|
|
// is there an irp pending
|
|
|
|
if (!Irp)
|
|
|
|
{
|
|
|
|
// no work to do
|
2011-05-15 14:59:16 +00:00
|
|
|
IoStartNextPacket(DeviceObject, TRUE);
|
2011-05-14 18:09:00 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
|
|
|
Request = (PSCSI_REQUEST_BLOCK)IoStack->Parameters.Others.Argument1;
|
2011-05-15 14:59:16 +00:00
|
|
|
ASSERT(Request);
|
|
|
|
|
2012-01-24 23:04:31 +00:00
|
|
|
FDODeviceExtension->ActiveSrb = Request;
|
|
|
|
|
2011-05-14 18:09:00 +00:00
|
|
|
// start next packet
|
2011-05-15 14:59:16 +00:00
|
|
|
IoStartPacket(DeviceObject, Irp, &Request->QueueSortKey, USBSTOR_CancelIo);
|
|
|
|
IoStartNextPacket(DeviceObject, TRUE);
|
2011-05-14 18:09:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
USBSTOR_QueueRelease(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject)
|
|
|
|
{
|
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
PIRP Irp;
|
|
|
|
KIRQL OldLevel;
|
|
|
|
PIO_STACK_LOCATION IoStack;
|
|
|
|
PSCSI_REQUEST_BLOCK Request;
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
KeAcquireSpinLock(&FDODeviceExtension->IrpListLock, &OldLevel);
|
|
|
|
|
|
|
|
// clear freezed status
|
2019-04-13 12:48:14 +00:00
|
|
|
FDODeviceExtension->Flags &= ~USBSTOR_FDO_FLAGS_IRP_LIST_FREEZE;
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
KeReleaseSpinLock(&FDODeviceExtension->IrpListLock, OldLevel);
|
|
|
|
|
|
|
|
// grab newest irp
|
|
|
|
Irp = USBSTOR_RemoveIrp(DeviceObject);
|
|
|
|
|
|
|
|
if (!Irp)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
|
|
|
Request = (PSCSI_REQUEST_BLOCK)IoStack->Parameters.Others.Argument1;
|
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
IoStartPacket(DeviceObject,
|
2011-05-14 18:09:00 +00:00
|
|
|
Irp,
|
2021-06-11 12:29:21 +00:00
|
|
|
&Request->QueueSortKey,
|
2011-05-14 18:09:00 +00:00
|
|
|
USBSTOR_CancelIo);
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
USBSTOR_StartIo(
|
|
|
|
PDEVICE_OBJECT DeviceObject,
|
|
|
|
PIRP Irp)
|
|
|
|
{
|
|
|
|
PIO_STACK_LOCATION IoStack;
|
2019-04-13 12:48:14 +00:00
|
|
|
PSCSI_REQUEST_BLOCK Request;
|
2011-05-14 18:09:00 +00:00
|
|
|
PFDO_DEVICE_EXTENSION FDODeviceExtension;
|
|
|
|
PPDO_DEVICE_EXTENSION PDODeviceExtension;
|
|
|
|
KIRQL OldLevel;
|
2011-05-15 12:47:54 +00:00
|
|
|
BOOLEAN ResetInProgress;
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2011-05-15 17:57:02 +00:00
|
|
|
DPRINT("USBSTOR_StartIo\n");
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
|
|
ASSERT(FDODeviceExtension->Common.IsFDO);
|
|
|
|
|
|
|
|
IoAcquireCancelSpinLock(&OldLevel);
|
|
|
|
|
|
|
|
IoSetCancelRoutine(Irp, NULL);
|
|
|
|
|
|
|
|
// check if the irp has been cancelled
|
|
|
|
if (Irp->Cancel)
|
|
|
|
{
|
|
|
|
IoReleaseCancelSpinLock(OldLevel);
|
|
|
|
|
|
|
|
Irp->IoStatus.Status = STATUS_CANCELLED;
|
|
|
|
Irp->IoStatus.Information = 0;
|
|
|
|
|
2012-01-24 23:04:31 +00:00
|
|
|
USBSTOR_QueueTerminateRequest(DeviceObject, Irp);
|
2011-05-14 18:09:00 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
2012-01-24 23:04:31 +00:00
|
|
|
USBSTOR_QueueNextRequest(DeviceObject);
|
2011-05-14 18:09:00 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
IoReleaseCancelSpinLock(OldLevel);
|
|
|
|
|
2019-04-13 12:48:14 +00:00
|
|
|
KeAcquireSpinLock(&FDODeviceExtension->CommonLock, &OldLevel);
|
|
|
|
ResetInProgress = BooleanFlagOn(FDODeviceExtension->Flags, USBSTOR_FDO_FLAGS_DEVICE_RESETTING);
|
|
|
|
KeReleaseSpinLock(&FDODeviceExtension->CommonLock, OldLevel);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
|
|
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
|
|
|
|
|
|
|
PDODeviceExtension = (PPDO_DEVICE_EXTENSION)IoStack->DeviceObject->DeviceExtension;
|
2019-04-13 12:48:14 +00:00
|
|
|
Request = IoStack->Parameters.Scsi.Srb;
|
2011-05-14 18:09:00 +00:00
|
|
|
ASSERT(PDODeviceExtension->Common.IsFDO == FALSE);
|
|
|
|
|
2011-05-15 12:47:54 +00:00
|
|
|
if (ResetInProgress)
|
|
|
|
{
|
|
|
|
// hard reset is in progress
|
2019-04-13 12:48:14 +00:00
|
|
|
Request->SrbStatus = SRB_STATUS_NO_DEVICE;
|
|
|
|
Request->DataTransferLength = 0;
|
2011-05-15 12:47:54 +00:00
|
|
|
Irp->IoStatus.Information = 0;
|
|
|
|
Irp->IoStatus.Status = STATUS_DEVICE_DOES_NOT_EXIST;
|
2012-01-24 23:04:31 +00:00
|
|
|
USBSTOR_QueueTerminateRequest(DeviceObject, Irp);
|
2011-05-15 12:47:54 +00:00
|
|
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
2019-04-13 12:48:14 +00:00
|
|
|
USBSTOR_QueueNextRequest(DeviceObject);
|
2011-05-15 14:59:16 +00:00
|
|
|
return;
|
2011-05-15 12:47:54 +00:00
|
|
|
}
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2019-04-10 00:22:03 +00:00
|
|
|
USBSTOR_HandleExecuteSCSI(IoStack->DeviceObject, Irp);
|
2011-05-14 18:09:00 +00:00
|
|
|
|
2011-05-15 14:59:16 +00:00
|
|
|
// FIXME: handle error
|
2011-05-14 18:09:00 +00:00
|
|
|
}
|