diff options
author | Niklas Cassel <cassel@kernel.org> | 2024-02-07 00:13:43 +0300 |
---|---|---|
committer | Niklas Cassel <cassel@kernel.org> | 2024-02-09 12:30:50 +0300 |
commit | 45b96d65ec68f625ad26ee16d2f556e29f715005 (patch) | |
tree | 6b93adc1dbe6e3cdf909d00d43113d9812fd1650 /drivers/ata/ahci.c | |
parent | f7131935238d00745638b826f8c31efc8d361435 (diff) | |
download | linux-45b96d65ec68f625ad26ee16d2f556e29f715005.tar.xz |
ata: ahci: a hotplug capable port is an external port
A hotplug capable port is an external port, so mark it as such.
We even say this ourselves in libata-scsi.c:
/* set scsi removable (RMB) bit per ata bit, or if the
* AHCI port says it's external (Hotplug-capable, eSATA).
*/
This also matches the terminology used in AHCI 1.3.1
(the keyword to search for is "externally accessible").
Tested-by: Damien Le Moal <dlemoal@kernel.org>
Tested-by: Jian-Hong Pan <jhp@endlessos.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index aa58ce615e79..4d3ec6d15ad1 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1648,9 +1648,10 @@ static void ahci_mark_external_port(struct ata_port *ap) void __iomem *port_mmio = ahci_port_base(ap); u32 tmp; - /* mark esata ports */ + /* mark external ports (hotplug-capable, eSATA) */ tmp = readl(port_mmio + PORT_CMD); - if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)) + if (((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)) || + (tmp & PORT_CMD_HPCP)) ap->pflags |= ATA_PFLAG_EXTERNAL; } |