• Home
  • Raw
  • Download

Lines Matching refs:edev

168 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()
202 cap = edev->pcix_cap; in eeh_dump_dev_log()
204 eeh_ops->read_config(edev, cap, 4, &cfg); in eeh_dump_dev_log()
208 eeh_ops->read_config(edev, cap+4, 4, &cfg); in eeh_dump_dev_log()
214 cap = edev->pcie_cap; in eeh_dump_dev_log()
220 eeh_ops->read_config(edev, cap+4*i, 4, &cfg); in eeh_dump_dev_log()
241 cap = edev->aer_cap; in eeh_dump_dev_log()
247 eeh_ops->read_config(edev, cap+4*i, 4, &cfg); in eeh_dump_dev_log()
271 struct eeh_dev *edev, *tmp; in eeh_dump_pe_log() local
274 eeh_pe_for_each_dev(pe, edev, tmp) in eeh_dump_pe_log()
275 *plen += eeh_dump_dev_log(edev, pci_regs_buf + *plen, in eeh_dump_pe_log()
437 int eeh_dev_check_failure(struct eeh_dev *edev) in eeh_dev_check_failure() argument
452 if (!edev) { in eeh_dev_check_failure()
456 dev = eeh_dev_to_pci_dev(edev); in eeh_dev_check_failure()
457 pe = eeh_dev_to_pe(edev); in eeh_dev_check_failure()
462 eeh_edev_dbg(edev, "Ignored check\n"); in eeh_dev_check_failure()
497 eeh_edev_err(edev, "%d reads ignored for recovering device at location=%s driver=%s\n", in eeh_dev_check_failure()
501 eeh_edev_err(edev, "Might be infinite loop in %s driver\n", in eeh_dev_check_failure()
595 struct eeh_dev *edev; in eeh_check_failure() local
599 edev = eeh_addr_cache_get_dev(addr); in eeh_check_failure()
600 if (!edev) { in eeh_check_failure()
605 return eeh_dev_check_failure(edev); in eeh_check_failure()
687 static void eeh_disable_and_save_dev_state(struct eeh_dev *edev, in eeh_disable_and_save_dev_state() argument
690 struct pci_dev *pdev = eeh_dev_to_pci_dev(edev); in eeh_disable_and_save_dev_state()
713 static void eeh_restore_dev_state(struct eeh_dev *edev, void *userdata) in eeh_restore_dev_state() argument
715 struct pci_dev *pdev = eeh_dev_to_pci_dev(edev); in eeh_restore_dev_state()
723 eeh_ops->restore_config(edev); in eeh_restore_dev_state()
740 struct eeh_dev *edev = pci_dev_to_eeh_dev(dev); in pcibios_set_pcie_reset_state() local
741 struct eeh_pe *pe = eeh_dev_to_pe(edev); in pcibios_set_pcie_reset_state()
794 static void eeh_set_dev_freset(struct eeh_dev *edev, void *flag) in eeh_set_dev_freset() argument
799 dev = eeh_dev_to_pci_dev(edev); in eeh_set_dev_freset()
904 void eeh_save_bars(struct eeh_dev *edev) in eeh_save_bars() argument
908 if (!edev) in eeh_save_bars()
912 eeh_ops->read_config(edev, i * 4, 4, &edev->config_space[i]); in eeh_save_bars()
920 if (edev->mode & EEH_DEV_BRIDGE) in eeh_save_bars()
921 edev->config_space[1] |= PCI_COMMAND_MASTER; in eeh_save_bars()
1010 struct eeh_dev *edev; in eeh_probe_device() local
1023 edev = eeh_ops->probe(dev); in eeh_probe_device()
1024 if (!edev) { in eeh_probe_device()
1038 if (edev->pdev && edev->pdev != dev) { in eeh_probe_device()
1039 eeh_pe_tree_remove(edev); in eeh_probe_device()
1040 eeh_addr_cache_rmv_dev(edev->pdev); in eeh_probe_device()
1041 eeh_sysfs_remove_device(edev->pdev); in eeh_probe_device()
1048 edev->mode |= EEH_DEV_NO_HANDLER; in eeh_probe_device()
1052 edev->pdev = dev; in eeh_probe_device()
1053 dev->dev.archdata.edev = edev; in eeh_probe_device()
1070 struct eeh_dev *edev; in eeh_remove_device() local
1074 edev = pci_dev_to_eeh_dev(dev); in eeh_remove_device()
1079 if (!edev || !edev->pdev || !edev->pe) { in eeh_remove_device()
1090 edev->pdev = NULL; in eeh_remove_device()
1096 if (edev->mode & EEH_DEV_SYSFS) in eeh_remove_device()
1105 edev->mode |= EEH_DEV_NO_HANDLER; in eeh_remove_device()
1115 edev->in_error = false; in eeh_remove_device()
1116 dev->dev.archdata.edev = NULL; in eeh_remove_device()
1117 if (!(edev->pe->state & EEH_PE_KEEP)) in eeh_remove_device()
1118 eeh_pe_tree_remove(edev); in eeh_remove_device()
1120 edev->mode |= EEH_DEV_DISCONNECTED; in eeh_remove_device()
1154 struct eeh_dev *edev, *tmp; in eeh_pe_change_owner() local
1169 eeh_pe_for_each_dev(pe, edev, tmp) { in eeh_pe_change_owner()
1170 pdev = eeh_dev_to_pci_dev(edev); in eeh_pe_change_owner()
1209 struct eeh_dev *edev; in eeh_dev_open() local
1219 edev = pci_dev_to_eeh_dev(pdev); in eeh_dev_open()
1220 if (!edev || !edev->pe) in eeh_dev_open()
1229 ret = eeh_pe_change_owner(edev->pe); in eeh_dev_open()
1234 atomic_inc(&edev->pe->pass_dev_cnt); in eeh_dev_open()
1254 struct eeh_dev *edev; in eeh_dev_release() local
1263 edev = pci_dev_to_eeh_dev(pdev); in eeh_dev_release()
1264 if (!edev || !edev->pe || !eeh_pe_passed(edev->pe)) in eeh_dev_release()
1268 WARN_ON(atomic_dec_if_positive(&edev->pe->pass_dev_cnt) < 0); in eeh_dev_release()
1269 eeh_pe_change_owner(edev->pe); in eeh_dev_release()
1302 struct eeh_dev *edev; in eeh_iommu_group_to_pe() local
1314 edev = pci_dev_to_eeh_dev(pdev); in eeh_iommu_group_to_pe()
1315 if (!edev || !edev->pe) in eeh_iommu_group_to_pe()
1318 return edev->pe; in eeh_iommu_group_to_pe()
1427 struct eeh_dev *edev, *tmp; in eeh_pe_reenable_devices() local
1437 eeh_pe_for_each_dev(pe, edev, tmp) { in eeh_pe_reenable_devices()
1438 pdev = eeh_dev_to_pci_dev(edev); in eeh_pe_reenable_devices()
1690 struct eeh_dev *edev; in eeh_dev_check_write() local
1709 edev = pci_dev_to_eeh_dev(pdev); in eeh_dev_check_write()
1710 if (!edev) { in eeh_dev_check_write()
1716 ret = eeh_dev_check_failure(edev); in eeh_dev_check_write()