From nobody Sat Mar 16 15:16:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl871rxSz5F1Wx; Sat, 16 Mar 2024 15:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl866j5Nz4HC7; Sat, 16 Mar 2024 15:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iB1+hOlClMr6g/zJiKOMI2N9fm4g1Oz1P+t0234lWVg=; b=Pvuv66sTDaRqugN9FkGyY87QkXgvwGUZiWjUnd6PTSSLe9GKFzuyHbY68tx5bMGLAj/Uzo GvnOHeuhI1xJickMFqrd3K8YBZfjzvHW+aTKqSQWR+icBMAGm8N7TbqIfcv+SVaFPNcbb/ q+8H2lPYyOSIyLZo7i74KwcKW11tnRN/zTZD63l6BW+3/Xp0LhMFLeUp0+/pmAE5Qu2bQk QL+cVb66RDtne6+VoMPVBZy3fYrNNUYqFrjPFQ0wht98UM+i40rsXmggQ8Vj9F7IYHfiJj QWY/zyk4ZItuG/DmYXq1kuc8lTBVeOV9ijmHsvWqucXzF/hg1h7FTQIcYEoMNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602198; a=rsa-sha256; cv=none; b=WeAHtqW4qMDKKonFC8FmlVRcPw60LbwcMonKYiVbJn7gqFlz3131oL4F4VpqmKBhq09oQ8 NMgebsfS4WQKTUMcU4BUh+0uv7U64jQH8XIRI8BKd2xqc6vfvEY8ftmRbcEfI1Ia+q3Js3 nEjQgw2UE2S9BtbNjtPXUUrBLeF5VazdpMEcnYfvtunyr+bwRVCCmt0gQOj/m/EqvWLTzS sowND1gWeNDknKPksz9Metc+jS99dmu2+x0tS7fmcwWN7/fmAN9jV3TjsMNdSbFuEcjT3K UDLTPv2Xn4vet/QmRGwyMR67Wv9Puzw3gjZ6xYhRzqSjGBJj+6dI2hflnZOReA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iB1+hOlClMr6g/zJiKOMI2N9fm4g1Oz1P+t0234lWVg=; b=AAYPS3aeFDKwxpg/ioik59zYElFWMt6mglKaukNlMQ7aHO8rjRMXRt6GHjKs3JobE80Kjm /DueMty3lDWdyM+RuVsY9b0rn1Lz4qG+wOjONssEnmMfrQTIfUVJWSaknIh87RblEKMpzD 5wjPmkOoHXEXf8lG5PrPu1px4YIqthLdQm70dL988ibgoBFD7vlVdDycbtSrqtnFjyzMlS kw+wiyIY88nFCKPGamWSc9c2FdMRnLz4ejC22U5o3ExPqQK+YoDMgaVMubq2AH8VL3lsS7 N+Sw2RurS0/C+4GQka9oYZEcpSJzB9vevKaoH+Zn6qshlOgC2Xc3ZbrXy3BD/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Txl866KJNz10XV; Sat, 16 Mar 2024 15:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGcCC063095; Sat, 16 Mar 2024 15:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGci7063092; Sat, 16 Mar 2024 15:16:38 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:38 GMT Message-Id: <202403161516.42GFGci7063092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 4eab6e77fc2a - stable/13 - ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4eab6e77fc2a050e3da6bedcabb406f9596921d4 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=4eab6e77fc2a050e3da6bedcabb406f9596921d4 commit 4eab6e77fc2a050e3da6bedcabb406f9596921d4 Author: Andriy Gapon AuthorDate: 2024-02-19 10:08:12 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:13:42 +0000 ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs NCQ TRIM for Samsung 860/870 SSDs results in data corruption on systems with some SATA controllers. This can be easily reproduced using ZFS which uses TRIM and is able to detect block content changes. Linux bug report for this issue: https://bugzilla.kernel.org/show_bug.cgi?id=201693 Since at present we can not limit a quirk based on the contorller / SIM, apply the quirk in all cases. Reviewed by: imp (cherry picked from commit c01af41c3c8fdd570764ff9b6bfbad6ac9ca1664) --- sys/cam/ata/ata_da.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 359ece18960e..c5c567645166 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -726,6 +726,22 @@ static struct ada_quirk_entry ada_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 850*", "*" }, /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN }, + { + /* + * Samsung 860 SSDs + * 4k optimised, NCQ TRIM broken (normal TRIM fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 860*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { + /* + * Samsung 870 SSDs + * 4k optimised, NCQ TRIM broken (normal TRIM fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 870*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, { /* * Samsung SM863 Series SSDs (MZ7KM*)