From nobody Thu Mar 07 01:39: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 4TqsR72YVvz5CLyx; Thu, 7 Mar 2024 01:39: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 4TqsR71zLRz4vLq; Thu, 7 Mar 2024 01:39:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709775555; 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=J6hPwt3FPiIGxqsfFZ1kW1kZWWSx072jCUkpE6TW62Y=; b=hYCPTYtNgH/nneAujoB1SRJ4HnAtkXVRHCbV9AyjcaxZN1wnoVbvu/wajV0tJrb5xJagVo f+8eab4Zz9L05XLKI8tvnwI8ZsYxmWH6JEP0GYHvNlGl+Q4NVvrENuosPR45Z+kFXysV1v OoSgyCOCf5/ilXVKe2bJBRWuxWJ5svzT+OAG+hBcgfyGKVcEXE0tPetDRI1eEBVLg9yN+I 5WhQXYjx+hTkGzaxFrNy7qE7oeOh8MFYOUu4adXiZdaZwv8prIvvSUhzFs8gvY36oxaB6E MIrV4y+LFGuu63b2JwHE/Y1mkcqPF1i9AxuAiiYT3PJvZu+9rX9CIKPxwYefvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709775555; a=rsa-sha256; cv=none; b=B7KvTkZg+LZu0CyPkfpqNaeb+EgOeRcm6NYnEpdYXKoBXpRKkeCUKrq2IgcibH1hpKrH8p dpk+H8hm/WxWQ67/Jr+5VrsclGhuMFwHlThMh1wmqtFjCe+PHExVyIBDWSuyg9atNps+x7 E9V+B6BoK2q2PKxSMj7TV4awLMfWn0TbBT1wY/dzXxPC0lcB9unGwo2v/cq3m+uU8siFFY shU9CuOHIFXGqFsmHBNx4eTDlsx3AUFuEDIW24z34edYDfMur/xKggOeOoFV66M30drFF0 j+l/gu1l00ZLroIKqaW7KktKNF2aYuN2554QDD4VyX8S8Q81oEnjxEqfpqsWVA== 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=1709775555; 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=J6hPwt3FPiIGxqsfFZ1kW1kZWWSx072jCUkpE6TW62Y=; b=inrc+ltwGl8bChTZCjdo5MTZsTE4CIZYevYKAouSKl5+LlN4F5+hnYm71AaCKMaw0LBM1c kr/eTaQZLkuFjxIA9D+pi6ASmXYhWGf/OdrXExR3PeAe01H3pvXjtpEuSYvFYaNWIORJdk U/2sOGf5A6F+/mkZhPHcsPeGtf8tkOVhKuPNAmVnUqeqDsbcg9QSUSI1J01NOex5y0lVFL tlcJ4Du6jUB7DQPHh01f8hcAe87AakL0BFuPl3oBoas7DQMm0E9rHufgW7j+Mnmrqcgfuk bcLlEJrGge23CCA4+2HA0TDwH/a5i8Mbh/cRakZb5FFmRyBqsN9TdpTC181W6A== 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 4TqsR71XxJzDcV; Thu, 7 Mar 2024 01:39: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 4271dFj4057139; Thu, 7 Mar 2024 01:39:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4271dFdW057136; Thu, 7 Mar 2024 01:39:15 GMT (envelope-from git) Date: Thu, 7 Mar 2024 01:39:15 GMT Message-Id: <202403070139.4271dFdW057136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5cdedf676d03 - main - nvme: Log reset success or failure to devd 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cdedf676d0300966b0dbed073d0f34c59282e03 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5cdedf676d0300966b0dbed073d0f34c59282e03 commit 5cdedf676d0300966b0dbed073d0f34c59282e03 Author: Warner Losh AuthorDate: 2024-03-07 01:22:34 +0000 Commit: Warner Losh CommitDate: 2024-03-07 01:38:59 +0000 nvme: Log reset success or failure to devd We're logging when we start a reset, but not when we complete it, nor the result. Create now log a success or timed_out event for the reset. Currently, the only detectable error we have from reset is 'failure to become ready in time,' though the code looks like it might be more generic. Log this and if we ever have other failure modes, change the logging to devd when that happens. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44211 --- sys/dev/nvme/nvme_ctrlr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 609794edbf67..ca26ca8e92d8 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1179,10 +1179,13 @@ nvme_ctrlr_reset_task(void *arg, int pending) nvme_ctrlr_devctl_log(ctrlr, "RESET", "event=\"start\""); status = nvme_ctrlr_hw_reset(ctrlr); - if (status == 0) + if (status == 0) { + nvme_ctrlr_devctl_log(ctrlr, "RESET", "event=\"success\""); nvme_ctrlr_start(ctrlr, true); - else + } else { + nvme_ctrlr_devctl_log(ctrlr, "RESET", "event=\"timed_out\""); nvme_ctrlr_fail(ctrlr); + } atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); }