From nobody Wed Feb 18 16:55:12 2026 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 4fGN0x1qNYz6STtD for ; Wed, 18 Feb 2026 16:55:13 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fGN0w5SXMz3K1f for ; Wed, 18 Feb 2026 16:55:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771433712; 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=4JTMZPTAeN5rqBW9AZGv0oGwQn4mCgmaO1jh7lnXPaQ=; b=lRmCRrNSKkfPF9GuxEglJLo7soizPABmikc7jkO+4pR4EOqbO2d2WX/43E374BbHmNz4b1 ZCwQ6Xg5bK2IoGS8AQFNAig7KzpjzcmnvkXQLnavkWMlvwe11aJKW+j1x/nIVM15pmMiG/ qhSV/UFBw3UIU6oiPf2M4UGNpbAiPuMMFHwBJLq7p+na7eSM9tgLXnjtmI5ZHt+6y2R1Vn br3ehYiiCBlvoThI9nER3lmDXFn/EUVwT7gLNw0XGwSGPQeRzyX87/Dh+MSlKaH5a08q+0 3cEULlaT99u/g395CTp7g3EPmzPIDqZnZyC4MSr+gGiLeFwqMYqgvObFVNOo6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771433712; a=rsa-sha256; cv=none; b=T3NehBW/cI87pHdVwH3NixFdJLBARGM/hbLSLGZp/KJ4Vm0Noui0yuUzt85qM91pNs91BK xl9QvRHQyZH1pb6OhAUJHDUad+Fi07Cn6EjjsGZwaJA3fw02q0XwDL7Y/II93+RHz6CUvs I2H6Kr1TCdaFbVwPIaB73WQrJYt1rzl8wPPyTPxChJx2NNmWIiA6W8+nrlODyemZ3ASWmi zq+ORgWJtfZ1G07UJwgmfnl6qRnC+ZeSWuOQT+QAb2C/FSV5P5Ir8Q5F9ofuvJevei3Yi+ jh3hHP7ZPmlUoMFFuf1PFg8P6TEXsIjGDKA6jwGHVMeEYdSVj+KmkyqiMOQDdw== 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=1771433712; 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=4JTMZPTAeN5rqBW9AZGv0oGwQn4mCgmaO1jh7lnXPaQ=; b=IWAajrBIhd67dHZBtJxeMSnoK2Ps4EVyPLeph7nQAjacQS7noXJWhUJd2C22Aifk6l8vKR taivXZfUq5wXGXrPhUXnNrma9Y4Z0XMXBtrmR/O3KN7iPLJ5qdCzHCzcLAB6j/ednfw9PN EL+f58vz/J2M1jdg0DqGdYJn9kUCDJCcfckwcLJJQZN/Lh6/rj5w1Y7lO6W+94uILgpZYS CVc+boGUU9kiCDubVMXA2RtMoR/5S1NL6wnhVVpqgiL78RrzCPOvO8UWk8ULuCEF7v8gwV OVZhTiSzcq/sDDm9vBN6Fhi2O2CKo6p8GCi2Dt+Odqh+plEbpvRjrru1/nkXYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fGN0w3SXkz14P8 for ; Wed, 18 Feb 2026 16:55:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37c47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 18 Feb 2026 16:55:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8aa560491cfa - main - nvme: Fix sim unit number to match nvme device 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: 8aa560491cfad7953c7c089f4847951e867ef47c Auto-Submitted: auto-generated Date: Wed, 18 Feb 2026 16:55:12 +0000 Message-Id: <6995eef0.37c47.47ad4495@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8aa560491cfad7953c7c089f4847951e867ef47c commit 8aa560491cfad7953c7c089f4847951e867ef47c Author: Warner Losh AuthorDate: 2026-02-17 21:08:46 +0000 Commit: Warner Losh CommitDate: 2026-02-18 16:40:06 +0000 nvme: Fix sim unit number to match nvme device The CAM sim unit numbner should match the nvme device number. We need this to match unit numbers in some wiring scenarios. For example: hint.nvme.0.at="UEFI:PciRoot(0x3)/Pci(0x1,0x1)/Pci(0x0,0x0)" hint.nvme.1.at="UEFI:PciRoot(0x3)/Pci(0x1,0x2)/Pci(0x0,0x0)" hint.nvme.2.at="UEFI:PciRoot(0x3)/Pci(0x1,0x3)/Pci(0x0,0x0)" hint.nvme.3.at="UEFI:PciRoot(0x3)/Pci(0x1,0x4)/Pci(0x0,0x0)" hint.scbus.33.at="nvme0" hint.nda.0.at="scbus33" hint.scbus.34.at="nvme1" hint.nda.1.at="scbus34" hint.scbus.35.at="nvme2" hint.nda.2.at="scbus35" hint.scbus.36.at="nvme3" hint.nda.3.at="scbus36" If the devices that are nvme0 and nvme3 are the only ones populated, you still want them associated with nda0 and nda3. The nvme_sim device changes meant we were passing the wrong device's unit number to cam_sim_alloc. This fixes the problem. Sponsored by: Netflix --- sys/dev/nvme/nvme_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index a59823847c39..f7db4a9ff4fb 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -343,7 +343,7 @@ nvme_sim_attach(device_t dev) sc->s_ctrlr = ctrlr; sc->s_sim = cam_sim_alloc(nvme_sim_action, nvme_sim_poll, - "nvme", sc, device_get_unit(dev), + "nvme", sc, device_get_unit(ctrlr->dev), NULL, max_trans, max_trans, devq); if (sc->s_sim == NULL) { device_printf(dev, "Failed to allocate a sim\n");