Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2021 12:34:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255998] CAM_DEBUG_LUN=-1 doesn't work as expected
Message-ID:  <bug-255998-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255998

            Bug ID: 255998
           Summary: CAM_DEBUG_LUN=-1 doesn't work as expected
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: luporl@FreeBSD.org

According to CAM(4), setting CAM_DEBUG_LUN to -1 should enable debug of all
luns. However, it usually results in no CAM debug messages at all.

This happens because CAM_LUN_WILDCARD is defined as (~(u_int)0), but the type
of the field where CAM_DEBUG_LUN gets stored is lun_id_t, that is an u_int64_t.

If CAM_DEBUG_LUN is not defined, or if it is set to 0xffffffff in the kernel
config, then it works as expected, selecting all luns.

Changing CAM_LUN_WILDCARD to (~(lun_id_t)0) breaks the build, as some drivers
use it with 32-bit types, but defining it as (-1) seems to work for me, in some
tests with aacraid on PowerPC64.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255998-227>