From nobody Fri Nov 05 15:25:44 2021 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 844EF18365C4; Fri, 5 Nov 2021 15:25:49 +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 4Hm48W6YC4z4kvT; Fri, 5 Nov 2021 15:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 EA3C71A0A2; Fri, 5 Nov 2021 15:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A5FPi16073374; Fri, 5 Nov 2021 15:25:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A5FPiA0073373; Fri, 5 Nov 2021 15:25:44 GMT (envelope-from git) Date: Fri, 5 Nov 2021 15:25:44 GMT Message-Id: <202111051525.1A5FPiA0073373@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: 15d4459cb2d3 - main - scsi.4: Document serial numbers 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: 15d4459cb2d3d2fa8f3831fa5cc99d133cbae48d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=15d4459cb2d3d2fa8f3831fa5cc99d133cbae48d commit 15d4459cb2d3d2fa8f3831fa5cc99d133cbae48d Author: Warner Losh AuthorDate: 2021-11-05 14:57:05 +0000 Commit: Warner Losh CommitDate: 2021-11-05 14:57:05 +0000 scsi.4: Document serial numbers You can wire da, ada and nda device units to serial numbers. sdda cannot be wired like this because SD and MMC cards lack serial numbers (or at the very least CAMMMC does not query or retain them). Sponsored by: Netflix Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D32825 --- share/man/man4/scsi.4 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 29b8a48cd48d..e4c6d9a53eb4 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -242,16 +242,32 @@ hint.nda.11.target="1" hint.nda.11.unit="2" .Ed .Pp -This assigns the NVMe card living at PCI bus 7 to scbus 10 (in PCIe, -slot and function are rarely used and usually 0). +This assigns the NVMe card living at PCI bus 7 slot 0 function 1 to scbus 10. The target for .Xr nda 4 devices is always 1. The unit is the namespace identifier from the drive. The namespace id 1 is exported as -.Tn nda10 +.Em nda10 and namespace id 2 is exported as -.Tn nda11 . +.Em nda11 . +.Pp +For devices that provide a serial number, units may be wired to that serial +number without regard where the drive is attached: +.Bd -literal -offset indent +hint.nda.3.sn="CY0AN07101120B12P" +hint.da.44.sn="143282400011" +hint.ada.2.sn="A065D591" +.Ed +wires +.Em nda3 , +.Em da44 , +and +.Em ada2 +to drives with the specified serial numbers. +One need not specify an +.Em at +line when serial numbers are used. .Sh ADAPTERS The system allows common device drivers to work through many different types of adapters.