From 14b8820231a67ab4fc46c1eee56c17bfa9456db0 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 7 Jan 2025 19:52:42 -0500 Subject: [PATCH] ata: we shouldn't ry to do FLUSH_CACHE_EXT if HAVE_LBA48 is not defined Change-Id: Ic3da25a144bfd7ae41ee2e012a90e38aacac4df9 --- firmware/drivers/ata.c | 2 ++ 1 file changed, 2 insertions(+) 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 */