mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:12:57 +00:00
[USBSTOR]
- Fix attempt #2 the offset bug - fix identation svn path=/branches/usb-bringup-trunk/; revision=55089
This commit is contained in:
parent
8baf90438a
commit
99926db97d
1 changed files with 18 additions and 11 deletions
|
@ -589,12 +589,16 @@ USBSTOR_SendRequest(
|
||||||
if (CommandLength == UFI_READ_WRITE_CMD_LEN)
|
if (CommandLength == UFI_READ_WRITE_CMD_LEN)
|
||||||
{
|
{
|
||||||
MdlVirtualAddress = MmGetMdlVirtualAddress(OriginalRequest->MdlAddress);
|
MdlVirtualAddress = MmGetMdlVirtualAddress(OriginalRequest->MdlAddress);
|
||||||
|
|
||||||
|
//
|
||||||
|
// is there an offset
|
||||||
|
//
|
||||||
if (MdlVirtualAddress != Context->TransferData)
|
if (MdlVirtualAddress != Context->TransferData)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// lets build an mdl
|
// lets build an mdl
|
||||||
//
|
//
|
||||||
Context->TransferBufferMDL = IoAllocateMdl(Context->TransferData, MmGetMdlByteCount(OriginalRequest->MdlAddress), FALSE, FALSE, NULL);
|
Context->TransferBufferMDL = IoAllocateMdl(Context->TransferData, MmGetMdlByteCount(OriginalRequest->MdlAddress), FALSE, FALSE, NULL);
|
||||||
if (!Context->TransferBufferMDL)
|
if (!Context->TransferBufferMDL)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -603,17 +607,20 @@ USBSTOR_SendRequest(
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// now build the partial mdl
|
// now build the partial mdl
|
||||||
//
|
//
|
||||||
IoBuildPartialMdl(OriginalRequest->MdlAddress, Context->TransferBufferMDL, Context->TransferData, Context->TransferDataLength);
|
IoBuildPartialMdl(OriginalRequest->MdlAddress, Context->TransferBufferMDL, Context->TransferData, Context->TransferDataLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
if (!Context->TransferBufferMDL)
|
||||||
// I/O paging request
|
{
|
||||||
//
|
//
|
||||||
Context->TransferBufferMDL = OriginalRequest->MdlAddress;
|
// I/O paging request
|
||||||
|
//
|
||||||
|
Context->TransferBufferMDL = OriginalRequest->MdlAddress;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue