On Tue, Jun 10, 2014 at 09:56:24AM +0800, Wei Yang wrote: >As introduced by commit 98d9f30c82 ("pci/of: Match PCI devices to dev-tree nodes >dynamically"), we need to match PCI devices to their corresponding dev-tree >nodes. While for VFs, this step was missed. > >This patch matches VFs' PCI devices to dev-tree nodes dynamically. > >Signed-off-by: Wei Yang <weiyang@xxxxxxxxxxxxxxxxxx> >--- > drivers/pci/iov.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c >index 589ef7d..1d21f43 100644 >--- a/drivers/pci/iov.c >+++ b/drivers/pci/iov.c >@@ -67,6 +67,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) > > virtfn->devfn = pci_iov_virtfn_devfn(dev, id); > virtfn->vendor = dev->vendor; >+ pci_set_of_node(virtfn); If the VF and PF seats on different PCI buses, I guess pci_set_of_node() always binds nothing with the VF. It might be one of the problem your code missed and I didn't catch this in the code review done previously. However, it shouldn't be a real problem if we're not going to rely on dynamic device_node. > pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device); > pci_setup_device(virtfn); > virtfn->dev.parent = dev->dev.parent; Thanks, Gavin -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html