* DiscImageChef.Devices/Device/AtaCommands.cs:

* DiscImageChef.Devices/Device/ScsiCommands.cs:
	* DiscImageChef.Devices/Device/AtapiCommands.cs:
	  Added duration debug printfs.

	* DiscImageChef.Devices/Enums.cs:
	  Corrected device<->host direction.

	* DiscImageChef.Devices/Linux/Command.cs:
	  Corrected device<->host direction.
	Changed to workaround how ATA Pass-Through is really
	  implemented in Linux.

	* DiscImageChef/Commands/DeviceInfo.cs:
	  Added ATA and ATAPI identify commands.
This commit is contained in:
2015-10-15 01:46:31 +01:00
parent 921d27375e
commit 846be0d756
8 changed files with 162 additions and 78 deletions

View File

@@ -93,10 +93,14 @@ namespace DiscImageChef.Devices
registers.command = (byte)Enums.AtaCommands.IdentifyDevice;
lastError = SendAtaCommand(registers, out statusRegisters, Enums.AtaProtocol.PioOut, Enums.AtaTransferRegister.NoTransfer,
lastError = SendAtaCommand(registers, out statusRegisters, Enums.AtaProtocol.PioIn, Enums.AtaTransferRegister.SectorCount,
ref buffer, timeout, false, out duration, out sense);
error = lastError != 0;
#if DEBUG
Console.WriteLine("ATA IDENTIFY DEVICE took {0} ms.", duration);
#endif
return sense;
}
}