From nobody Fri Jan 21 02:26:59 2022 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 4AC4E196904C; Fri, 21 Jan 2022 02:27:05 +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 4Jg3DP6MQyz4nqX; Fri, 21 Jan 2022 02:27:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642732022; 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=P5TQ/jH5k+0EHC6RNWSpmgC7EUS4m5ghMvR+Q4STC4I=; b=COkcaMRcLi12AlSCooCizQwje13Sxf0Hc61FJJST311fvbGfIg863la0mHU/m6rdxm4FF7 jK+MMqYCp6ZJhemdNhrHIQefVT/8FG85Zs5e9HnXfAwirw5AyC48ULoqqP0IpzHFwLnNV2 ZoUX9S318DvdfZzu88E/cDF04wGrxcdE7PnCY25DsCYRlq+Luy2Ylbohgcnz4bu3UvnXvH O4XzHaLSiiWGOAnbMUx1mKQkqIBoyrGHdd0cAXuW6AXC8wtvhZN5uFwZ7tIzmpIg1c9Tuk s8ZGgay9LUf0TCeOEo6SAlrnYCj/a7pwcFlM8IhbMrWZpVuXMUJZgVBXiqg/8w== 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 86C78138EC; Fri, 21 Jan 2022 02:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20L2Qxnd001384; Fri, 21 Jan 2022 02:26:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20L2Qx2l001383; Fri, 21 Jan 2022 02:26:59 GMT (envelope-from git) Date: Fri, 21 Jan 2022 02:26:59 GMT Message-Id: <202201210226.20L2Qx2l001383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 0c3d88b9ab38 - stable/13 - nvme: Explain a workaround a little better 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c3d88b9ab385b6b84e77629676eda74211af65c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642732022; 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=P5TQ/jH5k+0EHC6RNWSpmgC7EUS4m5ghMvR+Q4STC4I=; b=CaZ+DHSSSv1CIAw6s7Zj4mSAg3uRSmWtnBw8kDZ5Cj8ognOH/sxJmAhSagCTrdFDTvsbBl PYu8tKyuewomoXoZ8sfPJK5aoIYBWCCXDCPugbiNaS2OP/FV1M5MuJHaJTLU7/9nTK2KgY DkUzaUYoXIiISrZ7fQCNvZTlUpGYcWZtUf1a/tKte1/nCJufMDcUExF1yfI518nCh3rbzZ i2Lq8atP/lIVhiybsV3788vMsKokk+aG2brYhpIExnuuuFbMPNjiD8tXU7H8hjaga+vNUO mukH7qwjxbgmw/Qt4tLRtQhMF3NYnOeaOJPh9xJ5R8lC4zd4fG+Q1JQ1k/I/bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642732022; a=rsa-sha256; cv=none; b=I94mwLeRak25DBebX5cV44Tlrf7gTBngcGv8LlOI9iwfX64WisOqvvws/53ftFEhDSaYRp YbGbMTfj1cNYXizC1Or9BbfPB9qNDh2cvynpXCZOm7B9lkukGjN9AqBLiCXHlZds7i82xT mCIgeYy6yvK1M2+MT7bGXfZw/fLF4e68/6D33xeGfspZBUOjsp1RR1XZuNcGV8arazhOf7 5x9HyzSylDdhcHBXd55XLpqYxl+sugMBEvgGn+Nqq1QU8zCeyF0GZ3wE3Op2X0fo4izut6 Kh47oIC9BbDyI/QiI6LwOchl21m+bkLAud8Na7kJXC9EOIxxqoEju0M4PnwaFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=0c3d88b9ab385b6b84e77629676eda74211af65c commit 0c3d88b9ab385b6b84e77629676eda74211af65c Author: Warner Losh AuthorDate: 2021-10-01 15:53:10 +0000 Commit: Alexander Motin CommitDate: 2022-01-21 02:07:30 +0000 nvme: Explain a workaround a little better The don't touch the mmio of the drive after we do a EN 1->0 transition is only for a tiny number of dirves that have this unforunate issue. Sponsored by: Netflix (cherry picked from commit 77054a897f6440632267e75ebe31793c7555b79e) --- sys/dev/nvme/nvme_ctrlr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 10b30c584f71..eb95fa33b90b 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -318,10 +318,10 @@ nvme_ctrlr_disable(struct nvme_controller *ctrlr) cc &= ~NVME_CC_REG_EN_MASK; nvme_mmio_write_4(ctrlr, cc, cc); + /* - * Some drives have issues with accessing the mmio after we - * disable, so delay for a bit after we write the bit to - * cope with these issues. + * A few drives have firmware bugs that freeze the drive if we access + * the mmio too soon after we disable. */ if (ctrlr->quirks & QUIRK_DELAY_B4_CHK_RDY) pause("nvmeR", MSEC_2_TICKS(B4_CHK_RDY_DELAY_MS));