Lines Matching full:pdn

230 static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap)  in pnv_eeh_find_cap()  argument
236 if (!pdn) in pnv_eeh_find_cap()
240 pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status); in pnv_eeh_find_cap()
245 pnv_pci_cfg_read(pdn, pos, 1, &pos); in pnv_eeh_find_cap()
250 pnv_pci_cfg_read(pdn, pos + PCI_CAP_LIST_ID, 1, &id); in pnv_eeh_find_cap()
265 static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) in pnv_eeh_find_ecap() argument
267 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_find_ecap()
273 if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) in pnv_eeh_find_ecap()
286 if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) in pnv_eeh_find_ecap()
323 struct pci_dn *pdn = pci_get_pdn(pdev); in pnv_eeh_probe() local
324 struct pci_controller *hose = pdn->phb; in pnv_eeh_probe()
326 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_probe()
330 int config_addr = (pdn->busno << 8) | (pdn->devfn); in pnv_eeh_probe()
357 edev->pcix_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_PCIX); in pnv_eeh_probe()
358 edev->pcie_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_EXP); in pnv_eeh_probe()
359 edev->af_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_AF); in pnv_eeh_probe()
360 edev->aer_cap = pnv_eeh_find_ecap(pdn, PCI_EXT_CAP_ID_ERR); in pnv_eeh_probe()
364 pnv_pci_cfg_read(pdn, edev->pcie_cap + PCI_EXP_FLAGS, in pnv_eeh_probe()
403 if ((pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
404 pdn->device_id == 0x1656) || in pnv_eeh_probe()
405 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
406 pdn->device_id == 0x1657) || in pnv_eeh_probe()
407 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
408 pdn->device_id == 0x168a) || in pnv_eeh_probe()
409 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && in pnv_eeh_probe()
410 pdn->device_id == 0x168e)) in pnv_eeh_probe()
421 pdn->busno); in pnv_eeh_probe()
803 struct pci_dn *pdn = pci_get_pdn_by_devfn(dev->bus, dev->devfn); in __pnv_eeh_bridge_reset() local
804 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in __pnv_eeh_bridge_reset()
907 static void pnv_eeh_wait_for_pending(struct pci_dn *pdn, const char *type, in pnv_eeh_wait_for_pending() argument
910 struct eeh_dev *edev = pdn->edev; in pnv_eeh_wait_for_pending()
924 pdn->phb->global_number, pdn->busno, in pnv_eeh_wait_for_pending()
925 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in pnv_eeh_wait_for_pending()
928 static int pnv_eeh_do_flr(struct pci_dn *pdn, int option) in pnv_eeh_do_flr() argument
930 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_do_flr()
943 pnv_eeh_wait_for_pending(pdn, "", in pnv_eeh_do_flr()
966 static int pnv_eeh_do_af_flr(struct pci_dn *pdn, int option) in pnv_eeh_do_af_flr() argument
968 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_do_af_flr()
986 pnv_eeh_wait_for_pending(pdn, "AF", in pnv_eeh_do_af_flr()
1005 struct pci_dn *pdn; in pnv_eeh_reset_vf_pe() local
1010 pdn = eeh_dev_to_pdn(edev); in pnv_eeh_reset_vf_pe()
1011 if (!pdn) in pnv_eeh_reset_vf_pe()
1014 ret = pnv_eeh_do_flr(pdn, option); in pnv_eeh_reset_vf_pe()
1018 return pnv_eeh_do_af_flr(pdn, option); in pnv_eeh_reset_vf_pe()
1207 static inline bool pnv_eeh_cfg_blocked(struct pci_dn *pdn) in pnv_eeh_cfg_blocked() argument
1209 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_cfg_blocked()
1231 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in pnv_eeh_read_config() local
1233 if (!pdn) in pnv_eeh_read_config()
1236 if (pnv_eeh_cfg_blocked(pdn)) { in pnv_eeh_read_config()
1241 return pnv_pci_cfg_read(pdn, where, size, val); in pnv_eeh_read_config()
1247 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in pnv_eeh_write_config() local
1249 if (!pdn) in pnv_eeh_write_config()
1252 if (pnv_eeh_cfg_blocked(pdn)) in pnv_eeh_write_config()
1255 return pnv_pci_cfg_write(pdn, where, size, val); in pnv_eeh_write_config()