]> git.baikalelectronics.ru Git - kernel.git/commit
ata: libata: add missing ata_identify_page_supported() calls
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 15 Nov 2021 03:47:26 +0000 (12:47 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 18 Nov 2021 05:34:19 +0000 (14:34 +0900)
commitc762f22b26743d5cc6f4a0e0a4cb13ae260a53ca
treefbf304aef210d612a739dd283a5164c6c516a055
parentffa9f9783b58577b83d7207ea89f5e2c66d9a65f
ata: libata: add missing ata_identify_page_supported() calls

ata_dev_config_ncq_prio() and ata_dev_config_devslp() both access pages
of the IDENTIFY DEVICE data log. Before calling ata_read_log_page(),
make sure to check for the existence of the IDENTIFY DEVICE data log and
of the log page accessed using ata_identify_page_supported(). This
avoids useless error messages from ata_read_log_page() and failures with
some LLDD scsi drivers using libsas.

Reported-by: Nikolay <knv418@gmail.com>
Cc: stable@kernel.org # 5.15
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Matthew Perkowski <mgperkow@gmail.com>
drivers/ata/libata-core.c