Lines Matching refs:pdev

28 	struct pci_dev *pdev = to_pci_dev(dev);               \
29 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); \
44 struct pci_dev *pdev = to_pci_dev(dev); in eeh_pe_state_show() local
45 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_show()
60 struct pci_dev *pdev = to_pci_dev(dev); in eeh_pe_state_store() local
61 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_pe_state_store()
83 struct pci_dev *pdev = to_pci_dev(dev); in eeh_notify_resume_show() local
84 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_notify_resume_show()
85 struct pci_dn *pdn = pci_get_pdn(pdev); in eeh_notify_resume_show()
97 struct pci_dev *pdev = to_pci_dev(dev); in eeh_notify_resume_store() local
98 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_notify_resume_store()
110 static int eeh_notify_resume_add(struct pci_dev *pdev) in eeh_notify_resume_add() argument
115 np = pci_device_to_OF_node(pdev->is_physfn ? pdev : pdev->physfn); in eeh_notify_resume_add()
118 rc = device_create_file(&pdev->dev, &dev_attr_eeh_notify_resume); in eeh_notify_resume_add()
123 static void eeh_notify_resume_remove(struct pci_dev *pdev) in eeh_notify_resume_remove() argument
127 np = pci_device_to_OF_node(pdev->is_physfn ? pdev : pdev->physfn); in eeh_notify_resume_remove()
130 device_remove_file(&pdev->dev, &dev_attr_eeh_notify_resume); in eeh_notify_resume_remove()
133 static inline int eeh_notify_resume_add(struct pci_dev *pdev) { return 0; } in eeh_notify_resume_add() argument
134 static inline void eeh_notify_resume_remove(struct pci_dev *pdev) { } in eeh_notify_resume_remove() argument
137 void eeh_sysfs_add_device(struct pci_dev *pdev) in eeh_sysfs_add_device() argument
139 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_sysfs_add_device()
148 rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode); in eeh_sysfs_add_device()
149 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); in eeh_sysfs_add_device()
150 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_state); in eeh_sysfs_add_device()
151 rc += eeh_notify_resume_add(pdev); in eeh_sysfs_add_device()
159 void eeh_sysfs_remove_device(struct pci_dev *pdev) in eeh_sysfs_remove_device() argument
161 struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); in eeh_sysfs_remove_device()
174 if (!pdev->dev.kobj.sd) in eeh_sysfs_remove_device()
177 device_remove_file(&pdev->dev, &dev_attr_eeh_mode); in eeh_sysfs_remove_device()
178 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); in eeh_sysfs_remove_device()
179 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_state); in eeh_sysfs_remove_device()
181 eeh_notify_resume_remove(pdev); in eeh_sysfs_remove_device()