Re: [PATCH 2/5] thunderbolt: Obtain PCI slot number from DROM

2018-09-10 Thread Mika Westerberg
On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote: > +struct tb_drom_entry_pci { > + /* BYTES 0-1 */ > + struct tb_drom_entry_header header; > + /* BYTE 2 */ > + u8 unknown:5; > + u8 slot:3; > + /* BYTES 3-10 are only present on PCIe upstream ports */ > +} __packe

[PATCH 2/5] thunderbolt: Obtain PCI slot number from DROM

2018-09-09 Thread Lukas Wunner
The port numbers of PCIe adapters on a CIO switch and the slot numbers of their corresponding PCI devices don't necessarily match up in ascending order. E.g. Light Ridge in host mode (MacBookPro9,1) mixes them up like this: switch port 7 == pci slot 4 (PCIe downstream port) switch port 8 == pci