Hello all.
I want to interact with HD a little. First of all, I have to determine, how many HDs are connected to channel and their configuration (Device0 only, Device0 and Device1 and so on). To accomplish with that I use EXECUTE_DEVICE_DIAGNOSTICS command.
So, there are many questions about it.
1. Taking a look to table 26 of ATA/ATAPI-6-3b standard I see:
When this code is in the Device 0 Error register
01h Device 0 passed, Device 1 passed or not present
00h, 02h-7Fh Device 0 failed, Device 1 passed or not present
81h Device 0 passed, Device 1 failed
80h, 82h-FFh Device 0 failed, Device 1 failed
When this code is in the Device 1 Error register
01h Device 1 passed (see note 2)
00h, 02h-7Fh Device 1 failed (see note 2)
NOTE -
1 Codes other than 01h and 81h may indicate additional information about
the failure(s).
2 If Device 1 is not present, the host may see the information from Device 0
even though Device 1 is selected.
The table says, that we cannot determine presence or absence of Device1 -- it is possible that it passed, or not present. Also, I can't check error register of Device1, cause it is possible that Device0 answers instead of Device1 (as I understood in the case of absence of Device1).
Also I have a question about some command protocol details. I don't know, what means a term 'sampling' in the protocol (cause I am very weak in electornics

).
During execution of command, Device0 switches to the 'PDIAG-wait' state. What does it mean? Does the device wait for something? And the second, the most weird thing for me is 'Sample_PDIAG- State:'. What is sampling? I understood, that it is something like probe, but I didn't understand, how Device1 should answer on it.
Anyway, I can't get exact information about presence or absence of Device1 on channel, cause during execution bit 7 of error register is cleared in two cases:
1. Assertion of DASP- was not detected (there is no Device1 at all).
2. Device1 was probed and answered, that everyting is Ok.
More over, it is written, that Device1 only configuration is implementation specific. So, how can I determine this configuration?
TIA, Mikae.
P.S. Is russian part of this forum dead?