Skip to content

Commit dc8b4af

Browse files
mlauss2htejun
authored andcommitted
ata: ahci: don't mark HotPlugCapable Ports as external/removable
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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Fixes: 8a3e33c ("ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior) Link: http://lkml.kernel.org/g/[email protected] Cc: [email protected] #v4.4+
1 parent d243bed commit dc8b4af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/ata/libahci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,7 @@ static void ahci_port_init(struct device *dev, struct ata_port *ap,
11681168

11691169
/* mark esata ports */
11701170
tmp = readl(port_mmio + PORT_CMD);
1171-
if ((tmp & PORT_CMD_HPCP) ||
1172-
((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)))
1171+
if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS))
11731172
ap->pflags |= ATA_PFLAG_EXTERNAL;
11741173
}
11751174

0 commit comments

Comments
 (0)