Lines Matching refs:pdev

43 	struct pci_dev *pdev = to_pci_dev(dev);               \
44 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); \
59 struct pci_dev *pdev = to_pci_dev(dev); in eeh_pe_state_show() local
60 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_show()
75 struct pci_dev *pdev = to_pci_dev(dev); in eeh_pe_state_store() local
76 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_store()
98 struct pci_dev *pdev = to_pci_dev(dev); in eeh_notify_resume_show() local
99 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_notify_resume_show()
100 struct pci_dn *pdn = pci_get_pdn(pdev); in eeh_notify_resume_show()
105 pdn = pci_get_pdn(pdev); in eeh_notify_resume_show()
113 struct pci_dev *pdev = to_pci_dev(dev); in eeh_notify_resume_store() local
114 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_notify_resume_store()
119 if (eeh_ops->notify_resume(pci_get_pdn(pdev))) in eeh_notify_resume_store()
126 static int eeh_notify_resume_add(struct pci_dev *pdev) in eeh_notify_resume_add() argument
131 np = pci_device_to_OF_node(pdev->is_physfn ? pdev : pdev->physfn); in eeh_notify_resume_add()
134 rc = device_create_file(&pdev->dev, &dev_attr_eeh_notify_resume); in eeh_notify_resume_add()
139 static void eeh_notify_resume_remove(struct pci_dev *pdev) in eeh_notify_resume_remove() argument
143 np = pci_device_to_OF_node(pdev->is_physfn ? pdev : pdev->physfn); in eeh_notify_resume_remove()
146 device_remove_file(&pdev->dev, &dev_attr_eeh_notify_resume); in eeh_notify_resume_remove()
149 static inline int eeh_notify_resume_add(struct pci_dev *pdev) { return 0; } in eeh_notify_resume_add() argument
150 static inline void eeh_notify_resume_remove(struct pci_dev *pdev) { } in eeh_notify_resume_remove() argument
153 void eeh_sysfs_add_device(struct pci_dev *pdev) in eeh_sysfs_add_device() argument
155 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_sysfs_add_device()
164 rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode); in eeh_sysfs_add_device()
165 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); in eeh_sysfs_add_device()
166 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_state); in eeh_sysfs_add_device()
167 rc += eeh_notify_resume_add(pdev); in eeh_sysfs_add_device()
175 void eeh_sysfs_remove_device(struct pci_dev *pdev) in eeh_sysfs_remove_device() argument
177 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_sysfs_remove_device()
183 if (!pdev->dev.kobj.sd) { in eeh_sysfs_remove_device()
189 device_remove_file(&pdev->dev, &dev_attr_eeh_mode); in eeh_sysfs_remove_device()
190 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); in eeh_sysfs_remove_device()
191 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_state); in eeh_sysfs_remove_device()
193 eeh_notify_resume_remove(pdev); in eeh_sysfs_remove_device()