]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ata: libata: Print device quirks only once
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 1 Aug 2024 09:04:22 +0000 (18:04 +0900)
committerDamien Le Moal <dlemoal@kernel.org>
Fri, 2 Aug 2024 00:29:55 +0000 (09:29 +0900)
commitbf1807c6ee1f66608c7835f6f9d9139c9c477942
tree18162cb5508fe55efe223a58af25b77e13f43545
parentb40824500eaa77668026b6d1ade6924901a680f9
ata: libata: Print device quirks only once

In ata_dev_print_quirks(), return early if ata_dev_print_info() returns
false or if we already printed quirk information. This is to avoid
printing a device quirks multiple times (that is, each time
ata_dev_revalidate() is called).

To remember if ata_dev_print_quirks() was already executed, define the
EH context flag ATA_EHI_DID_PRINT_QUIRKS and set this flag in
ata_dev_print_quirks().

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 58157d607aec ("ata: libata: Print quirks applied to devices")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/ata/libata-core.c
include/linux/libata.h