diff options
author | Arne Fitzenreiter <arne_f@ipfire.org> | 2015-07-15 13:54:36 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-07-15 11:22:35 -0400 |
commit | 71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0 (patch) | |
tree | fff55c2f8b8c3fe96789dfe3880e8d22da0af0d7 /drivers/ata/libata-scsi.c | |
parent | 08c85d2a599d967ede38a847f5594447b6100642 (diff) | |
download | blackbird-op-linux-71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0.tar.gz blackbird-op-linux-71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0.zip |
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-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3131adcc1f87..641a61a59e89 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2568,7 +2568,8 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) rbuf[14] = (lowest_aligned >> 8) & 0x3f; rbuf[15] = lowest_aligned; - if (ata_id_has_trim(args->id)) { + if (ata_id_has_trim(args->id) && + !(dev->horkage & ATA_HORKAGE_NOTRIM)) { rbuf[14] |= 0x80; /* LBPME */ if (ata_id_has_zero_after_trim(args->id) && |