Lines Matching refs:pdn
302 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_pe_get_parent() local
310 pdn = pci_get_pdn(edev->physfn); in eeh_pe_get_parent()
312 pdn = pdn ? pdn->parent : NULL; in eeh_pe_get_parent()
313 while (pdn) { in eeh_pe_get_parent()
315 parent = pdn_to_eeh_dev(pdn); in eeh_pe_get_parent()
322 pdn = pdn->parent; in eeh_pe_get_parent()
340 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_add_to_parent_pe() local
341 int config_addr = (pdn->busno << 8) | (pdn->devfn); in eeh_add_to_parent_pe()
346 __func__, config_addr, pdn->phb->global_number); in eeh_add_to_parent_pe()
356 pe = eeh_pe_get(pdn->phb, edev->pe_config_addr, config_addr); in eeh_add_to_parent_pe()
365 pdn->phb->global_number, in eeh_add_to_parent_pe()
366 pdn->busno, in eeh_add_to_parent_pe()
367 PCI_SLOT(pdn->devfn), in eeh_add_to_parent_pe()
368 PCI_FUNC(pdn->devfn), in eeh_add_to_parent_pe()
388 pdn->phb->global_number, in eeh_add_to_parent_pe()
389 pdn->busno, in eeh_add_to_parent_pe()
390 PCI_SLOT(pdn->devfn), in eeh_add_to_parent_pe()
391 PCI_FUNC(pdn->devfn), in eeh_add_to_parent_pe()
398 pe = eeh_pe_alloc(pdn->phb, EEH_PE_VF); in eeh_add_to_parent_pe()
400 pe = eeh_pe_alloc(pdn->phb, EEH_PE_DEVICE); in eeh_add_to_parent_pe()
416 parent = eeh_phb_pe_get(pdn->phb); in eeh_add_to_parent_pe()
419 __func__, pdn->phb->global_number); in eeh_add_to_parent_pe()
436 pdn->phb->global_number, in eeh_add_to_parent_pe()
437 pdn->busno, in eeh_add_to_parent_pe()
438 PCI_SLOT(pdn->devfn), in eeh_add_to_parent_pe()
439 PCI_FUNC(pdn->devfn), in eeh_add_to_parent_pe()
458 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_rmv_from_parent_pe() local
462 __func__, pdn->phb->global_number, in eeh_rmv_from_parent_pe()
463 pdn->busno, in eeh_rmv_from_parent_pe()
464 PCI_SLOT(pdn->devfn), in eeh_rmv_from_parent_pe()
465 PCI_FUNC(pdn->devfn)); in eeh_rmv_from_parent_pe()
709 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_bridge_check_link() local
722 __func__, pdn->phb->global_number, in eeh_bridge_check_link()
723 pdn->busno, in eeh_bridge_check_link()
724 PCI_SLOT(pdn->devfn), in eeh_bridge_check_link()
725 PCI_FUNC(pdn->devfn)); in eeh_bridge_check_link()
729 eeh_ops->read_config(pdn, cap + PCI_EXP_SLTSTA, 2, &val); in eeh_bridge_check_link()
736 eeh_ops->read_config(pdn, cap + PCI_EXP_SLTCAP, 2, &val); in eeh_bridge_check_link()
738 eeh_ops->read_config(pdn, cap + PCI_EXP_SLTCTL, 2, &val); in eeh_bridge_check_link()
743 eeh_ops->write_config(pdn, cap + PCI_EXP_SLTCTL, 2, val); in eeh_bridge_check_link()
749 eeh_ops->read_config(pdn, cap + PCI_EXP_LNKCTL, 2, &val); in eeh_bridge_check_link()
751 eeh_ops->write_config(pdn, cap + PCI_EXP_LNKCTL, 2, val); in eeh_bridge_check_link()
754 eeh_ops->read_config(pdn, cap + PCI_EXP_LNKCAP, 4, &val); in eeh_bridge_check_link()
767 eeh_ops->read_config(pdn, cap + PCI_EXP_LNKSTA, 2, &val); in eeh_bridge_check_link()
784 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_restore_bridge_bars() local
792 eeh_ops->write_config(pdn, i*4, 4, edev->config_space[i]); in eeh_restore_bridge_bars()
794 eeh_ops->write_config(pdn, 14*4, 4, edev->config_space[14]); in eeh_restore_bridge_bars()
797 eeh_ops->write_config(pdn, PCI_CACHE_LINE_SIZE, 1, in eeh_restore_bridge_bars()
799 eeh_ops->write_config(pdn, PCI_LATENCY_TIMER, 1, in eeh_restore_bridge_bars()
802 eeh_ops->write_config(pdn, 15*4, 4, edev->config_space[15]); in eeh_restore_bridge_bars()
805 eeh_ops->write_config(pdn, PCI_COMMAND, 4, edev->config_space[1] | in eeh_restore_bridge_bars()
814 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_restore_device_bars() local
819 eeh_ops->write_config(pdn, i*4, 4, edev->config_space[i]); in eeh_restore_device_bars()
821 eeh_ops->write_config(pdn, 12*4, 4, edev->config_space[12]); in eeh_restore_device_bars()
823 eeh_ops->write_config(pdn, PCI_CACHE_LINE_SIZE, 1, in eeh_restore_device_bars()
825 eeh_ops->write_config(pdn, PCI_LATENCY_TIMER, 1, in eeh_restore_device_bars()
829 eeh_ops->write_config(pdn, 15*4, 4, edev->config_space[15]); in eeh_restore_device_bars()
835 eeh_ops->read_config(pdn, PCI_COMMAND, 4, &cmd); in eeh_restore_device_bars()
844 eeh_ops->write_config(pdn, PCI_COMMAND, 4, cmd); in eeh_restore_device_bars()
858 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_restore_one_device_bars() local
866 if (eeh_ops->restore_config && pdn) in eeh_restore_one_device_bars()
867 eeh_ops->restore_config(pdn); in eeh_restore_one_device_bars()