Skip to content

Commit

Permalink
Support WIN_CHECKPOWERMODE1 outputs 0x80-0x83
Browse files Browse the repository at this point in the history
These are idle state variants, so treat them the same way as 0xFF.

See vitlav#13
  • Loading branch information
henryptung authored Sep 5, 2024
1 parent 6740688 commit 601f4a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/atacmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ enum e_powermode ata_get_powermode(int device) {
state = PWM_UNKNOWN;
else
state = PWM_SLEEPING;
} else if (args[2] == 0xFF || (args[2] & 0xFC) == 0x80) {
state = PWM_ACTIVE;
} else {
state = ( (args[2] == 0xFF) ? PWM_ACTIVE : PWM_STANDBY );
state = PWM_STANDBY;
}

return state;
Expand Down

0 comments on commit 601f4a5

Please sign in to comment.