Lines Matching refs:pdn

231 static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap)  in pnv_eeh_find_cap()  argument
237 if (!pdn) in pnv_eeh_find_cap()
241 pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status); in pnv_eeh_find_cap()
246 pnv_pci_cfg_read(pdn, pos, 1, &pos); in pnv_eeh_find_cap()
251 pnv_pci_cfg_read(pdn, pos + PCI_CAP_LIST_ID, 1, &id); in pnv_eeh_find_cap()
266 static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) in pnv_eeh_find_ecap() argument
268 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_find_ecap()
274 if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) in pnv_eeh_find_ecap()
287 if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) in pnv_eeh_find_ecap()
324 struct pci_dn *pdn = pci_get_pdn(pdev); in pnv_eeh_probe() local
325 struct pci_controller *hose = pdn->phb; in pnv_eeh_probe()
327 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_probe()
331 int config_addr = (pdn->busno << 8) | (pdn->devfn); in pnv_eeh_probe()
358 edev->pcix_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_PCIX); in pnv_eeh_probe()
359 edev->pcie_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_EXP); in pnv_eeh_probe()
360 edev->af_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_AF); in pnv_eeh_probe()
361 edev->aer_cap = pnv_eeh_find_ecap(pdn, PCI_EXT_CAP_ID_ERR); in pnv_eeh_probe()
365 pnv_pci_cfg_read(pdn, edev->pcie_cap + PCI_EXP_FLAGS, in pnv_eeh_probe()
404 if ((pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
405 pdn->device_id == 0x1656) || in pnv_eeh_probe()
406 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
407 pdn->device_id == 0x1657) || in pnv_eeh_probe()
408 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
409 pdn->device_id == 0x168a) || in pnv_eeh_probe()
410 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
411 pdn->device_id == 0x168e)) in pnv_eeh_probe()
422 pdn->busno); in pnv_eeh_probe()
804 struct pci_dn *pdn = pci_get_pdn_by_devfn(dev->bus, dev->devfn); in __pnv_eeh_bridge_reset() local
805 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in __pnv_eeh_bridge_reset()
908 static void pnv_eeh_wait_for_pending(struct pci_dn *pdn, const char *type, in pnv_eeh_wait_for_pending() argument
911 struct eeh_dev *edev = pdn->edev; in pnv_eeh_wait_for_pending()
925 pdn->phb->global_number, pdn->busno, in pnv_eeh_wait_for_pending()
926 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in pnv_eeh_wait_for_pending()
929 static int pnv_eeh_do_flr(struct pci_dn *pdn, int option) in pnv_eeh_do_flr() argument
931 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_do_flr()
944 pnv_eeh_wait_for_pending(pdn, "", in pnv_eeh_do_flr()
967 static int pnv_eeh_do_af_flr(struct pci_dn *pdn, int option) in pnv_eeh_do_af_flr() argument
969 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_do_af_flr()
987 pnv_eeh_wait_for_pending(pdn, "AF", in pnv_eeh_do_af_flr()
1006 struct pci_dn *pdn; in pnv_eeh_reset_vf_pe() local
1011 pdn = eeh_dev_to_pdn(edev); in pnv_eeh_reset_vf_pe()
1012 if (!pdn) in pnv_eeh_reset_vf_pe()
1015 ret = pnv_eeh_do_flr(pdn, option); in pnv_eeh_reset_vf_pe()
1019 return pnv_eeh_do_af_flr(pdn, option); in pnv_eeh_reset_vf_pe()
1208 static inline bool pnv_eeh_cfg_blocked(struct pci_dn *pdn) in pnv_eeh_cfg_blocked() argument
1210 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_cfg_blocked()
1232 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in pnv_eeh_read_config() local
1234 if (!pdn) in pnv_eeh_read_config()
1237 if (pnv_eeh_cfg_blocked(pdn)) { in pnv_eeh_read_config()
1242 return pnv_pci_cfg_read(pdn, where, size, val); in pnv_eeh_read_config()
1248 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in pnv_eeh_write_config() local
1250 if (!pdn) in pnv_eeh_write_config()
1253 if (pnv_eeh_cfg_blocked(pdn)) in pnv_eeh_write_config()
1256 return pnv_pci_cfg_write(pdn, where, size, val); in pnv_eeh_write_config()