diff options
author | Manuel Lauss <manuel.lauss@gmail.com> | 2015-09-30 21:10:25 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-09-30 17:37:55 -0400 |
commit | 8a3e33cf92c7b7ae25c589eccd1a69ab11cc4353 (patch) | |
tree | 5dd0856ad1213f3100101f7be901f682ca3ebf98 /drivers/ata/ahci.h | |
parent | a73f22f9811da0f69d5f04eadcfc87b4d6280814 (diff) | |
download | linux-stable-8a3e33cf92c7b7ae25c589eccd1a69ab11cc4353.tar.gz linux-stable-8a3e33cf92c7b7ae25c589eccd1a69ab11cc4353.tar.bz2 linux-stable-8a3e33cf92c7b7ae25c589eccd1a69ab11cc4353.zip |
ata: ahci: find eSATA ports and flag them as removable
If the AHCI ports' HPCP or ESP bits are set, the port
should be considered external (e.g. eSATA) and is marked
as removable. Userspace tools like udisks then treat it
like an usb drive.
With this patch applied, when I plug a drive into the esata port,
KDE pops up a window asking what to do with the drives(s), just
like it does for any random USB stick.
Removability is indicated to the upper layers by way of the
SCSI RMB bit, as I haven't found another way to signal
userspace to treat a sata disk like any usb stick.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci.h')
-rw-r--r-- | drivers/ata/ahci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 5b8e8a0fab48..45586c1dbbdc 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -181,6 +181,8 @@ enum { PORT_CMD_ALPE = (1 << 26), /* Aggressive Link PM enable */ PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */ PORT_CMD_FBSCP = (1 << 22), /* FBS Capable Port */ + PORT_CMD_ESP = (1 << 21), /* External Sata Port */ + PORT_CMD_HPCP = (1 << 18), /* HotPlug Capable Port */ PORT_CMD_PMP = (1 << 17), /* PMP attached */ PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */ PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */ |