Use mutex and semaphore for ata driver