https://git.reactos.org/?p=reactos.git;a=commitdiff;h=39c48a4d91106f55141cb…
commit 39c48a4d91106f55141cb158f54444b0902a384a
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Dec 6 23:32:29 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Sun Dec 6 23:32:29 2020 +0300
[USBSTOR] Remove workarounds for old storage stack
---
drivers/usb/usbstor/disk.c | 5 -----
drivers/usb/usbstor/fdo.c | 10 +---------
drivers/usb/usbstor/pdo.c | 7 -------
3 files changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/usb/usbstor/disk.c b/drivers/usb/usbstor/disk.c
index 1dbe0ad83d8..7f82bcbd539 100644
--- a/drivers/usb/usbstor/disk.c
+++ b/drivers/usb/usbstor/disk.c
@@ -173,13 +173,8 @@ USBSTOR_HandleInternalDeviceControl(
{
DPRINT1("SRB_FUNCTION_FLUSH / SRB_FUNCTION_FLUSH_QUEUE /
SRB_FUNCTION_SHUTDOWN\n");
- // HACK: don't flush pending requests
-#if 0 // we really need a proper storage stack
- //
// wait for pending requests to finish
- //
USBSTOR_QueueWaitForPendingRequests(PDODeviceExtension->LowerDeviceObject);
-#endif
Request->SrbStatus = SRB_STATUS_SUCCESS;
Status = STATUS_SUCCESS;
diff --git a/drivers/usb/usbstor/fdo.c b/drivers/usb/usbstor/fdo.c
index ebf2d1976a4..6b8aa4c3e09 100644
--- a/drivers/usb/usbstor/fdo.c
+++ b/drivers/usb/usbstor/fdo.c
@@ -327,15 +327,7 @@ USBSTOR_FdoHandlePnp(
case IRP_MN_QUERY_STOP_DEVICE:
case IRP_MN_QUERY_REMOVE_DEVICE:
{
-#if 0
- //
- // we can if nothing is pending
- //
- if (DeviceExtension->IrpPendingCount != 0 ||
- DeviceExtension->ActiveSrb != NULL)
-#else
- if (TRUE)
-#endif
+ if (DeviceExtension->IrpPendingCount != 0 || DeviceExtension->ActiveSrb
!= NULL)
{
/* We have pending requests */
DPRINT1("Failing removal/stop request due to pending requests
present\n");
diff --git a/drivers/usb/usbstor/pdo.c b/drivers/usb/usbstor/pdo.c
index 86cf368bee6..8510a7941e6 100644
--- a/drivers/usb/usbstor/pdo.c
+++ b/drivers/usb/usbstor/pdo.c
@@ -604,14 +604,7 @@ USBSTOR_PdoHandlePnp(
case IRP_MN_QUERY_REMOVE_DEVICE:
case IRP_MN_QUERY_STOP_DEVICE:
{
-#if 0
- //
- // if we're not claimed it's ok
- //
if (DeviceExtension->Claimed)
-#else
- if (TRUE)
-#endif
{
Status = STATUS_UNSUCCESSFUL;
DPRINT1("[USBSTOR] Request %x fails because device is still
claimed\n", IoStack->MinorFunction);