Lines Matching refs:pdev

63 	struct pci_dev *pdev = NULL;
66 list_for_each_entry(pdev, &bus->devices, bus_list) {
67 if (pdev->devfn == devfn) {
68 if (pdev->dev.archdata.pci_data)
69 return pdev->dev.archdata.pci_data;
71 dn = pci_device_to_OF_node(pdev);
95 struct pci_dn *pci_get_pdn(struct pci_dev *pdev)
101 if (pdev->dev.archdata.pci_data)
102 return pdev->dev.archdata.pci_data;
105 dn = pci_device_to_OF_node(pdev);
114 parent = pci_bus_to_pdn(pdev->bus);
119 if (pdn->busno == pdev->bus->number &&
120 pdn->devfn == pdev->devfn)
173 struct pci_dn *add_sriov_vf_pdns(struct pci_dev *pdev)
179 if (WARN_ON(!pdev->is_physfn))
183 pdn = pci_get_pdn(pdev);
188 parent = pci_bus_to_pdn(pdev->bus);
192 for (i = 0; i < pci_sriov_get_totalvfs(pdev); i++) {
196 pci_iov_virtfn_bus(pdev, i),
197 pci_iov_virtfn_devfn(pdev, i));
199 dev_warn(&pdev->dev, "%s: Cannot create firmware data for VF#%d\n",
210 edev->physfn = pdev;
214 return pci_get_pdn(pdev);
217 void remove_sriov_vf_pdns(struct pci_dev *pdev)
224 if (WARN_ON(!pdev->is_physfn))
228 pdn = pci_get_pdn(pdev);
233 parent = pci_bus_to_pdn(pdev->bus);
242 for (i = 0; i < pci_sriov_get_totalvfs(pdev); i++) {
247 if (pdn->busno != pci_iov_virtfn_bus(pdev, i) ||
248 pdn->devfn != pci_iov_virtfn_devfn(pdev, i))
345 struct pci_dev *pdev;
369 pdev = pci_get_domain_bus_and_slot(pdn->phb->global_number,
371 if (pdev) {
372 /* NB: pdev has a ref to dn */
373 pci_dbg(pdev, "marked pdn (from %pOF) as dead\n", dn);
380 pci_dev_put(pdev);
485 static void pci_dev_pdn_setup(struct pci_dev *pdev)
489 if (pdev->dev.archdata.pci_data)
493 pdn = pci_get_pdn(pdev);
494 pdev->dev.archdata.pci_data = pdn;