Bug 259703 - In sys/dev/pci/pci.c, error in do_power_nodriver sysctl description
Summary: In sys/dev/pci/pci.c, error in do_power_nodriver sysctl description
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: easy, needs-patch
Depends on:
Blocks:
 
Reported: 2021-11-07 21:41 UTC by Pau Amma
Modified: 2025-02-02 17:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pau Amma 2021-11-07 21:41:46 UTC
SYSCTL_INT(_hw_pci, OID_AUTO, do_power_nodriver, CTLFLAG_RWTUN,
    &pci_do_power_nodriver, 0,
    "Place a function into D3 state when no driver attaches to it.  0 means"
    " disable.  1 means conservatively place devices into D3 state.  2 means"
    " aggressively place devices into D3 state.  3 means put absolutely"
    " everything in D3 state.");

"function" should be "device", I think.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2021-11-08 15:59:55 UTC
A PCI device may have multiple functions on a single card/device and perhaps the description is referring to that, but it does seem confusing that the first sentence mentions function and later ones mention devices.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2024-10-04 11:13:42 UTC
^Triage: clear unneeded flags.  Nothing has yet been committed to be merged.
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-02-02 17:26:32 UTC
A commit in branch main references this bug:

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

commit 6f659c9a49a01b6451edc169534375479f402f6a
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-02-02 17:25:14 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-02-02 17:26:04 +0000

    pci: Change device to function

    It's functions that are placed into D3 for these value, not the device.

    PR: 259703
    Sponsored by:           Netflix

 sys/dev/pci/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 4 Warner Losh freebsd_committer freebsd_triage 2025-02-02 17:27:01 UTC
Don't plan on MFCing my change.