Bug 294161 - smartpqi does not log anything
Summary: smartpqi does not log anything
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: John Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-31 12:35 UTC by peo
Modified: 2026-05-26 20:08 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peo 2026-03-31 12:35:21 UTC
The smartpqi(4) driver that arrived with the new HPE controllers does not log any state changes at all anywhere, for example disks removed or attached, array rebuiding etc.

The previous ciss(4) always add usable messages to syslog and I hope smartpqi can be adopted to do thesame.

The hw.smartpqi.debug_level tunable dos not have any effect on logging either, just on boot.

Thanks,
Per
Comment 1 John Hall 2026-05-05 14:21:41 UTC
Implementation up for review on Pharbricator

https://reviews.freebsd.org/D56832
Comment 2 Michael Osipov freebsd_committer freebsd_triage 2026-05-05 18:16:36 UTC
(In reply to peo from comment #0)

Can you tell which one you have? In the servers I was able to order it only had Broadcom controllers or a every expensive Smart PQI one.
Comment 3 peo 2026-05-05 20:45:04 UTC
(In reply to Michael Osipov from comment #2)

cciss_vol_status /dev/smartpqi0 -V -u
Controller: Unknown Smart Array
  Board ID: 0x0602103c

HPE Smart Array P408i-a SR Gen10
SKU	804334-002
Part Number	836260-002
Firmware 8.00
Comment 4 Michael Osipov freebsd_committer freebsd_triage 2026-05-05 20:46:19 UTC
(In reply to peo from comment #3)

Ah, now this makes sense. They disappeared from Gen11.
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-05-07 18:09:43 UTC
A commit in branch main references this bug:

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

commit 0d48d6d7bba77d6c3736ce56ea5667bfbde89705
Author:     John Hall <jrhall@FreeBSD.org>
AuthorDate: 2026-05-04 21:43:27 +0000
Commit:     John Hall <jrhall@FreeBSD.org>
CommitDate: 2026-05-07 18:08:26 +0000

    smartpqi: Add runtime sysctl for debug_level and log device state changes

    The smartpqi driver did not log device add/remove or controller events
    to syslog, and hw.smartpqi.debug_level could only be set at boot via
    loader.conf with no runtime sysctl interface.

    Add a read-write sysctl at dev.smartpqi.N.debug_level for runtime
    debug level changes. Add device_printf calls for device addition,
    removal, and controller events (hotplug, hardware, physical/logical
    device, AIO state/config changes) so state changes always appear in
    dmesg. Add DBG_DISC logging for discovery state transitions. Fix
    spelling errors in strings and comments across the driver.

    Bump driver version to 14.4691.1.2000 / 15.2.1.2000.

    PR:             294161
    Reviewed by:    imp
    Approved by:    imp
    MFC after:      2 weeks

    Differential Revision:  https://reviews.freebsd.org/D56832

 sys/dev/smartpqi/smartpqi_cam.c        |  4 ++--
 sys/dev/smartpqi/smartpqi_defines.h    |  8 ++++----
 sys/dev/smartpqi/smartpqi_discovery.c  | 21 ++++++++++++++++++---
 sys/dev/smartpqi/smartpqi_event.c      | 17 ++++++++++++++---
 sys/dev/smartpqi/smartpqi_main.c       | 12 +++++++++++-
 sys/dev/smartpqi/smartpqi_misc.c       |  4 ++--
 sys/dev/smartpqi/smartpqi_queue.c      |  4 ++--
 sys/dev/smartpqi/smartpqi_request.c    |  4 ++--
 sys/dev/smartpqi/smartpqi_response.c   |  4 ++--
 sys/dev/smartpqi/smartpqi_sis.c        |  6 +++---
 sys/dev/smartpqi/smartpqi_structures.h |  4 ++--
 11 files changed, 62 insertions(+), 26 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-05-07 18:09:44 UTC
A commit in branch main references this bug:

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

commit e9912b7e88e7d66c0ab5fec1cfe61dcd18377166
Author:     John Hall <jrhall@FreeBSD.org>
AuthorDate: 2026-05-04 22:14:28 +0000
Commit:     John Hall <jrhall@FreeBSD.org>
CommitDate: 2026-05-07 18:08:27 +0000

    smartpqi.4: Document runtime debug_level sysctl

    Update smartpqi(4) to document the dev.smartpqi.<unit>.debug_level
    sysctl for runtime debug level changes, and note that device
    add/remove and controller event messages always appear in dmesg
    regardless of the debug_level setting.

    PR:             294161
    Reviewed by:    imp
    Approved by:    imp
    MFC after:      2 weeks

    Differential Revision:  https://reviews.freebsd.org/D56832

 share/man/man4/smartpqi.4 | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2026-05-26 15:20:09 UTC
A commit in branch stable/14 references this bug:

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

commit e1e281a47d05699c71a9bf44dedbc85e0dfb510e
Author:     John Hall <jrhall@FreeBSD.org>
AuthorDate: 2026-05-04 21:43:27 +0000
Commit:     John Hall <jrhall@FreeBSD.org>
CommitDate: 2026-05-26 15:17:30 +0000

    smartpqi: Add runtime sysctl for debug_level and log device state changes

    The smartpqi driver did not log device add/remove or controller events
    to syslog, and hw.smartpqi.debug_level could only be set at boot via
    loader.conf with no runtime sysctl interface.

    Add a read-write sysctl at dev.smartpqi.N.debug_level for runtime
    debug level changes. Add device_printf calls for device addition,
    removal, and controller events (hotplug, hardware, physical/logical
    device, AIO state/config changes) so state changes always appear in
    dmesg. Add DBG_DISC logging for discovery state transitions. Fix
    spelling errors in strings and comments across the driver.

    Bump driver version to 14.4691.1.2000 / 15.2.1.2000.

    PR:             294161
    Reviewed by:    imp
    Approved by:    imp
    MFC after:      2 weeks

    Differential Revision:  https://reviews.freebsd.org/D56832

    (cherry picked from commit 0d48d6d7bba77d6c3736ce56ea5667bfbde89705)

 sys/dev/smartpqi/smartpqi_cam.c        |  4 ++--
 sys/dev/smartpqi/smartpqi_defines.h    |  8 ++++----
 sys/dev/smartpqi/smartpqi_discovery.c  | 21 ++++++++++++++++++---
 sys/dev/smartpqi/smartpqi_event.c      | 17 ++++++++++++++---
 sys/dev/smartpqi/smartpqi_main.c       | 12 +++++++++++-
 sys/dev/smartpqi/smartpqi_misc.c       |  4 ++--
 sys/dev/smartpqi/smartpqi_queue.c      |  4 ++--
 sys/dev/smartpqi/smartpqi_request.c    |  4 ++--
 sys/dev/smartpqi/smartpqi_response.c   |  4 ++--
 sys/dev/smartpqi/smartpqi_sis.c        |  6 +++---
 sys/dev/smartpqi/smartpqi_structures.h |  4 ++--
 11 files changed, 62 insertions(+), 26 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-05-26 15:21:10 UTC
A commit in branch stable/15 references this bug:

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

commit 183dd2e4a3e8af968ae3f07b7b4c97345a348362
Author:     John Hall <jrhall@FreeBSD.org>
AuthorDate: 2026-05-04 21:43:27 +0000
Commit:     John Hall <jrhall@FreeBSD.org>
CommitDate: 2026-05-26 15:20:39 +0000

    smartpqi: Add runtime sysctl for debug_level and log device state changes

    The smartpqi driver did not log device add/remove or controller events
    to syslog, and hw.smartpqi.debug_level could only be set at boot via
    loader.conf with no runtime sysctl interface.

    Add a read-write sysctl at dev.smartpqi.N.debug_level for runtime
    debug level changes. Add device_printf calls for device addition,
    removal, and controller events (hotplug, hardware, physical/logical
    device, AIO state/config changes) so state changes always appear in
    dmesg. Add DBG_DISC logging for discovery state transitions. Fix
    spelling errors in strings and comments across the driver.

    Bump driver version to 14.4691.1.2000 / 15.2.1.2000.

    PR:             294161
    Reviewed by:    imp
    Approved by:    imp
    MFC after:      2 weeks

    Differential Revision:  https://reviews.freebsd.org/D56832

    (cherry picked from commit 0d48d6d7bba77d6c3736ce56ea5667bfbde89705)

 sys/dev/smartpqi/smartpqi_cam.c        |  4 ++--
 sys/dev/smartpqi/smartpqi_defines.h    |  8 ++++----
 sys/dev/smartpqi/smartpqi_discovery.c  | 21 ++++++++++++++++++---
 sys/dev/smartpqi/smartpqi_event.c      | 17 ++++++++++++++---
 sys/dev/smartpqi/smartpqi_main.c       | 12 +++++++++++-
 sys/dev/smartpqi/smartpqi_misc.c       |  4 ++--
 sys/dev/smartpqi/smartpqi_queue.c      |  4 ++--
 sys/dev/smartpqi/smartpqi_request.c    |  4 ++--
 sys/dev/smartpqi/smartpqi_response.c   |  4 ++--
 sys/dev/smartpqi/smartpqi_sis.c        |  6 +++---
 sys/dev/smartpqi/smartpqi_structures.h |  4 ++--
 11 files changed, 62 insertions(+), 26 deletions(-)