diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 1dd05133fe..4f4fb4c9b3 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -956,6 +956,8 @@ int ata_hard_reset(void) { int ret; + mutex_lock(&ata_mtx); + ata_reset(); /* state HRR2 */ @@ -965,6 +967,8 @@ int ata_hard_reset(void) /* Massage the return code so it is 0 on success and -1 on failure */ ret = ret?0:-1; + mutex_unlock(&ata_mtx); + return ret; }