ata: we shouldn't ry to do FLUSH_CACHE_EXT if HAVE_LBA48 is not defined

Change-Id: Ic3da25a144bfd7ae41ee2e012a90e38aacac4df9
This commit is contained in:
Solomon Peachy 2025-01-07 19:52:42 -05:00
parent 8b01f939d8
commit 14b8820231

View file

@ -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 */