From nobody Wed Feb 18 16:55:12 2026 X-Original-To: dev-commits-src-main@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 4fGN0x1qGKz6STyW 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 4fGN0x0CnSz3KG6 for ; Wed, 18 Feb 2026 16:55:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771433713; 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=V59HT4eEcHoOkaXUIXIJh7t2F/JIKAZJ9S16bYtFKgUJx8pT1K6UZfdPAlXHUCn/hEXjlt 8nNjiX/k+2tpdspJSR7AeISchUB/Wwkrwlh+B7WQorYFCcISV/fYducAQTta2fafkv2uI1 LeT3xNvv6isUWMVeDkKErEdEuX2VzLq1e9P7Xzb+Pm0IT59oLilBECLX7QTe5g8kOrZG24 5TW81ULk0hEF5AWeM+x5RCasPeV3qmwnBUbMGLuDbnbXIdVwPnOMMD4k1x4UijVSZV/8iJ 8UgiL+UypnaaCJRQWTxI9iw/yiUSQgyZLr0jBwdUo88hXX8QTjfw5zZBuMCgMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771433713; a=rsa-sha256; cv=none; b=n9HgiVfq8G+tlGvyYo7LoTtaWXX8h1juPE9kaR6stFK2L29jrM5dk/Fe0XxWwxUrCQIOFc 62HO5wuosT1e5CdbrxJv/YopYq9K6Bp938U7hYqTwU4eIGQle8MJzvrp6VizgG3sRhtIZE 9cdLwJCiGQW24ymlWoK+sy6ASZAh/zCS6Z/7xyBl7AYjaGguubVpe7CHjAVg8RcQnJHoUS S1lk3GM3W7ml59JwaLWpskadpwofBvN2Qi+uu4Q2oIh9DO45VBjuL0HcbklUgj+o6E9pPE 53MMQmWUefukrRMZq4/muFv81/leksEwmeNsgg0yibcOeyg2UUrT3vX2w95UHA== 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=1771433713; 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=hr9u8hiFkH9TQtXmS4qeGIFKkYJf2eFyM7PM4E324ZbVYsEp1D0xm8hQPr5MwFOT68it5V +ORPAJkwXwL1JM+afspjeGLv0g5bABYzNMNRe+0oqFlPiQeLM8dud5ztJJBPs2q5oUtIV3 i6v6n0T8tbigW5uJuYSBN9Ai9Aud8A0fiTQKGT9wqKDqAT1A9jFaZNWFU8UJvKjRxt/bKe KZm5WyRaTTqnaBF+ikUBUFomAdwVa7R128ROLl9vUf367B7b5R/DVSGlibT3nV2GJM4ybW K+s93oZ7T+WVy/ld6WJFtqHz/TJVdvRdiEL3BjxKOTqEfHRleHDrTPrW7f7w1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fGN0w3Sxpz14PB 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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");