]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ata: libata-core: relax checks in ata_read_log_directory()
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 9 Oct 2025 10:46:00 +0000 (19:46 +0900)
committerNiklas Cassel <cassel@kernel.org>
Mon, 13 Oct 2025 07:12:36 +0000 (09:12 +0200)
commit12d724f2852d094d68dccaf5101e0ef89a971cde
tree1cf11515095c37fa0af75c773742b46bad0e4b2a
parent3a8660878839faadb4f1a6dd72c3179c1df56787
ata: libata-core: relax checks in ata_read_log_directory()

Commit 6d4405b16d37 ("ata: libata-core: Cache the general purpose log
directory") introduced caching of a device general purpose log directory
to avoid repeated access to this log page during device scan. This
change also added a check on this log page to verify that the log page
version is 0x0001 as mandated by the ACS specifications.

And it turns out that some devices do not bother reporting this version,
instead reporting a version 0, resulting in error messages such as:

ata6.00: Invalid log directory version 0x0000

and to the device being marked as not supporting the general purpose log
directory log page.

Since before commit 6d4405b16d37 the log page version check did not
exist and things were still working correctly for these devices, relax
ata_read_log_directory() version check and only warn about the invalid
log page version number without disabling access to the log directory
page.

Fixes: 6d4405b16d37 ("ata: libata-core: Cache the general purpose log directory")
Cc: stable@vger.kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220635
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-core.c
include/linux/libata.h