From nobody Tue Aug 13 21:55:58 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 4Wk4vg2ppmz5TTys; Tue, 13 Aug 2024 21:55:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wk4vg0yRqz4FsH; Tue, 13 Aug 2024 21:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723586159; 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=hiDRRltiYMzJ8RjDPGtfYFKbiiBCYAcqFx98jobW3uw=; b=GwRZgRGxQ7SmQePGrM5GbLxo8aa8fG/C83unqgNMQ46exjjsG8jTXBwLcyx1PAGPzqqzJF KTjFpnrJ/l9qDZcMDFpZbkZborPu5nO+ZllWqoBjIsLZv+nuPLYyWsu4uq/yrNCYTqga17 AA8MPP9QOBMRldcM+6jLo3UIU3geUsZexye9EX8ONI+xshKG7Ei1oJ72Tc1+jMGXjxsJ0U bMJTL/fJXpNVMNJG4LwvcA7AuLzaz2OKxtDVSq5syf9OUUrnhdRdUdg3Ip39oM+bPGs4bn piERXe47X56n3XkyvxF9i+IThqpRcHOnp5hxbMX0STVL00H1LsdcuseC1bFLMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723586159; a=rsa-sha256; cv=none; b=lD8+oOHPQdnNOUY42JVTc6LWWlYO9gDDDH7i3G2csV2UGTCOHMnAgtnID+TB3mWT411vrM rcaUI5PU6CRyDmGz8I7pqCQyIb0et9H5cErfWnRH96m/Cf8RHR44ADcJDqbItH8QFwBvNc eGromTtMieYD9fftOt9LR4yhMwx69ifQd/ckiP70aORElnIhcmLTLM13JLuljI0/i2LFr5 kjMNDRtxrtUwhAMr5wg+L0a4qeHLbw3EMBHJzPlYT94MxpXZRDOeWXcb92NywyvWyxzQI+ /2cnv0fP/MoOH/ibGlbnieMg2g3gZAcGbZ+9gdEMpqrDeM7Kz92Ra/ToeeHXhQ== 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=1723586159; 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=hiDRRltiYMzJ8RjDPGtfYFKbiiBCYAcqFx98jobW3uw=; b=ORBZ6Ib0jCrLIFfl2rY9B3U+ypEX95nDlSeWNsB8YWxIUwrmtvT5ohmhpCagusB2h6K2bj i8pEP2Ww94phptwV4SosDmfztpF0dQyaZNrLsf2T+jt9euMOG+F+hb7gCWpd9Yk4zZf/aQ QrcLCviZ8x5COUGpH7wBQCf4gi2XXEROEA0Ob8hK86r6/g4kNEkj4jzvu8Sq/sx0JA5yUE OHU72EA+4iWJhfwop62qJEaRy5QySglGp8jAv6+a1WKIVPYFRpaZSF+OD4cNcO7KR9VQio miBk0yPS3z5VXS0lSObXD2Gf7bJgXiJVcOX0x+KoPfKQTsA9ZtdjzuxxDjF40g== 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 4Wk4vg0RwtzSZt; Tue, 13 Aug 2024 21:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47DLtwT1093255; Tue, 13 Aug 2024 21:55:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47DLtw5m093252; Tue, 13 Aug 2024 21:55:58 GMT (envelope-from git) Date: Tue, 13 Aug 2024 21:55:58 GMT Message-Id: <202408132155.47DLtw5m093252@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: 8c44df321cf3 - main - nvme: Add a clarifying comment 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 8c44df321cf39bcba568c513dda54b75937d4556 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8c44df321cf39bcba568c513dda54b75937d4556 commit 8c44df321cf39bcba568c513dda54b75937d4556 Author: Warner Losh AuthorDate: 2024-08-13 22:45:17 +0000 Commit: Warner Losh CommitDate: 2024-08-13 22:46:41 +0000 nvme: Add a clarifying comment While it is easy enough to bounce over to nvme.c from nvme_ctrlr.c to find this out, I've had to do that several times, so a little bit of context is quite helpful. Sponsored by: Netflix --- sys/dev/nvme/nvme_ctrlr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index d97575a19584..270be61e2d36 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1588,6 +1588,12 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) return (0); } +/* + * Called on detach, or on error on attach. The nvme_controller won't be used + * again once we return, so we have to tear everything down (so nothing + * references this, no callbacks, etc), but don't need to reset all the state + * since nvme_controller will be freed soon. + */ void nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) {