summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-10-23 14:16:15 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-10-31 12:51:54 -0400
commite829ea9a5ea05c6dedd91f741f91cb8723e50b19 (patch)
treebb554a4ec31b3b5501189993de990d2419306c2f /apps/debug_menu.c
parent825e4069655065ffd49bcc9ec64b53f1225e8186 (diff)
downloadrockbox-e829ea9a5ea05c6dedd91f741f91cb8723e50b19.tar.gz
rockbox-e829ea9a5ea05c6dedd91f741f91cb8723e50b19.zip
ata: Rework how flushing, sleeping, and power off interacts
* FLUSH_EXT is used if featureflag is set and we are using LBA48 (unconditionally used for CE-ATA on ipod6g) * FLUSH is used if featureflag is set (ATA6+) or if device claims to be ATA5+ * Rename ata_disk_can_power_off() to ata_disk_can_sleep() as that is what it actually tests for. Only use it to gate issuing the STANDBY IMMEDIATE command. * Restore behavior of ata_disk_is_active() to return 1 if drive is "spinning" or powered up. * Allow poweroff if drive claims PM support OR we are able to issue FLUSH/FLUSH_EXT commands. * Added ata_flush() to explicitly trigger a flush operation, and hook it up to storage_flush() in the device shutdown path. (Flushes were only previously used in the storage device power management path) * After issuing all settings, re-issue IDENTIFY_DEVICE to make sure it reflects everything we've enabled. * Update manual section on Flash/SSD mods. Change-Id: I6770a54ef3a87f4c47120bcb96c944a6652f1bf4
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 57c51e7b54..6f30d00d49 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1481,6 +1481,8 @@ static int disk_callback(int btn, struct gui_synclist *lists)
1481 i = identify_info[83] & (1<<9); 1481 i = identify_info[83] & (1<<9);
1482 simplelist_addline( 1482 simplelist_addline(
1483 "Noise mgmt: %s", i ? "enabled" : "unsupported"); 1483 "Noise mgmt: %s", i ? "enabled" : "unsupported");
1484 simplelist_addline(
1485 "Flush cache: %s", identify_info[83] & (1<<13) ? "extended" : identify_info[83] & (1<<12) ? "standard" : identify_info[80] >= (1<<5) ? "ATA-5" : "unsupported");
1484 i = identify_info[82] & (1<<6); 1486 i = identify_info[82] & (1<<6);
1485 simplelist_addline( 1487 simplelist_addline(
1486 "Read-ahead: %s", i ? "enabled" : "unsupported"); 1488 "Read-ahead: %s", i ? "enabled" : "unsupported");