HDD detection

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Mikae
Member
Member
Posts: 94
Joined: Sun Jul 30, 2006 1:08 pm

Post by Mikae »

exkor

I think, that it is better to work with 'clear' devices, so I prefer to reset them. The only problem is that accordingly to software reset protocol Device0 may wait Device1 to answer up to 31 seconds -- it is too much. But I never met such long pauses.

I don't consider DEVICE_RESET command, since it is for ATAPI devices. Setting SRST bit reset all devices on channel, so there is no reason to select a device.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Mikae wrote:About more than 256 words -- (...) A way to avoid it, is to check DRQ bit after reading 256 words, and just read until it is reset in an empty loop. Hope, it will help (I can't check it since I never deal with such situation).
You could of course change your code to reading 200 words, then check if it reads away the last 56 correctly, or something. Then prey it helps for > 256 :).


JAL
Post Reply