* Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree
@ 2015-07-30 0:47 gregkh
2015-07-30 21:30 ` arne_f
0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2015-07-30 0:47 UTC (permalink / raw)
To: arne_f, gregkh, tj; +Cc: stable, stable-commits
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.14-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.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc Mon Sep 17 00:00:00 2001
From: Arne Fitzenreiter <arne_f@ipfire.org>
Date: Wed, 15 Jul 2015 13:54:37 +0200
Subject: libata: force disable trim for SuperSSpeed S238
From: Arne Fitzenreiter <arne_f@ipfire.org>
commit cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc upstream.
This device loses blocks, often the partition table area, on trim.
Disable TRIM.
http://pcengines.ch/msata16a.htm
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ata/libata-core.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4230,6 +4230,9 @@ static const struct ata_blacklist_entry
{ "Micron_M550*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
{ "Crucial_CT*M550SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
+ /* 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 arne_f@ipfire.org are
queue-3.14/libata-force-disable-trim-for-supersspeed-s238.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree
2015-07-30 0:47 Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree gregkh
@ 2015-07-30 21:30 ` arne_f
2015-07-30 22:18 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: arne_f @ 2015-07-30 21:30 UTC (permalink / raw)
To: gregkh; +Cc: tj, stable, stable-commits
[-- Attachment #1: Type: text/plain, Size: 2181 bytes --]
this patch depends on:
libata: add ATA_HORKAGE_NOTRIM
commit 71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0 upstream.
which not apply to 3.14.y
attached is the patch for 3.14.y
Arne
On 2015-07-30 02:47, gregkh@linuxfoundation.org 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.14-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.14 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable
> tree,
> please let <stable@vger.kernel.org> know about it.
>
>
> From cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc Mon Sep 17 00:00:00 2001
> From: Arne Fitzenreiter <arne_f@ipfire.org>
> Date: Wed, 15 Jul 2015 13:54:37 +0200
> Subject: libata: force disable trim for SuperSSpeed S238
>
> From: Arne Fitzenreiter <arne_f@ipfire.org>
>
> commit cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc upstream.
>
> This device loses blocks, often the partition table area, on trim.
> Disable TRIM.
> http://pcengines.ch/msata16a.htm
>
> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
> drivers/ata/libata-core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -4230,6 +4230,9 @@ static const struct ata_blacklist_entry
> { "Micron_M550*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
> { "Crucial_CT*M550SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
>
> + /* 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 arne_f@ipfire.org
> are
>
> queue-3.14/libata-force-disable-trim-for-supersspeed-s238.patch
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-libata-add-ATA_HORKAGE_NOTRIM.patch --]
[-- Type: text/x-diff; name=0001-libata-add-ATA_HORKAGE_NOTRIM.patch, Size: 1641 bytes --]
From 7781a141e0b594c1f4763e37daea733105c73350 Mon Sep 17 00:00:00 2001
From: Arne Fitzenreiter <arne_f@ipfire.org>
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.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
---
drivers/ata/libata-scsi.c | 3 ++-
include/linux/libata.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index ef8567d..6fecf0b 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -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))
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b84e786..bcb6e17 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -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 */
--
2.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree
2015-07-30 21:30 ` arne_f
@ 2015-07-30 22:18 ` Greg KH
2015-07-30 22:23 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2015-07-30 22:18 UTC (permalink / raw)
To: arne_f; +Cc: tj, stable, stable-commits
On Thu, Jul 30, 2015 at 11:30:42PM +0200, arne_f wrote:
> this patch depends on:
>
> libata: add ATA_HORKAGE_NOTRIM
>
> commit 71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0 upstream.
>
> which not apply to 3.14.y
Which is why I ended up dropped it.
> attached is the patch for 3.14.y
Thanks, but I'll just leave this out, 3.14 is over a year old, I
recommend just using a newer kernel.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree
2015-07-30 22:18 ` Greg KH
@ 2015-07-30 22:23 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2015-07-30 22:23 UTC (permalink / raw)
To: arne_f; +Cc: tj, stable, stable-commits
On Thu, Jul 30, 2015 at 03:18:59PM -0700, Greg KH wrote:
> On Thu, Jul 30, 2015 at 11:30:42PM +0200, arne_f wrote:
> > this patch depends on:
> >
> > libata: add ATA_HORKAGE_NOTRIM
> >
> > commit 71d126fd28de2d4d9b7b2088dbccd7ca62fad6e0 upstream.
> >
> > which not apply to 3.14.y
>
> Which is why I ended up dropped it.
>
> > attached is the patch for 3.14.y
>
> Thanks, but I'll just leave this out, 3.14 is over a year old, I
> recommend just using a newer kernel.
Ah, but this is fixing up broken hardware.
ugh, thanks for the backports, I'll take them and the original patches
now, stupid hardware manufacturers....
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree
@ 2015-07-31 0:02 gregkh
0 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2015-07-31 0:02 UTC (permalink / raw)
To: arne_f, gregkh, tj; +Cc: stable, stable-commits
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.14-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.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc Mon Sep 17 00:00:00 2001
From: Arne Fitzenreiter <arne_f@ipfire.org>
Date: Wed, 15 Jul 2015 13:54:37 +0200
Subject: libata: force disable trim for SuperSSpeed S238
From: Arne Fitzenreiter <arne_f@ipfire.org>
commit cda57b1b05cf7b8b99ab4b732bea0b05b6c015cc upstream.
This device loses blocks, often the partition table area, on trim.
Disable TRIM.
http://pcengines.ch/msata16a.htm
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ata/libata-core.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4230,6 +4230,9 @@ static const struct ata_blacklist_entry
{ "Micron_M550*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
{ "Crucial_CT*M550SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
+ /* 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 arne_f@ipfire.org are
queue-3.14/libata-force-disable-trim-for-supersspeed-s238.patch
queue-3.14/libata-add-ata_horkage_notrim.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-31 0:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30 0:47 Patch "libata: force disable trim for SuperSSpeed S238" has been added to the 3.14-stable tree gregkh
2015-07-30 21:30 ` arne_f
2015-07-30 22:18 ` Greg KH
2015-07-30 22:23 ` Greg KH
2015-07-31 0:02 gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).