If there are two drives on one ATA interface (master and slave),must I issue a command to one drive and wait until it's finished before I can do the same with the other drive?
I know about overlapped commands but do many drives support it? Do Linux and Windows support this feature?
Also, are ATA (not ATAPI) drives with removable media as rare as they seem to be? Is it worth supporting removable media in the ATA code?
ATA master and slave
-
- Member
- Posts: 81
- Joined: Wed Nov 09, 2011 2:21 am
- Location: Behind a keyboard located in The Netherlands
Re: ATA master and slave
The initial ATA standard didn't support hot swapping that is one of the reasons the ATAPI protocol was made.
And thus as a whole doesn't allow removable media this doesn't mean it hasn't been done in the past, it's one of the common tricks for reading a Xbox classic HDD.
And thus as a whole doesn't allow removable media this doesn't mean it hasn't been done in the past, it's one of the common tricks for reading a Xbox classic HDD.
Re: ATA master and slave
so lets say we access 0x1f0 ports to for master driver and issue anatp wrote:If there are two drives on one ATA interface (master and slave),must I issue a command to one drive and wait until it's finished before I can do the same with the other drive?
I know about overlapped commands but do many drives support it? Do Linux and Windows support this feature?
Also, are ATA (not ATAPI) drives with removable media as rare as they seem to be? Is it worth supporting removable media in the ATA code?
read sector command
and then suddenly the timer issues a timer interrupt and then
schedules another thread
which want to read from slave drive on 0x1f0
[the other thread was left at lest say: rep insw]
the new thread will reconfigure 0x1f0 and start to read from slave drive
but when timer scheduels back the older thread
it will continue from rep insw [but what rep insw since 0x1f0 is one port !!!]
so it will get stucked !!!
you can not issue parallel things like that {unless they are atomic operations};
if the drives uses differrent slots (aka one is 0x1f0 and the other one is 0x170) then it's ok you can read from both of them at the same time (can use PIO/DMA/UDMA whatever)
thats why Serial ATA is better [but unfurtunatly harder to implement]
ps:sorry for any grammar mistakes