• Home
  • Raw
  • Download

Lines Matching refs:pdev

84 	if (!edev->pdev)  in eeh_edev_actionable()
86 if (edev->pdev->error_state == pci_channel_io_perm_failure) in eeh_edev_actionable()
105 static inline struct pci_driver *eeh_pcid_get(struct pci_dev *pdev) in eeh_pcid_get() argument
107 if (!pdev || !pdev->driver) in eeh_pcid_get()
110 if (!try_module_get(pdev->driver->driver.owner)) in eeh_pcid_get()
113 return pdev->driver; in eeh_pcid_get()
123 static inline void eeh_pcid_put(struct pci_dev *pdev) in eeh_pcid_put() argument
125 if (!pdev || !pdev->driver) in eeh_pcid_put()
128 module_put(pdev->driver->driver.owner); in eeh_pcid_put()
147 if (edev->pdev->msi_enabled || edev->pdev->msix_enabled) in eeh_disable_irq()
150 if (!irq_has_action(edev->pdev->irq)) in eeh_disable_irq()
154 disable_irq_nosync(edev->pdev->irq); in eeh_disable_irq()
188 if (irqd_irq_disabled(irq_get_irq_data(edev->pdev->irq))) in eeh_enable_irq()
189 enable_irq(edev->pdev->irq); in eeh_enable_irq()
195 struct pci_dev *pdev; in eeh_dev_save_state() local
210 pdev = eeh_dev_to_pci_dev(edev); in eeh_dev_save_state()
211 if (!pdev) in eeh_dev_save_state()
214 pci_save_state(pdev); in eeh_dev_save_state()
225 edev->pdev->error_state = s; in eeh_set_channel_state()
238 if (!eeh_pcid_get(edev->pdev)) in eeh_set_irq_state()
246 eeh_pcid_put(edev->pdev); in eeh_set_irq_state()
257 struct pci_dev *pdev; in eeh_pe_report_edev() local
262 pdev = edev->pdev; in eeh_pe_report_edev()
263 if (pdev) in eeh_pe_report_edev()
264 get_device(&pdev->dev); in eeh_pe_report_edev()
266 if (!pdev) { in eeh_pe_report_edev()
270 device_lock(&pdev->dev); in eeh_pe_report_edev()
272 driver = eeh_pcid_get(pdev); in eeh_pe_report_edev()
281 new_result = fn(edev, pdev, driver); in eeh_pe_report_edev()
290 eeh_pcid_put(pdev); in eeh_pe_report_edev()
292 eeh_edev_info(edev, "not actionable (%d,%d,%d)", !!pdev, in eeh_pe_report_edev()
295 device_unlock(&pdev->dev); in eeh_pe_report_edev()
296 if (edev->pdev != pdev) in eeh_pe_report_edev()
298 put_device(&pdev->dev); in eeh_pe_report_edev()
325 struct pci_dev *pdev, in eeh_report_error() argument
335 rc = driver->err_handler->error_detected(pdev, pci_channel_io_frozen); in eeh_report_error()
338 pci_uevent_ers(pdev, PCI_ERS_RESULT_NONE); in eeh_report_error()
351 struct pci_dev *pdev, in eeh_report_mmio_enabled() argument
357 return driver->err_handler->mmio_enabled(pdev); in eeh_report_mmio_enabled()
371 struct pci_dev *pdev, in eeh_report_reset() argument
377 return driver->err_handler->slot_reset(pdev); in eeh_report_reset()
382 struct pci_dev *pdev; in eeh_dev_restore_state() local
400 pdev = eeh_dev_to_pci_dev(edev); in eeh_dev_restore_state()
401 if (!pdev) in eeh_dev_restore_state()
404 pci_restore_state(pdev); in eeh_dev_restore_state()
417 struct pci_dev *pdev, in eeh_report_resume() argument
424 driver->err_handler->resume(pdev); in eeh_report_resume()
426 pci_uevent_ers(edev->pdev, PCI_ERS_RESULT_RECOVERED); in eeh_report_resume()
443 struct pci_dev *pdev, in eeh_report_failure() argument
453 rc = driver->err_handler->error_detected(pdev, in eeh_report_failure()
456 pci_uevent_ers(pdev, PCI_ERS_RESULT_DISCONNECT); in eeh_report_failure()
525 edev->pdev = NULL; in eeh_rmv_device()
761 static bool eeh_slot_presence_check(struct pci_dev *pdev) in eeh_slot_presence_check() argument
768 if (!pdev) in eeh_slot_presence_check()
771 if (pdev->error_state == pci_channel_io_perm_failure) in eeh_slot_presence_check()
774 slot = pdev->slot; in eeh_slot_presence_check()
793 static void eeh_clear_slot_attention(struct pci_dev *pdev) in eeh_clear_slot_attention() argument
798 if (!pdev) in eeh_clear_slot_attention()
801 if (pdev->error_state == pci_channel_io_perm_failure) in eeh_clear_slot_attention()
804 slot = pdev->slot; in eeh_clear_slot_attention()
865 if (eeh_slot_presence_check(edev->pdev)) in eeh_handle_normal_event()
1109 eeh_clear_slot_attention(edev->pdev); in eeh_handle_normal_event()