FreeBSD Bugzilla – Attachment 187849 Details for
Bug 222802
[patch] QUIRK: KingDian S200 SSD which crashes when receiving a TRIM command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Same patch for 11-STABLE
KingDian-S200-quirk-11-STABLE.diff (text/plain), 1.33 KB, created by
Bertrand Petit
on 2017-11-08 11:10:58 UTC
(
hide
)
Description:
Same patch for 11-STABLE
Filename:
MIME Type:
Creator:
Bertrand Petit
Created:
2017-11-08 11:10:58 UTC
Size:
1.33 KB
patch
obsolete
>diff -r 3b441cf9505f sys/cam/ata/ata_da.c >--- a/sys/cam/ata/ata_da.c Sat Oct 14 02:55:24 2017 +0200 >+++ b/sys/cam/ata/ata_da.c Wed Nov 08 12:06:31 2017 +0100 >@@ -116,7 +116,8 @@ > ADA_Q_4K = 0x01, > ADA_Q_NCQ_TRIM_BROKEN = 0x02, > ADA_Q_LOG_BROKEN = 0x04, >- ADA_Q_SMR_DM = 0x08 >+ ADA_Q_SMR_DM = 0x08, >+ ADA_Q_NO_TRIM = 0x10 > } ada_quirks; > > #define ADA_Q_BIT_STRING \ >@@ -124,7 +125,8 @@ > "\0014K" \ > "\002NCQ_TRIM_BROKEN" \ > "\003LOG_BROKEN" \ >- "\004SMR_DM" >+ "\004SMR_DM" \ >+ "\005NO_TRIM" > > typedef enum { > ADA_CCB_RAHEAD = 0x01, >@@ -521,6 +523,14 @@ > }, > { > /* >+ * KingDian S200 60GB P0921B >+ * Trimming crash the SSD >+ */ >+ { T_DIRECT, SIP_MEDIA_FIXED, "*", "KingDian S200 *", "*" }, >+ /*quirks*/ADA_Q_NO_TRIM >+ }, >+ { >+ /* > * Kingston E100 Series SSDs > * 4k optimised & trim only works in 4k requests + 4k aligned > */ >@@ -1758,6 +1768,10 @@ > softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; > if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) > softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; >+ /* Device lies about TRIM capability. */ >+ if ((softc->quirks & ADA_Q_NO_TRIM) && >+ (softc->flags & ADA_FLAG_CAN_TRIM)) >+ softc->flags &= ~ADA_FLAG_CAN_TRIM; > if (softc->flags & ADA_FLAG_CAN_TRIM) { > softc->disk->d_flags |= DISKFLAG_CANDELETE; > softc->disk->d_delmaxsize = softc->params.secsize *
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222802
:
186926
| 187849