[Toybox] [PATCH] lspci fixes for multi-controller hosts
Dmitry Buzdyk
dima.buzdyk at gmail.com
Sun Jun 16 07:34:16 PDT 2024
Thanks!
Regarding the second patch, adding conditional controller output was may first
thought as lspci v3.10.0 produces output like this with multiple controllers:
(several entries omitted)
0000:00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
0000:00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)
0000:00:1f.5 Serial bus controller: Intel Corporation Tiger Lake-LP SPI Controller (rev 20)
0000:57:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
10000:e0:1d.0 PCI bridge: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 (rev 20)
10000:e1:00.0 Non-Volatile memory controller: Toshiba Corporation XG6 NVMe SSD Controller
and shorter one with single controller:
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:01.0 VGA compatible controller: Cirrus Logic GD 5446
However, I've decided to do simple approach first as adding conditional output to the lspci
toy would require either second iteration over /sys/bus/pci/devices/ or adding internal
state which may increase memory consumption.
I'll take a second look onto this.
--
Dima
On Sun, 2024-06-16 at 08:45 -0500, Rob Landley wrote:
> On 6/14/24 08:51, Dmitry Buzdyk wrote:
> > Couple of patches for the systems with multiple PCIe controllers.
> > In my case it has 2 controllers and output of the lspci (with patches
> > applied)
> > looks like this:
> >
> > 0000:00:00.0 [060400]: [17cb:0113]
> > 0000:01:00.0 [0c0330]: [1912:0014] (rev 03) xhci_hcd
> > 0001:00:00.0 [060400]: [17cb:0113]
> > 0001:01:00.0 [060400]: [1179:0623]
> > 0001:02:01.0 [060400]: [1179:0623]
> > 0001:02:02.0 [060400]: [1179:0623]
> > 0001:02:03.0 [060400]: [1179:0623]
> > 0001:03:00.0 [040000]: [17cd:0202]
> > 0001:04:00.0 [0c0330]: [1912:0014] (rev 03) xhci_hcd
> > 0001:05:00.0 [020000]: [1179:0220] tc956x_pci-eth
> > 0001:05:00.1 [020000]: [1179:0220] tc956x_pci-eth
> >
> >
> > 1. Fix "lspci -x" taking into account full PCI_PATH_NAME
> > 2. Print full PCI_PATH_NAME to the output.
>
> I applied the first one, but #2 changes the output to not match what debian's
> lspci is doing. Is there a rule about when to print the extra info here? (If
> there's more than one controller?)
>
> Rob
More information about the Toybox
mailing list