ata fix for 6.18-rc2

- Do not print an error message (and assume that the General Purpose Log
    Directory log page is not supported) for a device that reports a bogus
    General Purpose Logging Version. Unsurprisingly, many vendors fail to
    report the only valid General Purpose Logging Version (Damien)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRN+ES/c4tHlMch3DzJZDGjmcZNcgUCaPC/sQAKCRDJZDGjmcZN
 civcAQC907dUQ2h0gQnn3R7dJ9n/uT0W2kcJKKYg/fWETq3/SAD9HSt1pRvS0jGc
 EsINTxnyY+cx0UKfypFwiAxDR+J0wAg=
 =Zr75
 -----END PGP SIGNATURE-----

Merge tag 'ata-6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fix from Niklas Cassel:

 - Do not print an error message (and assume that the General Purpose
   Log Directory log page is not supported) for a device that reports a
   bogus General Purpose Logging Version.

   Unsurprisingly, many vendors fail to report the only valid General
   Purpose Logging Version (Damien)

* tag 'ata-6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libata-core: relax checks in ata_read_log_directory()
This commit is contained in:
Linus Torvalds 2025-10-16 09:39:29 -07:00
commit ef25485516
2 changed files with 10 additions and 7 deletions

View File

@ -2174,13 +2174,10 @@ static int ata_read_log_directory(struct ata_device *dev)
}
version = get_unaligned_le16(&dev->gp_log_dir[0]);
if (version != 0x0001) {
ata_dev_err(dev, "Invalid log directory version 0x%04x\n",
version);
ata_clear_log_directory(dev);
dev->quirks |= ATA_QUIRK_NO_LOG_DIR;
return -EINVAL;
}
if (version != 0x0001)
ata_dev_warn_once(dev,
"Invalid log directory version 0x%04x\n",
version);
return 0;
}

View File

@ -1594,6 +1594,12 @@ do { \
#define ata_dev_dbg(dev, fmt, ...) \
ata_dev_printk(debug, dev, fmt, ##__VA_ARGS__)
#define ata_dev_warn_once(dev, fmt, ...) \
pr_warn_once("ata%u.%02u: " fmt, \
(dev)->link->ap->print_id, \
(dev)->link->pmp + (dev)->devno, \
##__VA_ARGS__)
static inline void ata_print_version_once(const struct device *dev,
const char *version)
{