git: 15d4459cb2d3 - main - scsi.4: Document serial numbers

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 05 Nov 2021 15:25:44 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=15d4459cb2d3d2fa8f3831fa5cc99d133cbae48d

commit 15d4459cb2d3d2fa8f3831fa5cc99d133cbae48d
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-11-05 14:57:05 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
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.