From nobody Fri Apr 24 18:38:19 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 4g2MCv3ZsHz6b2X3 for ; Fri, 24 Apr 2026 18:38:19 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2MCv1KNFz47dh for ; Fri, 24 Apr 2026 18:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777055899; 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=SZQpW6EIRtzkLG9ZK1vfAk9XwC8PxFHxZP6QjdceAlg=; b=KiK3ekGJYMe2DAe4mV0dkurH9NmcSXQlZjg2L1XGUDqzJnFpiBDNexyiux/CeVTBpFz1jI HEbmYAw+oS8CiS/CjLdlAgKWvvbPHL7UgRfpqEcIGtrQHCgaJerv6aI3OI1Dz3aBX3xv1w ZFxEux/ee9OaT+ipJnY0sSIM3uRgG7QZiYKMyT3CIdobxaVcjQ/IUmZ0qTRfgYgFcU290M zzr/NmM+mbIq4Z2raq+S9ZIDyERxw49N02wj+vI4ZaK4WT3+xS01+Hm4lk8m30kqz/nx3y qRpY3v6NZgT2DKrcuzt1KdzhCv9HNHpRw1jC5UU+q4MDpp0PgPLjr3/MychYgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777055899; a=rsa-sha256; cv=none; b=JJC0/V73tOroPixAPvCzInpZqhYeYAarUy2Zda+NX0M3/PtQpJXNCdf5uAcZs0vyx7n+u0 6iMZ4s7TSvmj1fun3LYNmJj8WFVdNdd1A7ubLmkiR+BhPoVXfDb9efVfnqDZfpl5KFl300 x4BA5KiAi4REPrh+/54eCC2dRWwLixbpMFUfV8mDXBwPaNEeqpaEGV1FBcXiHEldS0S6IU 7OfyhrPCx6mEqNJAXPS+ytQ1UDRSdtVqPuoitZHnINlZZ5/oWqUq3a/s8d8fop4FXQgx6W wYE4MhYqXAZqdKl02nH8I0VOLVS2qlKCh+1eQhvhxtYw/2fN49/IXI7iTntvAw== 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=1777055899; 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=SZQpW6EIRtzkLG9ZK1vfAk9XwC8PxFHxZP6QjdceAlg=; b=EIgCOTAOelsQz5ZHBq6GxsysSqLM/3dszSVezYcF/AzsRWJ3/pzGLVNFgJw0AMWZSuUgyQ fg6vzVw0upamAcN3Cvapb79km4sKyxfCUNKpR5QJ++1Bjy+ha7NvJDQXMD3BKZywd9ifgL Y1VA5JJyxOpvrdQuXSluOvKSCSnlXCY789nNjBPjZnFuR8G6aW2a7WwtRxnvGNEeqZzT1O 0gBPmO8RSCALAULGH3dDKZSinHiXrEaW+kj66klH6uwBG2s4vpRvFpYix/wOswMnmjRnq0 0RUbrDLlcy0CNB2VYkFyCIneZqxxrQdng/WG8ORjprqlCZC5d1Fufp+EZPlMGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2MCv0gJHz1Drw for ; Fri, 24 Apr 2026 18:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22ab2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 18:38:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b40205855e10 - main - nda: Filter non-storage nvme drives 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: b40205855e100a4bd95f89e97c15d268ef5b3a35 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 18:38:19 +0000 Message-Id: <69ebb89b.22ab2.6ebc1063@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b40205855e100a4bd95f89e97c15d268ef5b3a35 commit b40205855e100a4bd95f89e97c15d268ef5b3a35 Author: Warner Losh AuthorDate: 2026-04-24 18:31:38 +0000 Commit: Warner Losh CommitDate: 2026-04-24 18:32:49 +0000 nda: Filter non-storage nvme drives Non-stroage drives have namespaces, but no storage attached. These drives have a different interface type than storage drives, so ignore them for the nvme_sim, which just handles storage. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D56461 --- sys/cam/nvme/nvme_da.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index be578bae5da5..ac1e1f09e2af 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -49,6 +49,7 @@ #include #include #include +#include #endif /* _KERNEL */ #ifndef _KERNEL @@ -731,6 +732,7 @@ ndaasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) switch (code) { case AC_FOUND_DEVICE: { + struct ccb_pathinq cpi; struct ccb_getdev *cgd; cam_status status; @@ -741,6 +743,18 @@ ndaasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) if (cgd->protocol != PROTO_NVME) break; + /* + * For PCIe cards, filter all the cards whose programming + * interface doesn't conform to the NVMe storage spec. This + * allows the nvme controller to attach to more than just + * storage cards that use the nvme model. + */ + xpt_path_inq(&cpi, cgd->ccb_h.path); + if (cpi.transport == XPORT_NVME && + cpi.xport_specific.nvme.progif != + PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0) + break; + /* * Allocate a peripheral instance for * this device and start the probe