Switch to full style
Tools for hard drive diagnostics, repair, and data recovery
Post a reply

About detect HDD or CD attached to SATA-HBA, any suggestion?

May 16th, 2012, 4:49

After I read <ATA/ATAPI-6 spec> and <SATA3.0 spec> I didn't got any Method to detect ATA-DEVICE(HDD or CD) .
But I think maybe I could via deliver IDENTIFY-DEVICE command to detect it indirectly.
example wrote:Detect DEV0:
1. select DEV0: write to "shadow-device-register" with value of 0x0 or 0xA0
2. deliver command: write command-code 0xEC to "shadow-command-register"
3. check DEV:
DEV0 present: DEV==0 & ERR==0
DEV0 isn't present: DEV==0 & ERR==1 & "signatures" indicate this DEVICE isn't ATAPI device
Detect DEV1:
1. select DEV1: write to "shadow-device-register" with value of 0x10 or 0xB0
2. deliver command: write command-code 0xEC to "shadow-command-register"
3. check DEV:
DEV1 present: DEV==1 & ERR==0
DEV1 isn't present: DEV==1 & ERR==1 & "signatures" indicate this DEVICE isn't ATAPI device
DEV1 isn't present: DEV==0 (indicate Master-Only emulation)

I've no enough HARDWARE to test this Method. So I don't know wether it is competent for detecting HDD.
I wanna some other suggestion too.
Any info should be appreciated !!
Post a reply