ata: ahci: don't mark HotPlugCapable Ports as external/removable
authorManuel Lauss <[email protected]>
Sat, 27 Feb 2016 15:10:05 +0000 (16:10 +0100)
committerTejun Heo <[email protected]>
Mon, 29 Feb 2016 21:17:57 +0000 (16:17 -0500)
commitdc8b4afc4a04fac8ee55a19b59f2356a25e7e778
treef6fdc637a89ad3e4eda0cf93271ced61e0262248
parentd243bed32f5042582896237f88fa1798aee55ff9
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: 8a3e33cf92c7 ("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+
drivers/ata/libahci.c