Skip to content

Commit ef25485

Browse files
committed
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()
2 parents 7ea3095 + 12d724f commit ef25485

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

drivers/ata/libata-core.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,13 +2174,10 @@ static int ata_read_log_directory(struct ata_device *dev)
21742174
}
21752175

21762176
version = get_unaligned_le16(&dev->gp_log_dir[0]);
2177-
if (version != 0x0001) {
2178-
ata_dev_err(dev, "Invalid log directory version 0x%04x\n",
2179-
version);
2180-
ata_clear_log_directory(dev);
2181-
dev->quirks |= ATA_QUIRK_NO_LOG_DIR;
2182-
return -EINVAL;
2183-
}
2177+
if (version != 0x0001)
2178+
ata_dev_warn_once(dev,
2179+
"Invalid log directory version 0x%04x\n",
2180+
version);
21842181

21852182
return 0;
21862183
}

include/linux/libata.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,12 @@ do { \
15941594
#define ata_dev_dbg(dev, fmt, ...) \
15951595
ata_dev_printk(debug, dev, fmt, ##__VA_ARGS__)
15961596

1597+
#define ata_dev_warn_once(dev, fmt, ...) \
1598+
pr_warn_once("ata%u.%02u: " fmt, \
1599+
(dev)->link->ap->print_id, \
1600+
(dev)->link->pmp + (dev)->devno, \
1601+
##__VA_ARGS__)
1602+
15971603
static inline void ata_print_version_once(const struct device *dev,
15981604
const char *version)
15991605
{

0 commit comments

Comments
 (0)