Add transfer size to ATA(PI) IDENTIFY (PACKET) DEVICE commands. Fixes #761

This commit is contained in:
2022-11-25 17:18:52 +00:00
parent b0ca040566
commit ec23adfbcb
2 changed files with 8 additions and 6 deletions

View File

@@ -74,11 +74,12 @@ public partial class Device
var registers = new AtaRegistersChs
{
Command = (byte)AtaCommands.IdentifyDevice
Command = (byte)AtaCommands.IdentifyDevice,
SectorCount = 1
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, AtaTransferRegister.NoTransfer,
ref buffer, timeout, false, out duration, out bool sense);
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, AtaTransferRegister.SectorCount,
ref buffer, timeout, true, out duration, out bool sense);
Error = LastError != 0;

View File

@@ -73,11 +73,12 @@ public partial class Device
var registers = new AtaRegistersChs
{
Command = (byte)AtaCommands.IdentifyPacketDevice
Command = (byte)AtaCommands.IdentifyPacketDevice,
Sector = 1
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, AtaTransferRegister.NoTransfer,
ref buffer, timeout, false, out duration, out bool sense);
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, AtaTransferRegister.SectorCount,
ref buffer, timeout, true, out duration, out bool sense);
Error = LastError != 0;