@@ -598,6 +598,9 @@ static int npu_dn_fixup(struct phb *phb,
if (dev->phb || dev->pd)
return 0;
+ /* Generic PCI code assigns slot info to the pd, give it to the NPU */
+ dev->slot_info = pd->slot_info;
+
/* Bind the emulated PCI device with the real one, which can't
* be done until the PCI devices are populated. Once the real
* PCI device is identified, we also need fix the device-tree
@@ -148,6 +148,8 @@ struct npu_dev {
uint32_t procedure_status;
uint8_t pe_num;
+
+ struct pci_slot_info *slot_info;
};
/* NPU PHB descriptor */
Now that slot information is available for NPUs, it is set on the PCI device of a NPU link, but not on the link (npu_dev) itself. The npu_dev doesn't store a reference to its PCI device, only to the device of the physical GPU after association. To make slot information available on a npu_dev, set it to use the slot information of its PCI device, which is set by generic PCI code. Signed-off-by: Russell Currey <ruscur@russell.cc> --- hw/npu.c | 3 +++ include/npu.h | 2 ++ 2 files changed, 5 insertions(+)