Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'libata-5.16-rc1-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata

Pull more libata updates from Damien Le Moal:
"Second round of updates for libata for 5.16:

- Fix READ LOG EXT and READ LOG DMA EXT command timeouts during disk
revalidation after a resume or a modprobe of the LLDD (me)

- Remove unnecessary error message in sata_highbank driver (Xu)

- Better handling of accesses to the IDENTIFY DEVICE data log for
drives that do not support this log page (me)

- Fix ahci_shost_attr_group declaration in ahci driver (me)"

* tag 'libata-5.16-rc1-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
libata: libahci: declare ahci_shost_attr_group as static
libata: add horkage for missing Identify Device log
ata: sata_highbank: Remove unnecessary print function dev_err()
libata: fix read log timeout value

+24 -6
+1 -1
drivers/ata/libahci.c
··· 131 131 }; 132 132 EXPORT_SYMBOL_GPL(ahci_shost_groups); 133 133 134 - struct attribute *ahci_sdev_attrs[] = { 134 + static struct attribute *ahci_sdev_attrs[] = { 135 135 &dev_attr_sw_activity.attr, 136 136 &dev_attr_unload_heads.attr, 137 137 &dev_attr_ncq_prio_supported.attr,
+12 -1
drivers/ata/libata-core.c
··· 2052 2052 struct ata_port *ap = dev->link->ap; 2053 2053 unsigned int err, i; 2054 2054 2055 + if (dev->horkage & ATA_HORKAGE_NO_ID_DEV_LOG) 2056 + return false; 2057 + 2055 2058 if (!ata_log_supported(dev, ATA_LOG_IDENTIFY_DEVICE)) { 2056 - ata_dev_warn(dev, "ATA Identify Device Log not supported\n"); 2059 + /* 2060 + * IDENTIFY DEVICE data log is defined as mandatory starting 2061 + * with ACS-3 (ATA version 10). Warn about the missing log 2062 + * for drives which implement this ATA level or above. 2063 + */ 2064 + if (ata_id_major_version(dev->id) >= 10) 2065 + ata_dev_warn(dev, 2066 + "ATA Identify Device Log not supported\n"); 2067 + dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG; 2057 2068 return false; 2058 2069 } 2059 2070
+8
drivers/ata/libata-eh.c
··· 93 93 ULONG_MAX, 94 94 }; 95 95 96 + static const unsigned long ata_eh_revalidate_timeouts[] = { 97 + 15000, /* Some drives are slow to read log pages when waking-up */ 98 + 15000, /* combined time till here is enough even for media access */ 99 + ULONG_MAX, 100 + }; 101 + 96 102 static const unsigned long ata_eh_flush_timeouts[] = { 97 103 15000, /* be generous with flush */ 98 104 15000, /* ditto */ ··· 135 129 ata_eh_cmd_timeout_table[ATA_EH_CMD_TIMEOUT_TABLE_SIZE] = { 136 130 { .commands = CMDS(ATA_CMD_ID_ATA, ATA_CMD_ID_ATAPI), 137 131 .timeouts = ata_eh_identify_timeouts, }, 132 + { .commands = CMDS(ATA_CMD_READ_LOG_EXT, ATA_CMD_READ_LOG_DMA_EXT), 133 + .timeouts = ata_eh_revalidate_timeouts, }, 138 134 { .commands = CMDS(ATA_CMD_READ_NATIVE_MAX, ATA_CMD_READ_NATIVE_MAX_EXT), 139 135 .timeouts = ata_eh_other_timeouts, }, 140 136 { .commands = CMDS(ATA_CMD_SET_MAX, ATA_CMD_SET_MAX_EXT),
+1 -3
drivers/ata/sata_highbank.c
··· 469 469 } 470 470 471 471 irq = platform_get_irq(pdev, 0); 472 - if (irq < 0) { 473 - dev_err(dev, "no irq\n"); 472 + if (irq < 0) 474 473 return irq; 475 - } 476 474 if (!irq) 477 475 return -EINVAL; 478 476
+2 -1
include/linux/libata.h
··· 394 394 /* This should match the actual table size of 395 395 * ata_eh_cmd_timeout_table in libata-eh.c. 396 396 */ 397 - ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, 397 + ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 7, 398 398 399 399 /* Horkage types. May be set by libata or controller on drives 400 400 (some horkage may be drive/controller pair dependent */ ··· 427 427 ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */ 428 428 ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */ 429 429 ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */ 430 + ATA_HORKAGE_NO_ID_DEV_LOG = (1 << 28), /* Identify device log missing */ 430 431 431 432 /* DMA mask for user DMA control: User visible values; DO NOT 432 433 renumber */