Bug 212155

Summary: Incorrect documentation in cam(4) for wired scsi device hints.
Product: Documentation Reporter: mbrian
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: bcr, doc, grahamperrin, tom
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
This patch fixes the described problem
none
This patch fixes awkward text near the previous change
none
This patch incorporates Graham Perrin's suggestion none

Description mbrian 2016-08-25 17:29:54 UTC
The documentation on device hints for wired scsi devices in cam(4) is not
correct. The documentation describes the hint as:

hint.da.<n>.unit=<lun_number>

The code in cam_periph.c actually looks for

hint.da.<n>.lun=<lun_number>
Comment 1 Tom Hukins 2023-03-29 20:42:28 UTC
Created attachment 241192 [details]
This patch fixes the described problem
Comment 2 Tom Hukins 2023-03-29 20:43:09 UTC
Created attachment 241193 [details]
This patch fixes awkward text near the previous change
Comment 3 Tom Hukins 2023-03-29 20:49:53 UTC
The patches I attached to this ticket can be applied using git-am(1):

  git am 0001-CAM-4-Fix-device-hints-documentation.patch
  git am 0002-CAM-4-Remove-redundant-words.patch
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-04-01 18:28:09 UTC
Comment on attachment 241193 [details]
This patch fixes awkward text near the previous change

Smart. 

If you like, also remove the word 'living' from the subsequent paragraph (below the hints).
Comment 5 Tom Hukins 2023-04-01 20:11:35 UTC
Created attachment 241252 [details]
This patch incorporates Graham Perrin's suggestion

Thanks for the review, Graham.  I've incorporated your suggestion into this patch.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-09-17 15:17:09 UTC
A commit in branch main references this bug:

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

commit c2909b0c9a29cd6fa0019ed9998dde9e054bdad2
Author:     Tom Hukins <tom@FreeBSD.org>
AuthorDate: 2023-09-17 15:12:22 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-09-17 15:13:49 +0000

    cam(4): Fix device hints documentation

    The code in sys/cam/cam_periph.c that calls resource_int_value(9) looks
    for "lun" not "unit".

    PR: 212155
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/843

 share/man/man4/scsi.4 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Comment 7 Benedict Reuschling freebsd_committer freebsd_triage 2023-10-08 14:12:57 UTC
Close this PR. Warner committed a patch and no further work is needed.