From nobody Sat Mar 16 15:16:15 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 4Txl7g3Z64z5F1HR; Sat, 16 Mar 2024 15:16:15 +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 4Txl7g24H2z4Fvh; Sat, 16 Mar 2024 15:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602175; 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=R/bPLA0Seq9ghF7eo1wS4XbR1q6FsBuN/VZVWqKsyL8=; b=o+EweDt4APCtfxBUi5+lbb5rXIarB8jKkaQzzO++TaaO12ojNav3emc59Di5l1/vS+F2m+ m91z0Q4mjaGO+02aZsbeCujh9wYG1fCTuw89wBQlxUA/bY6/XOfr4gpLI6QJ9PqA9xVIUq 5dVmvU38SJFRF+yJZLyqmLoxHU8k4jeTmxA18zhfJw+f7jQCOynetUnUS2wN6FGyihueCw 8UFvo5ODdQM6AQvzCh5VCJJ413aOikKdJyq6yk83huNYcULBdVVHkgbRue+IB/Kb1FCDYe c3b3wPgbX2m4XiP8Ugu6vAs+sIzA2/luS1klNAXlbVd7jjpqyA01gSGQcfsnqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602175; a=rsa-sha256; cv=none; b=bev0gJzEOxRiTcA9/av/12f462vL1k49nmeOeZZhCvCFef7gX50/gcPQeK4V6qR6eJEAuC gJXIbI3XK4B3H0tJKIybz6UBbtiFWJAt0OJPeMe4veoSRvqPVJOx5qmuMndehnXJtBT20d Ms6wqWTMIEUkdHhk9yOPn9c9jDIPNof0n9uZl55KGgkFUA12pJfJgORsOL5N1qU91IlWbk LQGqOZ6hkyKWnfh1DdKJ+/3o21MxBonlRIlMB0yfHBkGKHbaHOeL34nwMX1KGUlpYb63n7 k4ruASs5Q39wupLQhhx13SO6j/sMeNPOI695mKniM8C1xgEXAgK7YOODx/D/lQ== 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=1710602175; 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=R/bPLA0Seq9ghF7eo1wS4XbR1q6FsBuN/VZVWqKsyL8=; b=Lg8B8ijjnpm/kw55fG6FZgH4iCwlhW3k0qxvRSzW7GYU1bW4JWM0R3FbCtxNYCUL+BOdUW cSMrfBIaW0x+3uXGJsZOaiTfgpu1nqNirpOnl+wZFjtxXT7dZdAOs17Kj1nmcy31Ntlpbg am+il0GLRMZtU14diF06Go1X30td1/g7DPuY1Gsj+eMJ3yRkLMby4wn6svtTKVvbuVDeNP JqVOQ/4uhHdFafcCu2rpC4r6oTjIXEI16XeNXh3M41toYmsWT4nOYdxoGt/HTjRpW/2LEq u12+XIjA2N76smqINoAkmXYsUnEB+XxAO1xdQA9jMZrj6X0ehv05sAf3fD36Ew== 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 4Txl7g1bRkz106J; Sat, 16 Mar 2024 15:16:15 +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 42GFGFZe062669; Sat, 16 Mar 2024 15:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGFZu062666; Sat, 16 Mar 2024 15:16:15 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:15 GMT Message-Id: <202403161516.42GFGFZu062666@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: bf11fee6a5cf - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: bf11fee6a5cf97102f87695185cadb63d5a2a7de Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=bf11fee6a5cf97102f87695185cadb63d5a2a7de commit bf11fee6a5cf97102f87695185cadb63d5a2a7de Author: Andriy Gapon AuthorDate: 2024-02-19 10:08:12 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:13:27 +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 fc4dc91f9d54..6338d62577da 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -728,6 +728,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*)