]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: Add dword #defines for Bus Number + Secondary Latency Timer
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 19 Dec 2025 17:40:33 +0000 (19:40 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 Jan 2026 22:36:53 +0000 (16:36 -0600)
commitcad3337bb6c3a2ba2307d6a9061e752e15681d2b
treeab3bcce1c0f79742043b9f212f1bc03a0b609f07
parent3d71bc79eee1d436547edc81f50fcc0d607b356b
PCI: Add dword #defines for Bus Number + Secondary Latency Timer

uapi/linux/pci_regs.h defines Primary/Secondary/Subordinate Bus Numbers
and Secondary Latency Timer (PCIe r7.0, sec. 7.5.1.3) as byte register
offsets, but in practice the code may read/write the entire dword. In the
lack of #defines to handle the dword fields, the code ends up using
literals which are not as easy to read.

Add dword field masks for the Bus Number and Secondary Latency Timer
fields and use them in probe.c.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: squash new #defines and uses together]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251219174036.16738-21-ilpo.jarvinen@linux.intel.com
Link: https://patch.msgid.link/20251219174036.16738-22-ilpo.jarvinen@linux.intel.com
drivers/pci/probe.c
include/uapi/linux/pci_regs.h