mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:53:02 +00:00
[USBSTOR] Move PDO's Inquiry data and FDO's SCSI context
to their Device Extensions. This way the driver can better handle low memory situations
This commit is contained in:
parent
a9b97aeded
commit
94e61c3080
5 changed files with 113 additions and 148 deletions
|
@ -77,15 +77,15 @@ USBSTOR_ResetPipeWorkItemRoutine(
|
|||
IN PVOID Ctx)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PIRP_CONTEXT Context = (PIRP_CONTEXT)Ctx;
|
||||
PFDO_DEVICE_EXTENSION FDODeviceExtension = (PFDO_DEVICE_EXTENSION)FdoDevice->DeviceExtension;
|
||||
PFDO_DEVICE_EXTENSION FDODeviceExtension = (PFDO_DEVICE_EXTENSION)Ctx;
|
||||
PIRP_CONTEXT Context = &FDODeviceExtension->CurrentIrpContext;
|
||||
|
||||
// clear stall on the corresponding pipe
|
||||
Status = USBSTOR_ResetPipeWithHandle(FDODeviceExtension->LowerDeviceObject, Context->Urb.UrbBulkOrInterruptTransfer.PipeHandle);
|
||||
DPRINT1("USBSTOR_ResetPipeWithHandle Status %x\n", Status);
|
||||
|
||||
// now resend the csw as the stall got cleared
|
||||
USBSTOR_SendCSWRequest(Context, Context->Irp);
|
||||
USBSTOR_SendCSWRequest(FDODeviceExtension, Context->Irp);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -133,15 +133,14 @@ USBSTOR_ResetDeviceWorkItemRoutine(
|
|||
VOID
|
||||
NTAPI
|
||||
USBSTOR_QueueResetPipe(
|
||||
IN PFDO_DEVICE_EXTENSION FDODeviceExtension,
|
||||
IN PIRP_CONTEXT Context)
|
||||
IN PFDO_DEVICE_EXTENSION FDODeviceExtension)
|
||||
{
|
||||
DPRINT("USBSTOR_QueueResetPipe\n");
|
||||
|
||||
IoQueueWorkItem(FDODeviceExtension->ResetDeviceWorkItem,
|
||||
USBSTOR_ResetPipeWorkItemRoutine,
|
||||
CriticalWorkQueue,
|
||||
Context);
|
||||
FDODeviceExtension);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue