]> git.baikalelectronics.ru Git - kernel.git/commit
libata: add horkage for missing Identify Device log
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 8 Nov 2021 23:45:25 +0000 (08:45 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 11 Nov 2021 23:05:17 +0000 (08:05 +0900)
commitafa6cde1be03347e65b18fe23722b8b8dc8828dc
tree6c1bc0f42863e9cc2af27f0899fa457afb216794
parente3befe83cf9a9e7ea354cab7eb23c2710771a968
libata: add horkage for missing Identify Device log

ACS-3 introduced the ATA Identify Device Data log as mandatory. A
warning message currently signals to the user if a device does not
report supporting this log page in the log directory page, regardless
of the ATA version of the device. Furthermore, this warning will appear
for all attempts at accessing this missing log page during device
revalidation.

Since it is useless to constantly access the log directory and warn
about this lack of support once we have discovered that the device
does not support this log page, introduce the horkage flag
ATA_HORKAGE_NO_ID_DEV_LOG to mark a device as lacking support for
the Identify Device Data log page. Set this flag when
ata_log_supported() returns false in ata_identify_page_supported().
The warning is printed only if the device ATA level is 10 or above
(ACS-3 or above), and only once on device scan. With this flag set, the
log directory page is not accessed again to test for Identify Device
Data log page support.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ata/libata-core.c
include/linux/libata.h