Skip to content

Commit ac9f0c8

Browse files
glance-Damien Le Moal
authored andcommitted
ata: libata-core: Introduce ATA_HORKAGE_NO_LOG_DIR horkage
06f6c4c ("ata: libata: add missing ata_identify_page_supported() calls") introduced additional calls to ata_identify_page_supported(), thus also adding indirectly accesses to the device log directory log page through ata_log_supported(). Reading this log page causes SATADOM-ML 3ME devices to lock up. Introduce the horkage flag ATA_HORKAGE_NO_LOG_DIR to prevent accesses to the log directory in ata_log_supported() and add a blacklist entry with this flag for "SATADOM-ML 3ME" devices. Fixes: 636f6e2 ("libata: add horkage for missing Identify Device log") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
1 parent d052c5d commit ac9f0c8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

drivers/ata/libata-core.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,9 @@ static bool ata_log_supported(struct ata_device *dev, u8 log)
20072007
{
20082008
struct ata_port *ap = dev->link->ap;
20092009

2010+
if (dev->horkage & ATA_HORKAGE_NO_LOG_DIR)
2011+
return false;
2012+
20102013
if (ata_read_log_page(dev, ATA_LOG_DIRECTORY, 0, ap->sector_buf, 1))
20112014
return false;
20122015
return get_unaligned_le16(&ap->sector_buf[log * 2]) ? true : false;
@@ -4073,6 +4076,13 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
40734076
{ "WDC WD3000JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
40744077
{ "WDC WD3200JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
40754078

4079+
/*
4080+
* This sata dom device goes on a walkabout when the ATA_LOG_DIRECTORY
4081+
* log page is accessed. Ensure we never ask for this log page with
4082+
* these devices.
4083+
*/
4084+
{ "SATADOM-ML 3ME", NULL, ATA_HORKAGE_NO_LOG_DIR },
4085+
40764086
/* End Marker */
40774087
{ }
40784088
};

include/linux/libata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ enum {
380380
ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */
381381
ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */
382382
ATA_HORKAGE_NO_ID_DEV_LOG = (1 << 28), /* Identify device log missing */
383+
ATA_HORKAGE_NO_LOG_DIR = (1 << 29), /* Do not read log directory */
383384

384385
/* DMA mask for user DMA control: User visible values; DO NOT
385386
renumber */

0 commit comments

Comments
 (0)