READ(10) transfer length was not being set on ValidateCommand

This caused some DMA transfers from the DVD drive to fail
This commit is contained in:
StrikerX3 2018-12-09 14:54:18 -02:00
parent ad0fbc9a29
commit 0281d2ebff
2 changed files with 5 additions and 0 deletions

View file

@ -162,6 +162,9 @@ bool BaseDVDDriveATADeviceDriver::ValidateCommand(PacketInformation& packetInfo)
case OpReadCapacity:
packetInfo.transferSize = sizeof(ReadCapacityData);
return true;
case OpRead10:
packetInfo.transferSize = (uint32_t)B2L16(packetInfo.cdb.read10.length) * kDVDSectorSize;
return true;
default:
return true;
}

View file

@ -104,6 +104,8 @@ bool ImageDVDDriveATADeviceDriver::ProcessATAPIPacketNonData(PacketInformation&
}
bool ImageDVDDriveATADeviceDriver::ProcessATAPIPacketDataRead(PacketInformation& packetInfo, uint8_t *packetDataBuffer, uint16_t byteCountLimit, uint32_t *packetDataSize) {
// TODO: refactor command handling
// - make a structure similar to ATA commands
switch (packetInfo.cdb.opCode.u8) {
case OpModeSense10:
switch (packetInfo.cdb.modeSense10.pageCode) {