Lines Matching refs:pdev
27 struct pci_dev *pdev = to_pci_dev(dev); \
28 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); \
43 struct pci_dev *pdev = to_pci_dev(dev); in eeh_pe_state_show() local
44 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_show()
59 struct pci_dev *pdev = to_pci_dev(dev); in eeh_pe_state_store() local
60 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_store()
82 struct pci_dev *pdev = to_pci_dev(dev); in eeh_notify_resume_show() local
83 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_notify_resume_show()
84 struct pci_dn *pdn = pci_get_pdn(pdev); in eeh_notify_resume_show()
96 struct pci_dev *pdev = to_pci_dev(dev); in eeh_notify_resume_store() local
97 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_notify_resume_store()
109 static int eeh_notify_resume_add(struct pci_dev *pdev) in eeh_notify_resume_add() argument
114 np = pci_device_to_OF_node(pdev->is_physfn ? pdev : pdev->physfn); in eeh_notify_resume_add()
117 rc = device_create_file(&pdev->dev, &dev_attr_eeh_notify_resume); in eeh_notify_resume_add()
122 static void eeh_notify_resume_remove(struct pci_dev *pdev) in eeh_notify_resume_remove() argument
126 np = pci_device_to_OF_node(pdev->is_physfn ? pdev : pdev->physfn); in eeh_notify_resume_remove()
129 device_remove_file(&pdev->dev, &dev_attr_eeh_notify_resume); in eeh_notify_resume_remove()
132 static inline int eeh_notify_resume_add(struct pci_dev *pdev) { return 0; } in eeh_notify_resume_add() argument
133 static inline void eeh_notify_resume_remove(struct pci_dev *pdev) { } in eeh_notify_resume_remove() argument
136 void eeh_sysfs_add_device(struct pci_dev *pdev) in eeh_sysfs_add_device() argument
138 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_sysfs_add_device()
147 rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode); in eeh_sysfs_add_device()
148 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); in eeh_sysfs_add_device()
149 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_state); in eeh_sysfs_add_device()
150 rc += eeh_notify_resume_add(pdev); in eeh_sysfs_add_device()
158 void eeh_sysfs_remove_device(struct pci_dev *pdev) in eeh_sysfs_remove_device() argument
160 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_sysfs_remove_device()
173 if (!pdev->dev.kobj.sd) in eeh_sysfs_remove_device()
176 device_remove_file(&pdev->dev, &dev_attr_eeh_mode); in eeh_sysfs_remove_device()
177 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); in eeh_sysfs_remove_device()
178 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_state); in eeh_sysfs_remove_device()
180 eeh_notify_resume_remove(pdev); in eeh_sysfs_remove_device()