Also print the vendor/device and subvendor/subdevice IDs in addition
to any strings from the database found if the -v flag is given more
than once.
This helps with device identification if the strings resolve to
identical values for entire product families as well as when the
exact card cannot be determined from the string.
In theory a second call to pciconf could present that information in
non-tree mode but that kind-of defeats the purpose.
Details
Details
- Reviewers
jhb
I don't know if this is close to whatever it is modelled after
but it really helps here as none of these cards are plain vendor IDs.
| |--- pcib9 PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch [0x10b5:0x8606 0x19b6:0xd01d] | | `--- pci0:9:0:0 Realtek Semiconductor Co., Ltd. RTL8851BE PCIe 802.11ax Wireless Network Controller [0x10ec:0xb851 0x103c:0x88e7] | |--- pcib10 PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch [0x10b5:0x8606 0x19b6:0xd01d] | | `--- pci0:10:0:0 Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [0x10ec:0xc821 0x103c:0x831a] | `--- pcib11 PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch [0x10b5:0x8606 0x19b6:0xd01d] | `--- pci0:11:0:0 Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter [0x10ec:0xc822 0x1a3b:0x3750]
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 71954 Build 68837: arc lint + arc unit
Event Timeline
Comment Actions
I don't think Linux does this in lspci FWIW, but given it relies on an additional -v that is ok. One oddity perhaps is that we don't print subvendor/subdevice IDs in the fallback below this (and lspci doesn't print those out either IIRC). I'm also not sure you want to present an ID of 0 as '000000' vs 0x0000. The latter is why I used 0x%04x instead.
See:
> printf '%#06x\n' 0 000000