summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-transport.c
diff options
context:
space:
mode:
authorArne Fitzenreiter <arne_f@ipfire.org>2015-07-15 13:54:36 +0200
committerTejun Heo <tj@kernel.org>2015-07-15 11:22:35 -0400
commit71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0 (patch)
treefff55c2f8b8c3fe96789dfe3880e8d22da0af0d7 /drivers/ata/libata-transport.c
parent08c85d2a599d967ede38a847f5594447b6100642 (diff)
downloadlinux-71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0.tar.bz2
libata: add ATA_HORKAGE_NOTRIM
Some devices lose data on TRIM whether queued or not. This patch adds a horkage to disable TRIM. tj: Collapsed unnecessary if() nesting. Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/ata/libata-transport.c')
-rw-r--r--drivers/ata/libata-transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
index d6c37bcd416d..e2d94972962d 100644
--- a/drivers/ata/libata-transport.c
+++ b/drivers/ata/libata-transport.c
@@ -569,6 +569,8 @@ show_ata_dev_trim(struct device *dev,
if (!ata_id_has_trim(ata_dev->id))
mode = "unsupported";
+ else if (ata_dev->horkage & ATA_HORKAGE_NOTRIM)
+ mode = "forced_unsupported";
else if (ata_dev->horkage & ATA_HORKAGE_NO_NCQ_TRIM)
mode = "forced_unqueued";
else if (ata_fpdma_dsm_supported(ata_dev))