summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2025-01-07 19:52:42 -0500
committerSolomon Peachy <pizza@shaftnet.org>2025-01-07 19:53:20 -0500
commit14b8820231a67ab4fc46c1eee56c17bfa9456db0 (patch)
treec04c125806959f72f2576d93fb1ae8d55419e5b1
parent8b01f939d8bf9d77fb3c4b0ca984e89bb65fe864 (diff)
downloadrockbox-14b8820231.tar.gz
rockbox-14b8820231.zip
ata: we shouldn't ry to do FLUSH_CACHE_EXT if HAVE_LBA48 is not defined
Change-Id: Ic3da25a144bfd7ae41ee2e012a90e38aacac4df9
-rw-r--r--firmware/drivers/ata.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 2baa444762..8bbbe1a130 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -245,8 +245,10 @@ static int ata_perform_flush_cache(void)
if (!canflush) {
return 0;
+#ifdef HAVE_LBA48
} else if (ata_lba48 && identify_info[83] & (1 << 13)) {
cmd = CMD_FLUSH_CACHE_EXT; /* Flag, optional, ATA-6 and up, for use with LBA48 devices */
+#endif
} else if (identify_info[83] & (1 << 12)) {
cmd = CMD_FLUSH_CACHE; /* Flag, mandatory, ATA-6 and up */
} else if (identify_info[80] >= (1 << 5)) { /* Use >= instead of '&' because bits lower than the latest standard we support don't have to be set */