mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
libata changes for 5.16-rc1, second round
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 (from me). * Remove unnecessary error message in sata_highbank driver (from Xu). * Better handling of accesses to the IDENTIFY DEVICE data log for drives that do not support this log page (from me). * Fix ahci_shost_attr_group declaration in ahci driver (from me). -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSRPv8tYSvhwAzJdzjdoc3SxdoYdgUCYY2zZQAKCRDdoc3SxdoY dtNPAQCJ0hcF/CpDOgL2Aaw4GmANrWLxmjkKRCf3zn+Ufu4AJQD/eCWCUDZbJJbZ JbGOY68y+pfU2peiO+CE/apFCsb+1wQ= =WgCT -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
204d32efa8
@ -131,7 +131,7 @@ const struct attribute_group *ahci_shost_groups[] = {
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ahci_shost_groups);
|
||||
|
||||
struct attribute *ahci_sdev_attrs[] = {
|
||||
static struct attribute *ahci_sdev_attrs[] = {
|
||||
&dev_attr_sw_activity.attr,
|
||||
&dev_attr_unload_heads.attr,
|
||||
&dev_attr_ncq_prio_supported.attr,
|
||||
|
@ -2052,8 +2052,19 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
|
||||
struct ata_port *ap = dev->link->ap;
|
||||
unsigned int err, i;
|
||||
|
||||
if (dev->horkage & ATA_HORKAGE_NO_ID_DEV_LOG)
|
||||
return false;
|
||||
|
||||
if (!ata_log_supported(dev, ATA_LOG_IDENTIFY_DEVICE)) {
|
||||
ata_dev_warn(dev, "ATA Identify Device Log not supported\n");
|
||||
/*
|
||||
* IDENTIFY DEVICE data log is defined as mandatory starting
|
||||
* with ACS-3 (ATA version 10). Warn about the missing log
|
||||
* for drives which implement this ATA level or above.
|
||||
*/
|
||||
if (ata_id_major_version(dev->id) >= 10)
|
||||
ata_dev_warn(dev,
|
||||
"ATA Identify Device Log not supported\n");
|
||||
dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,12 @@ static const unsigned long ata_eh_identify_timeouts[] = {
|
||||
ULONG_MAX,
|
||||
};
|
||||
|
||||
static const unsigned long ata_eh_revalidate_timeouts[] = {
|
||||
15000, /* Some drives are slow to read log pages when waking-up */
|
||||
15000, /* combined time till here is enough even for media access */
|
||||
ULONG_MAX,
|
||||
};
|
||||
|
||||
static const unsigned long ata_eh_flush_timeouts[] = {
|
||||
15000, /* be generous with flush */
|
||||
15000, /* ditto */
|
||||
@ -129,6 +135,8 @@ static const struct ata_eh_cmd_timeout_ent
|
||||
ata_eh_cmd_timeout_table[ATA_EH_CMD_TIMEOUT_TABLE_SIZE] = {
|
||||
{ .commands = CMDS(ATA_CMD_ID_ATA, ATA_CMD_ID_ATAPI),
|
||||
.timeouts = ata_eh_identify_timeouts, },
|
||||
{ .commands = CMDS(ATA_CMD_READ_LOG_EXT, ATA_CMD_READ_LOG_DMA_EXT),
|
||||
.timeouts = ata_eh_revalidate_timeouts, },
|
||||
{ .commands = CMDS(ATA_CMD_READ_NATIVE_MAX, ATA_CMD_READ_NATIVE_MAX_EXT),
|
||||
.timeouts = ata_eh_other_timeouts, },
|
||||
{ .commands = CMDS(ATA_CMD_SET_MAX, ATA_CMD_SET_MAX_EXT),
|
||||
|
@ -469,10 +469,8 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "no irq\n");
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
}
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -394,7 +394,7 @@ enum {
|
||||
/* This should match the actual table size of
|
||||
* ata_eh_cmd_timeout_table in libata-eh.c.
|
||||
*/
|
||||
ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6,
|
||||
ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 7,
|
||||
|
||||
/* Horkage types. May be set by libata or controller on drives
|
||||
(some horkage may be drive/controller pair dependent */
|
||||
@ -427,6 +427,7 @@ enum {
|
||||
ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */
|
||||
ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M */
|
||||
ATA_HORKAGE_NO_NCQ_ON_ATI = (1 << 27), /* Disable NCQ on ATI chipset */
|
||||
ATA_HORKAGE_NO_ID_DEV_LOG = (1 << 28), /* Identify device log missing */
|
||||
|
||||
/* DMA mask for user DMA control: User visible values; DO NOT
|
||||
renumber */
|
||||
|
Loading…
Reference in New Issue
Block a user