diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2024-07-18 16:54:03 +0900 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2024-07-30 07:10:05 +0900 |
commit | 58157d607aecb4e05ab793408038b014c84e466f (patch) | |
tree | 4ea0de1cc05edf739209640301ff819e9f97eb22 /drivers/ata/libata-pmp.c | |
parent | 7ebd8c5acad5f8ca41f37b36dc62570e1fa13d8b (diff) |
ata: libata: Print quirks applied to devices
Introduce the function ata_dev_print_quirks() to print the quirk flags
that will be applied to a scanned device. This new function is called
from ata_dev_quirks() when a match on a device model or device model
and revision is found for a device in the __ata_dev_quirks array.
To implement this function, the ATA_QUIRK_ flags are redefined using
the new enum ata_quirk which defines the bit shift for each quirk
flag. The array of strings ata_quirk_names is used to define the name
of each flag, which are printed by ata_dev_print_quirks().
Example output for a device listed in the __ata_dev_quirks array and
which has the ATA_QUIRK_DISABLE flag applied:
[10193.461270] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[10193.469190] ata1.00: Model 'ASMT109x- Config', rev '2143 5', applying quirks: disable
[10193.469195] ata1.00: unsupported device, disabling
[10193.481564] ata1.00: disable device
enum ata_quirk also defines the __ATA_QUIRK_MAX value as one plus the
last quirk flag defined. This value is used in ata_dev_quirks() to add a
build time check that all quirk flags fit within the unsigned int
(32-bits) quirks field of struct ata_device.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata/libata-pmp.c')
0 files changed, 0 insertions, 0 deletions