goto ON_EXIT;\r
}\r
\r
- Status = UsbBootReadBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer);\r
+ if (UsbMass->Cdb16Byte) {\r
+ Status = UsbBootReadBlocks16 (UsbMass, Lba, TotalBlock, Buffer);\r
+ } else {\r
+ Status = UsbBootReadBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer);\r
+ }\r
+\r
if (EFI_ERROR (Status)) {\r
DEBUG ((EFI_D_ERROR, "UsbMassReadBlocks: UsbBootReadBlocks (%r) -> Reset\n", Status));\r
UsbMassReset (This, TRUE);\r
// Try to write the data even the device is marked as ReadOnly,\r
// and clear the status should the write succeed.\r
//\r
- Status = UsbBootWriteBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer);\r
+ if (UsbMass->Cdb16Byte) {\r
+ Status = UsbBootWriteBlocks16 (UsbMass, Lba, TotalBlock, Buffer);\r
+ } else {\r
+ Status = UsbBootWriteBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer);\r
+ } \r
+\r
if (EFI_ERROR (Status)) {\r
DEBUG ((EFI_D_ERROR, "UsbMassWriteBlocks: UsbBootWriteBlocks (%r) -> Reset\n", Status));\r
UsbMassReset (This, TRUE);\r