Page 1 of 1
ATA Locking
Posted: Sat Jul 30, 2005 2:20 am
by giszo
Hi!
I have the following question with ATA driver:
Before i want to read from an ATA device i have to select the device, right? Is it possible to lock only that drive what i want to read or should i lock the full channel not to possible to read from the other drive on the same channel?
Re:ATA Locking
Posted: Sun Jul 31, 2005 4:20 am
by Pype.Clicker
hmm .. sorry, but i got confused here ... what do you mean by "locking" an ATA disk ? okay for locking/unlocking ATAPI cdroms, but ATA disks ??? or did i miss something ::)
Re:ATA Locking
Posted: Sun Jul 31, 2005 6:08 am
by giszo
I mean for example a mutex. When i want to read/write an ATA device i lock it with a mutex, so only one thread can access it
But is it good if i lock only that device what i use or should i lock the full channel? ... I thought about it a little and i have some ideas. So... If i got an IDE irq from a channel what has 2 devices i don't know which device sent it... but if i lock the full channel when i access a device i'll know which device did it
Re:ATA Locking
Posted: Tue Aug 02, 2005 3:26 pm
by Pype.Clicker
personnally, i'd lock the controller, and not only the drive. Since some registers of the controller are shared by both drive (e.g. the sector register, etc) and since the IRQ is controller-specific and not drive-specific, allowing interleaving of a request for master and slave controller could lead to situation i prefer not thinking of ...
Re:ATA Locking
Posted: Wed Aug 03, 2005 2:20 am
by giszo
Okey.. Thanx... I also thought that