Home
last modified time | relevance | path

Searched refs:edev (Results 1 – 17 of 17) sorted by relevance

/arch/powerpc/kernel/
Deeh_pe.c238 struct eeh_dev *edev, *tmp; in eeh_pe_dev_traverse() local
248 eeh_pe_for_each_dev(pe, edev, tmp) in eeh_pe_dev_traverse()
249 fn(edev, flag); in eeh_pe_dev_traverse()
306 int eeh_pe_tree_insert(struct eeh_dev *edev, struct eeh_pe *new_pe_parent) in eeh_pe_tree_insert() argument
308 struct pci_controller *hose = edev->controller; in eeh_pe_tree_insert()
317 pe = eeh_pe_get(hose, edev->pe_config_addr); in eeh_pe_tree_insert()
320 list_add_tail(&edev->entry, &pe->edevs); in eeh_pe_tree_insert()
321 edev->pe = pe; in eeh_pe_tree_insert()
334 eeh_edev_dbg(edev, "Added to existing PE (parent: PE#%x)\n", in eeh_pe_tree_insert()
339 edev->pe = pe; in eeh_pe_tree_insert()
[all …]
Deeh_driver.c77 static bool eeh_dev_removed(struct eeh_dev *edev) in eeh_dev_removed() argument
79 return !edev || (edev->mode & EEH_DEV_REMOVED); in eeh_dev_removed()
82 static bool eeh_edev_actionable(struct eeh_dev *edev) in eeh_edev_actionable() argument
84 if (!edev->pdev) in eeh_edev_actionable()
86 if (edev->pdev->error_state == pci_channel_io_perm_failure) in eeh_edev_actionable()
88 if (eeh_dev_removed(edev)) in eeh_edev_actionable()
90 if (eeh_pe_passed(edev->pe)) in eeh_edev_actionable()
141 static void eeh_disable_irq(struct eeh_dev *edev) in eeh_disable_irq() argument
147 if (edev->pdev->msi_enabled || edev->pdev->msix_enabled) in eeh_disable_irq()
150 if (!irq_has_action(edev->pdev->irq)) in eeh_disable_irq()
[all …]
Deeh_sysfs.c28 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); \
30 if (!edev) \
33 return sprintf(buf, _format "\n", edev->_memb); \
44 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_show() local
47 if (!edev || !edev->pe) in eeh_pe_state_show()
50 state = eeh_ops->get_state(edev->pe, NULL); in eeh_pe_state_show()
52 state, edev->pe->state); in eeh_pe_state_show()
60 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_store() local
62 if (!edev || !edev->pe) in eeh_pe_state_store()
66 if (!(edev->pe->state & EEH_PE_ISOLATED)) in eeh_pe_state_store()
[all …]
Deeh.c168 static size_t eeh_dump_dev_log(struct eeh_dev *edev, char *buf, size_t len) in eeh_dump_dev_log() argument
176 edev->pe->phb->global_number, edev->bdfn >> 8, in eeh_dump_dev_log()
177 PCI_SLOT(edev->bdfn), PCI_FUNC(edev->bdfn)); in eeh_dump_dev_log()
179 edev->pe->phb->global_number, edev->bdfn >> 8, in eeh_dump_dev_log()
180 PCI_SLOT(edev->bdfn), PCI_FUNC(edev->bdfn)); in eeh_dump_dev_log()
182 eeh_ops->read_config(edev, PCI_VENDOR_ID, 4, &cfg); in eeh_dump_dev_log()
186 eeh_ops->read_config(edev, PCI_COMMAND, 4, &cfg); in eeh_dump_dev_log()
191 if (edev->mode & EEH_DEV_BRIDGE) { in eeh_dump_dev_log()
192 eeh_ops->read_config(edev, PCI_SEC_STATUS, 2, &cfg); in eeh_dump_dev_log()
196 eeh_ops->read_config(edev, PCI_BRIDGE_CONTROL, 2, &cfg); in eeh_dump_dev_log()
[all …]
Dpci_dn.c130 struct eeh_dev *edev; in eeh_dev_init() local
133 edev = kzalloc(sizeof(*edev), GFP_KERNEL); in eeh_dev_init()
134 if (!edev) in eeh_dev_init()
138 pdn->edev = edev; in eeh_dev_init()
139 edev->pdn = pdn; in eeh_dev_init()
140 edev->bdfn = (pdn->busno << 8) | pdn->devfn; in eeh_dev_init()
141 edev->controller = pdn->phb; in eeh_dev_init()
143 return edev; in eeh_dev_init()
193 struct eeh_dev *edev __maybe_unused; in add_sriov_vf_pdns()
206 edev = eeh_dev_init(pdn); in add_sriov_vf_pdns()
[all …]
Deeh_cache.c44 struct eeh_dev *edev; member
67 return piar->edev; in __eeh_addr_cache_get_device()
84 struct eeh_dev *edev; in eeh_addr_cache_get_dev() local
88 edev = __eeh_addr_cache_get_device(addr); in eeh_addr_cache_get_dev()
90 return edev; in eeh_addr_cache_get_dev()
147 piar->edev = pci_dev_to_eeh_dev(dev); in eeh_addr_cache_insert()
151 eeh_edev_dbg(piar->edev, "PIAR: insert range=[%pap:%pap]\n", in eeh_addr_cache_insert()
162 struct eeh_dev *edev; in __eeh_addr_cache_insert_dev() local
165 edev = pci_dev_to_eeh_dev(dev); in __eeh_addr_cache_insert_dev()
166 if (!edev) { in __eeh_addr_cache_insert_dev()
[all …]
Drtas_pci.c56 if (pdn->edev && pdn->edev->pe && in rtas_read_config()
57 (pdn->edev->pe->state & EEH_PE_CFG_BLOCKED)) in rtas_read_config()
107 if (pdn->edev && pdn->edev->pe && in rtas_write_config()
108 (pdn->edev->pe->state & EEH_PE_CFG_BLOCKED)) in rtas_write_config()
Dpci_of_scan.c355 struct eeh_dev *edev = pdn_to_eeh_dev(PCI_DN(dn)); in of_scan_pci_dev() local
376 if (edev && (edev->mode & EEH_DEV_REMOVED)) in of_scan_pci_dev()
/arch/powerpc/platforms/pseries/
Deeh_pseries.c75 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pseries_pcibios_bus_add_device() local
77 edev->pe_config_addr = (pdn->busno << 16) | (pdn->devfn << 8); in pseries_pcibios_bus_add_device()
78 eeh_pe_tree_remove(edev); /* Remove as it is adding to bus pe */ in pseries_pcibios_bus_add_device()
79 eeh_pe_tree_insert(edev, physfn_pe); /* Add as VF PE type */ in pseries_pcibios_bus_add_device()
288 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pseries_eeh_find_ecap() local
293 if (!edev || !edev->pcie_cap) in pseries_eeh_find_ecap()
323 static struct eeh_pe *pseries_eeh_pe_get_parent(struct eeh_dev *edev) in pseries_eeh_pe_get_parent() argument
326 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in pseries_eeh_pe_get_parent()
333 if (edev->physfn) in pseries_eeh_pe_get_parent()
334 pdn = pci_get_pdn(edev->physfn); in pseries_eeh_pe_get_parent()
[all …]
Dmsi.c191 struct eeh_dev *edev; in find_pe_dn() local
200 edev = pdn_to_eeh_dev(PCI_DN(dn)); in find_pe_dn()
201 if (edev->pe) in find_pe_dn()
202 edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, in find_pe_dn()
204 dn = pci_device_to_OF_node(edev->pdev); in find_pe_dn()
/arch/powerpc/include/asm/
Deeh.h104 #define eeh_pe_for_each_dev(pe, edev, tmp) \ argument
105 list_for_each_entry_safe(edev, tmp, &pe->edevs, entry)
155 #define EEH_EDEV_PRINT(level, edev, fmt, ...) \ argument
157 (edev)->controller->global_number, PCI_BUSNO((edev)->bdfn), \
158 PCI_SLOT((edev)->bdfn), PCI_FUNC((edev)->bdfn), \
159 ((edev)->pe ? (edev)->pe_config_addr : 0xffff), ##__VA_ARGS__)
160 #define eeh_edev_dbg(edev, fmt, ...) EEH_EDEV_PRINT(debug, (edev), fmt, ##__VA_ARGS__) argument
161 #define eeh_edev_info(edev, fmt, ...) EEH_EDEV_PRINT(info, (edev), fmt, ##__VA_ARGS__) argument
162 #define eeh_edev_warn(edev, fmt, ...) EEH_EDEV_PRINT(warn, (edev), fmt, ##__VA_ARGS__) argument
163 #define eeh_edev_err(edev, fmt, ...) EEH_EDEV_PRINT(err, (edev), fmt, ##__VA_ARGS__) argument
[all …]
Ddevice.h36 struct eeh_dev *edev; member
Dppc-pci.h53 void eeh_save_bars(struct eeh_dev *edev);
Dpci-bridge.h200 struct eeh_dev *edev; /* eeh device */ member
247 return pdn ? pdn->edev : NULL; in pdn_to_eeh_dev()
/arch/powerpc/platforms/powernv/
Deeh-powernv.c267 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_find_ecap() local
271 if (!edev || !edev->pcie_cap) in pnv_eeh_find_ecap()
326 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_probe() local
338 if (!edev || edev->pe) in pnv_eeh_probe()
342 if (edev->pdev) { in pnv_eeh_probe()
346 return edev; in pnv_eeh_probe()
353 eeh_edev_dbg(edev, "Probing device\n"); in pnv_eeh_probe()
356 edev->mode &= 0xFFFFFF00; 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()
[all …]
Dpci.c717 struct eeh_dev *edev = NULL; in pnv_pci_cfg_check() local
725 edev = pdn->edev; in pnv_pci_cfg_check()
726 if (edev) { in pnv_pci_cfg_check()
727 if (edev->pe && in pnv_pci_cfg_check()
728 (edev->pe->state & EEH_PE_CFG_BLOCKED)) in pnv_pci_cfg_check()
731 if (edev->mode & EEH_DEV_REMOVED) in pnv_pci_cfg_check()
762 if (phb->flags & PNV_PHB_FLAG_EEH && pdn->edev) { in pnv_pci_read_config()
764 eeh_dev_check_failure(pdn->edev)) in pnv_pci_read_config()
Dpci-ioda.c2844 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in pnv_npu_disable_device() local
2845 struct eeh_pe *eehpe = edev ? edev->pe : NULL; in pnv_npu_disable_device()