forked from len0rd/rockbox
ata_hard_reset should be synchronized.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17397 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6edb95d050
commit
35e7b25472
1 changed files with 4 additions and 0 deletions
|
|
@ -956,6 +956,8 @@ int ata_hard_reset(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
mutex_lock(&ata_mtx);
|
||||||
|
|
||||||
ata_reset();
|
ata_reset();
|
||||||
|
|
||||||
/* state HRR2 */
|
/* 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 */
|
/* Massage the return code so it is 0 on success and -1 on failure */
|
||||||
ret = ret?0:-1;
|
ret = ret?0:-1;
|
||||||
|
|
||||||
|
mutex_unlock(&ata_mtx);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue