All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: About detect HDD or CD attached to SATA-HBA, any suggestion?
PostPosted: May 16th, 2012, 4:49 
Offline

Joined: December 20th, 2011, 22:12
Posts: 30
Location: china
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 !!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group