From nobody Mon Feb 19 10:09:02 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 4TddYB4tKtz5BLVs; Mon, 19 Feb 2024 10:09:02 +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 4TddYB31rmz4hf1; Mon, 19 Feb 2024 10:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708337342; 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=8jVmV0wRGX/ULl+4Gu6t81AFpqd67D6AoONukSYV1Uc=; b=EHzrHSWySb85nl2N+sptEmItESzCSX7Dsn0G2otrLHG/kDroibFvi9ZJEY3j+5Ul92RQCR 3jq5+t1o2gQaKIHu11uuqgtrk3vcwAf4An18xDtUbiZK2/OL/Y7Xc1stW/eNSeJCaFt1rd cvfZ0U7dZxF3cPju6bGKhTdETnIwGaefMnIg5+QvH8JANHyQDmrL6jYKL8aYOtSzvvfUjH cunz3w1TNMdcmczmJAXuxSmpm63yZB2G7pMFh8JJyhSm6vH+fyzY3yQTEz/pfx27LxuRVz HhFnh2JkAo0gm6bHW2lGTe2HK2GHX5NcY3X/GPsmzIWZW6uBwkckB16HDR9nrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708337342; 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=8jVmV0wRGX/ULl+4Gu6t81AFpqd67D6AoONukSYV1Uc=; b=rJKPKk/FOlxj/fshfnGag7gDcBwQWgMYMWx8PYSXVJRWAuLiGxd79wmF/KPevdaDEr61S/ IvQgorZPermJDMkk/XiWSJjYw947toWCUm5AFa1euIFW6adjEs8VZgp5i02k73N8Oy9PMy Gx91A53rBo6yPd4YxU/CMmHVGRAJkc27hAIXFMYyxdMxMSwR8z2tkClLHi0/OT69UPwdkO nhgebQFTg16TEUy0fOkPET2GMTUhPScL/1ltOmp+LAbvhO/L+c6eCMXmAZt1a74i9gngkH 3cKMUHC8gOFbBHr6RgnK2X0fhblfJxCg30ud5Vu0X5yUvQPTjHlHvydL7+IP1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708337342; a=rsa-sha256; cv=none; b=o5f7dGqoWdMJb/pnWzd7EQ8xlJ+Irk6QFDJASQf/ApkHw0SdpGTGyuu18nRfjYtv3pL/zZ aZmpHHr00cLj6YlpSzWOJ9B/AAWvdJZt1+tXnhdOJrFEJ/j2wpJDfCv6kLnfzXIhAblzL5 vjzRR09afa6mI3MwAz+7BzC7x0cpLiH9h9YortFRr6Hk69N+8l5f8XIiicBVIbrJ2GhCpj RhFvKISfN2f0KCdM4gNzd/JvAPx6ccI46EtqWB/qbwcpCvmezh2fcPZMse5Rtq74Ra9hyD B0g3ffA9Ctcqc8Cb5DS7wWTpFrA5Q9cd9eYNHhX9BE80pu5Kxo7cgAViH5QWBg== 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 4TddYB25xkzV95; Mon, 19 Feb 2024 10:09:02 +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 41JA92XR018708; Mon, 19 Feb 2024 10:09:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41JA925j018706; Mon, 19 Feb 2024 10:09:02 GMT (envelope-from git) Date: Mon, 19 Feb 2024 10:09:02 GMT Message-Id: <202402191009.41JA925j018706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: c01af41c3c8f - main - 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/main X-Git-Reftype: branch X-Git-Commit: c01af41c3c8fdd570764ff9b6bfbad6ac9ca1664 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=c01af41c3c8fdd570764ff9b6bfbad6ac9ca1664 commit c01af41c3c8fdd570764ff9b6bfbad6ac9ca1664 Author: Andriy Gapon AuthorDate: 2024-02-19 10:08:12 +0000 Commit: Andriy Gapon CommitDate: 2024-02-19 10:08:12 +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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43961 --- 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 f5d3aeca9329..d4a591943307 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -727,6 +727,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*)