aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@gmail.com>2016-02-27 16:10:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-09 15:34:52 -0800
commita55479ab637cda5ebbfdb9eb7c062bd99c13d5d9 (patch)
tree207d9b03a9e3d04959f30fa8f1cd435a30ba0b04
parentaf2d87aeac4fac50bcb5e0cf5a7d37edc72fed1f (diff)
downloadhikey-clang-a55479ab637cda5ebbfdb9eb7c062bd99c13d5d9.tar.gz
ata: ahci: don't mark HotPlugCapable Ports as external/removable
commit dc8b4afc4a04fac8ee55a19b59f2356a25e7e778 upstream. The HPCP bit is set by bioses for on-board sata ports either because they think sata is hotplug capable in general or to allow Windows to display a "device eject" icon on ports which are routed to an external connector bracket. However in Redhat Bugzilla #1310682, users report that with kernel 4.4, where this bit test first appeared, a lot of partitions on sata drives are now mounted automatically. This patch should fix redhat and a lot of other distros which unconditionally automount all devices which have the "removable" bit set. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Fixes: 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior) Link: http://lkml.kernel.org/g/56CF35FA.1070500@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/ata/libahci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 1f225cc1827f..998c6a85ad89 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1142,8 +1142,7 @@ static void ahci_port_init(struct device *dev, struct ata_port *ap,
/* mark esata ports */
tmp = readl(port_mmio + PORT_CMD);
- if ((tmp & PORT_CMD_HPCP) ||
- ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)))
+ if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS))
ap->pflags |= ATA_PFLAG_EXTERNAL;
}