Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.10-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
libata: force disable trim for SuperSSpeed S238
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
libata-force-disable-trim-for-supersspeed-s238.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
cda57b1b05cf7b8b99ab4b732bea0b05b6c015ccMon Sep 17 00:00:00 2001
From: Arne Fitzenreiter <[email protected]>
Date: Wed, 15 Jul 2015 13:54:37 +0200
Subject: libata: force disable trim for SuperSSpeed S238
From: Arne Fitzenreiter <[email protected]>
commit cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc upstream.
This device loses blocks, often the partition table area, on trim. Disable TRIM.
http://pcengines.ch/msata16a.htm
--- drivers/ata/libata-core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/ata/libata-core.c +3 -0
@@ -4201,6 +4201,9 @@ static const struct ata_blacklist_entry { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, +/* devices that don't properly handle TRIM commands */ + { "SuperSSpeed S238*", NULL, ATA_HORKAGE_NOTRIM, }, +/* * Some WD SATA-I drives spin up and down erratically when the link * is put into the slumber mode. We don't have full list of the
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/libata-force-disable-trim-for-supersspeed-s238.patch
this patch depends on:
libata: add ATA_HORKAGE_NOTRIM
commit 71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0 upstream.
which not apply to 3.10.y
attached is the patch for 3.14.y that can also used with fuzz for 3.10
Arne
Quoted 51 lines · On 2015-07-30 02:46, [email protected] wrote:
This is a note to let you know that I've just added the patch titled
libata: force disable trim for SuperSSpeed S238
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
libata-force-disable-trim-for-supersspeed-s238.patch
and it can be found in the queue-3.10 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From
cda57b1b05cf7b8b99ab4b732bea0b05b6c015ccMon Sep 17 00:00:00 2001
From: Arne Fitzenreiter <[email protected]>
Date: Wed, 15 Jul 2015 13:54:37 +0200
Subject: libata: force disable trim for SuperSSpeed S238From: Arne Fitzenreiter <[email protected]>
commit
cda57b1b05cf7b8b99ab4b732bea0b05b6c015ccupstream.This device loses blocks, often the partition table area, on trim. Disable TRIM.
http://pcengines.ch/msata16a.htmSigned-off-by Arne Fitzenreiter <[email protected]>Signed-off-by Tejun Heo <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/ata/libata-core.c | 3 +++ 1 file changed, 3 insertions(+)drivers/ata/libata-core.c +3
-0@@ -4201,6 +4201,9 @@ static const struct ata_blacklist_entry { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, +/* devices that don't properly handle TRIM commands */ + { "SuperSSpeed S238*", NULL, ATA_HORKAGE_NOTRIM, }, +/* * Some WD SATA-I drives spin up and down erratically when the link * is put into the slumber mode. We don't have full list of the
Quoted 3 lines
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/libata-force-disable-trim-for-supersspeed-s238.patch
From 7781a141e0b594c1f4763e37daea733105c73350 Mon Sep 17 00:00:00 2001
From: Arne Fitzenreiter <[email protected]>
Date: Wed, 15 Jul 2015 13:54:36 +0200
Subject: [PATCH] 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.
--- drivers/ata/libata-scsi.c | 3 ++- include/linux/libata.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/ata/libata-scsi.c +2 -1
@@ -2510,7 +2510,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 ;/* TPE */ if (ata_id_has_zero_after_trim (args->id))
include/linux/libata.h +1 -0
@@ -428,6 +428,7 @@ enum {ATA_HORKAGE_NO_NCQ_TRIM = (1 <<19 ),/* don't use queued TRIM */ ATA_HORKAGE_NOLPM = (1 <<20 ),/* don't use LPM */ ATA_HORKAGE_WD_BROKEN_LPM = (1 <<21 ),/* some WDs have broken LPM */ + ATA_HORKAGE_NOTRIM = (1 << 24), /* don't use TRIM *//* DMA mask for user DMA control: User visible values; DO NOT renumber */
Signature · 1 line
2.4.4