diff options
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index b245cbc09e..d82fb173cc 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -962,8 +962,8 @@ static int perform_soft_reset(void) | |||
962 | if (identify()) | 962 | if (identify()) |
963 | return -5; | 963 | return -5; |
964 | 964 | ||
965 | if (set_features()) | 965 | if ((ret = set_features())) |
966 | return -2; | 966 | return -60 + ret; |
967 | 967 | ||
968 | if (set_multiple_mode(multisectors)) | 968 | if (set_multiple_mode(multisectors)) |
969 | return -3; | 969 | return -3; |
@@ -1013,7 +1013,7 @@ static int ata_power_on(void) | |||
1013 | 1013 | ||
1014 | rc = set_features(); | 1014 | rc = set_features(); |
1015 | if (rc) | 1015 | if (rc) |
1016 | return rc * 10 - 2; | 1016 | return -60 + rc; |
1017 | 1017 | ||
1018 | if (set_multiple_mode(multisectors)) | 1018 | if (set_multiple_mode(multisectors)) |
1019 | return -3; | 1019 | return -3; |
@@ -1284,7 +1284,7 @@ int STORAGE_INIT_ATTR ata_init(void) | |||
1284 | goto error; | 1284 | goto error; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | rc = set_features(); | 1287 | rc = set_features(); // rror codes are between -1 and -49 |
1288 | if (rc) { | 1288 | if (rc) { |
1289 | rc = -60 + rc; | 1289 | rc = -60 + rc; |
1290 | goto error; | 1290 | goto error; |
@@ -1321,7 +1321,7 @@ int STORAGE_INIT_ATTR ata_init(void) | |||
1321 | } | 1321 | } |
1322 | rc = set_multiple_mode(multisectors); | 1322 | rc = set_multiple_mode(multisectors); |
1323 | if (rc) | 1323 | if (rc) |
1324 | rc = -70 + rc; | 1324 | rc = -100 + rc; |
1325 | 1325 | ||
1326 | error: | 1326 | error: |
1327 | mutex_unlock(&ata_mtx); | 1327 | mutex_unlock(&ata_mtx); |