Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Oct 2017 19:53:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 222802] [patch] QUIRK: KingDian S200 SSD which crashes when receiving a TRIM command
Message-ID:  <bug-222802-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222802

            Bug ID: 222802
           Summary: [patch] QUIRK: KingDian S200 SSD which crashes when
                    receiving a TRIM command
           Product: Base System
           Version: 10.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: bsdpr@phoe.frmug.org
          Keywords: patch

Created attachment 186926
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D186926&action=
=3Dedit
KingDian S200 quirk preventing the kernel from issuing TRIM commands

Inexpensive KingDian SATA SSDs are experiencing failures when issued a TRIM
command. This can be observed when adding such a device as part of a zpool.
Kernel reports a timeout on the TRIM command; then a timeout on the INQUIRY
command; them the device reapears. It looks the SSD is crashing. The comman=
d is
retried, the SSD crash again, etc.

The device identifies itself as

ada1: <KingDian S200 60GB P0921B> ACS-2 ATA SATA 3.x device
ada1: Serial Number <elided>
ada1: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 512bytes)
ada1: 57241MB (117231408 512 byte sectors)

I was unable to keep track of the error messages as the system is unrespons=
ive
while he tries to handle this situation which ultimately require powering t=
he
host off to recover control.

To resolve this I had to add a new kind of quirk to ata_da.c, I called it
NO_TRIM. It simply clears the device's CAN_TRIM flag. When the quirk is in
effect for that device it can then succesfully be used as part of a zpool.

The quirk is applied to devices matching the "KingDian S200 *" pattern, the=
re
is currently two models in that line only differing in capacity: 60 and 120=
 GB.
See
http://web.archive.org/web/20171005194459/https://www.king-dian.com/product=
-category/sata/s200/

The attached diff was made against svn revision 323189.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222802-8>