Commit ef254855 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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()
parents 7ea30958 12d724f2
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -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",
	if (version != 0x0001)
		ata_dev_warn_once(dev,
				  "Invalid log directory version 0x%04x\n",
				  version);
		ata_clear_log_directory(dev);
		dev->quirks |= ATA_QUIRK_NO_LOG_DIR;
		return -EINVAL;
	}

	return 0;
}
+6 −0
Original line number Diff line number Diff line
@@ -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)
{