Lines Matching refs:pci_dev
25 bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
26 bool pcie_cap_has_lnkctl2(const struct pci_dev *dev);
27 bool pcie_cap_has_rtctl(const struct pci_dev *dev);
31 int pci_create_sysfs_dev_files(struct pci_dev *pdev);
32 void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
33 void pci_cleanup_rom(struct pci_dev *dev);
42 int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vmai,
45 bool pci_reset_supported(struct pci_dev *dev);
46 void pci_init_reset_methods(struct pci_dev *dev);
47 int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
48 int pci_bus_error_reset(struct pci_dev *dev);
62 void pci_allocate_cap_save_buffers(struct pci_dev *dev);
63 void pci_free_cap_save_buffers(struct pci_dev *dev);
64 int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size);
65 int pci_add_ext_cap_save_buffer(struct pci_dev *dev,
67 struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap);
68 struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev,
75 void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
76 void pci_refresh_power_state(struct pci_dev *dev);
77 int pci_power_up(struct pci_dev *dev);
78 void pci_disable_enabled_device(struct pci_dev *dev);
79 int pci_finish_runtime_suspend(struct pci_dev *dev);
80 void pcie_clear_device_status(struct pci_dev *dev);
81 void pcie_clear_root_pme_status(struct pci_dev *dev);
82 bool pci_check_pme_status(struct pci_dev *dev);
84 int __pci_pme_wakeup(struct pci_dev *dev, void *ign);
85 void pci_pme_restore(struct pci_dev *dev);
86 bool pci_dev_need_resume(struct pci_dev *dev);
87 void pci_dev_adjust_pme(struct pci_dev *dev);
88 void pci_dev_complete_resume(struct pci_dev *pci_dev);
89 void pci_config_pm_runtime_get(struct pci_dev *dev);
90 void pci_config_pm_runtime_put(struct pci_dev *dev);
91 void pci_pm_init(struct pci_dev *dev);
92 void pci_ea_init(struct pci_dev *dev);
93 void pci_msi_init(struct pci_dev *dev);
94 void pci_msix_init(struct pci_dev *dev);
95 bool pci_bridge_d3_possible(struct pci_dev *dev);
96 void pci_bridge_d3_update(struct pci_dev *dev);
97 void pci_bridge_reconfigure_ltr(struct pci_dev *dev);
98 int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type);
100 static inline void pci_wakeup_event(struct pci_dev *dev) in pci_wakeup_event()
106 static inline bool pci_has_subordinate(struct pci_dev *pci_dev) in pci_has_subordinate() argument
108 return !!(pci_dev->subordinate); in pci_has_subordinate()
111 static inline bool pci_power_manageable(struct pci_dev *pci_dev) in pci_power_manageable() argument
117 return !pci_has_subordinate(pci_dev) || pci_dev->bridge_d3; in pci_power_manageable()
120 static inline bool pcie_downstream_port(const struct pci_dev *dev) in pcie_downstream_port()
129 void pci_vpd_init(struct pci_dev *dev);
130 void pci_vpd_release(struct pci_dev *dev);
134 int pci_save_vc_state(struct pci_dev *dev);
135 void pci_restore_vc_state(struct pci_dev *dev);
136 void pci_allocate_vc_save_buffers(struct pci_dev *dev);
140 int pci_proc_attach_device(struct pci_dev *dev);
141 int pci_proc_detach_device(struct pci_dev *dev);
144 static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; } in pci_proc_attach_device()
145 static inline int pci_proc_detach_device(struct pci_dev *dev) { return 0; } in pci_proc_detach_device()
150 int pci_hp_add_bridge(struct pci_dev *dev);
176 static inline int pci_no_d1d2(struct pci_dev *dev) in pci_no_d1d2()
204 pci_match_one_device(const struct pci_device_id *id, const struct pci_dev *dev) in pci_match_one_device()
234 struct device *pci_get_host_bridge_device(struct pci_dev *dev);
237 int pci_configure_extended_tags(struct pci_dev *dev, void *ign);
244 int pci_setup_device(struct pci_dev *dev);
245 int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
247 void pci_configure_ari(struct pci_dev *dev);
253 bool pci_bus_clip_resource(struct pci_dev *dev, int idx);
255 void pci_reassigndev_resource_alignment(struct pci_dev *dev);
256 void pci_disable_bridge_window(struct pci_dev *dev);
281 enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
282 enum pcie_link_width pcie_get_width_cap(struct pci_dev *dev);
283 u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed,
285 void __pcie_print_link_status(struct pci_dev *dev, bool verbose);
286 void pcie_report_downtraining(struct pci_dev *dev);
305 struct pci_dev *dev; /* Lowest numbered PF */
306 struct pci_dev *self; /* This PF */
316 void pci_doe_init(struct pci_dev *pdev);
317 void pci_doe_destroy(struct pci_dev *pdev);
318 void pci_doe_disconnected(struct pci_dev *pdev);
320 static inline void pci_doe_init(struct pci_dev *pdev) { } in pci_doe_init()
321 static inline void pci_doe_destroy(struct pci_dev *pdev) { } in pci_doe_destroy()
322 static inline void pci_doe_disconnected(struct pci_dev *pdev) { } in pci_doe_disconnected()
336 static inline bool pci_dev_set_io_state(struct pci_dev *dev, in pci_dev_set_io_state()
358 static inline int pci_dev_set_disconnected(struct pci_dev *dev, void *unused) in pci_dev_set_disconnected()
371 static inline void pci_dev_assign_added(struct pci_dev *dev, bool added) in pci_dev_assign_added()
376 static inline bool pci_dev_is_added(const struct pci_dev *dev) in pci_dev_is_added()
387 struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES];
405 int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info);
406 void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
419 void pci_save_dpc_state(struct pci_dev *dev);
420 void pci_restore_dpc_state(struct pci_dev *dev);
421 void pci_dpc_init(struct pci_dev *pdev);
422 void dpc_process_error(struct pci_dev *pdev);
423 pci_ers_result_t dpc_reset_link(struct pci_dev *pdev);
424 bool pci_dpc_recovered(struct pci_dev *pdev);
426 static inline void pci_save_dpc_state(struct pci_dev *dev) { } in pci_save_dpc_state()
427 static inline void pci_restore_dpc_state(struct pci_dev *dev) { } in pci_restore_dpc_state()
428 static inline void pci_dpc_init(struct pci_dev *pdev) { } in pci_dpc_init()
429 static inline bool pci_dpc_recovered(struct pci_dev *pdev) { return false; } in pci_dpc_recovered()
433 void pci_rcec_init(struct pci_dev *dev);
434 void pci_rcec_exit(struct pci_dev *dev);
435 void pcie_link_rcec(struct pci_dev *rcec);
436 void pcie_walk_rcec(struct pci_dev *rcec,
437 int (*cb)(struct pci_dev *, void *),
440 static inline void pci_rcec_init(struct pci_dev *dev) { } in pci_rcec_init()
441 static inline void pci_rcec_exit(struct pci_dev *dev) { } in pci_rcec_exit()
442 static inline void pcie_link_rcec(struct pci_dev *rcec) { } in pcie_link_rcec()
443 static inline void pcie_walk_rcec(struct pci_dev *rcec, in pcie_walk_rcec()
444 int (*cb)(struct pci_dev *, void *), in pcie_walk_rcec() argument
450 void pci_ats_init(struct pci_dev *dev);
451 void pci_restore_ats_state(struct pci_dev *dev);
453 static inline void pci_ats_init(struct pci_dev *d) { } in pci_ats_init()
454 static inline void pci_restore_ats_state(struct pci_dev *dev) { } in pci_restore_ats_state()
458 void pci_pri_init(struct pci_dev *dev);
459 void pci_restore_pri_state(struct pci_dev *pdev);
461 static inline void pci_pri_init(struct pci_dev *dev) { } in pci_pri_init()
462 static inline void pci_restore_pri_state(struct pci_dev *pdev) { } in pci_restore_pri_state()
466 void pci_pasid_init(struct pci_dev *dev);
467 void pci_restore_pasid_state(struct pci_dev *pdev);
469 static inline void pci_pasid_init(struct pci_dev *dev) { } in pci_pasid_init()
470 static inline void pci_restore_pasid_state(struct pci_dev *pdev) { } in pci_restore_pasid_state()
474 int pci_iov_init(struct pci_dev *dev);
475 void pci_iov_release(struct pci_dev *dev);
476 void pci_iov_remove(struct pci_dev *dev);
477 void pci_iov_update_resource(struct pci_dev *dev, int resno);
478 resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno);
479 void pci_restore_iov_state(struct pci_dev *dev);
484 static inline int pci_iov_init(struct pci_dev *dev) in pci_iov_init()
488 static inline void pci_iov_release(struct pci_dev *dev) { } in pci_iov_release()
489 static inline void pci_iov_remove(struct pci_dev *dev) { } in pci_iov_remove()
490 static inline void pci_restore_iov_state(struct pci_dev *dev) { } in pci_restore_iov_state()
499 void pci_ptm_init(struct pci_dev *dev);
500 void pci_save_ptm_state(struct pci_dev *dev);
501 void pci_restore_ptm_state(struct pci_dev *dev);
502 void pci_suspend_ptm(struct pci_dev *dev);
503 void pci_resume_ptm(struct pci_dev *dev);
505 static inline void pci_ptm_init(struct pci_dev *dev) { } in pci_ptm_init()
506 static inline void pci_save_ptm_state(struct pci_dev *dev) { } in pci_save_ptm_state()
507 static inline void pci_restore_ptm_state(struct pci_dev *dev) { } in pci_restore_ptm_state()
508 static inline void pci_suspend_ptm(struct pci_dev *dev) { } in pci_suspend_ptm()
509 static inline void pci_resume_ptm(struct pci_dev *dev) { } in pci_resume_ptm()
514 static inline resource_size_t pci_resource_alignment(struct pci_dev *dev, in pci_resource_alignment()
528 void pci_acs_init(struct pci_dev *dev);
530 int pci_dev_specific_acs_enabled(struct pci_dev *dev, u16 acs_flags);
531 int pci_dev_specific_enable_acs(struct pci_dev *dev);
532 int pci_dev_specific_disable_acs_redir(struct pci_dev *dev);
533 int pcie_failed_link_retrain(struct pci_dev *dev);
535 static inline int pci_dev_specific_acs_enabled(struct pci_dev *dev, in pci_dev_specific_acs_enabled()
540 static inline int pci_dev_specific_enable_acs(struct pci_dev *dev) in pci_dev_specific_enable_acs()
544 static inline int pci_dev_specific_disable_acs_redir(struct pci_dev *dev) in pci_dev_specific_disable_acs_redir()
548 static inline int pcie_failed_link_retrain(struct pci_dev *dev) in pcie_failed_link_retrain()
555 pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
557 pci_ers_result_t (*reset_subordinates)(struct pci_dev *pdev));
559 bool pcie_wait_for_link(struct pci_dev *pdev, bool active);
560 int pcie_retrain_link(struct pci_dev *pdev, bool use_lt);
562 void pcie_aspm_init_link_state(struct pci_dev *pdev);
563 void pcie_aspm_exit_link_state(struct pci_dev *pdev);
564 void pcie_aspm_pm_state_change(struct pci_dev *pdev, bool locked);
565 void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
567 static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { } in pcie_aspm_init_link_state()
568 static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { } in pcie_aspm_exit_link_state()
569 static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev, bool locked) { } in pcie_aspm_pm_state_change()
570 static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { } in pcie_aspm_powersave_config_link()
574 void pcie_set_ecrc_checking(struct pci_dev *dev);
577 static inline void pcie_set_ecrc_checking(struct pci_dev *dev) { } in pcie_set_ecrc_checking()
584 int (*reset)(struct pci_dev *dev, bool probe);
588 int (*reset_fn)(struct pci_dev *pdev, bool probe);
593 int pci_dev_specific_reset(struct pci_dev *dev, bool probe);
595 static inline int pci_dev_specific_reset(struct pci_dev *dev, bool probe) in pci_dev_specific_reset()
612 int pci_rebar_get_current_size(struct pci_dev *pdev, int bar);
613 int pci_rebar_set_size(struct pci_dev *pdev, int bar, int size);
628 int pci_set_of_node(struct pci_dev *dev);
629 void pci_release_of_node(struct pci_dev *dev);
666 static inline int pci_set_of_node(struct pci_dev *dev) { return 0; } in pci_set_of_node()
667 static inline void pci_release_of_node(struct pci_dev *dev) { } in pci_release_of_node()
681 void of_pci_make_dev_node(struct pci_dev *pdev);
682 void of_pci_remove_node(struct pci_dev *pdev);
683 int of_pci_add_properties(struct pci_dev *pdev, struct of_changeset *ocs,
686 static inline void of_pci_make_dev_node(struct pci_dev *pdev) { } in of_pci_make_dev_node()
687 static inline void of_pci_remove_node(struct pci_dev *pdev) { } in of_pci_remove_node()
692 void pci_aer_init(struct pci_dev *dev);
693 void pci_aer_exit(struct pci_dev *dev);
695 void pci_aer_clear_fatal_status(struct pci_dev *dev);
696 int pci_aer_clear_status(struct pci_dev *dev);
697 int pci_aer_raw_clear_status(struct pci_dev *dev);
698 void pci_save_aer_state(struct pci_dev *dev);
699 void pci_restore_aer_state(struct pci_dev *dev);
702 static inline void pci_aer_init(struct pci_dev *d) { } in pci_aer_init()
703 static inline void pci_aer_exit(struct pci_dev *d) { } in pci_aer_exit()
704 static inline void pci_aer_clear_fatal_status(struct pci_dev *dev) { } in pci_aer_clear_fatal_status()
705 static inline int pci_aer_clear_status(struct pci_dev *dev) { return -EINVAL; } in pci_aer_clear_status()
706 static inline int pci_aer_raw_clear_status(struct pci_dev *dev) { return -EINVAL; } in pci_aer_raw_clear_status()
707 static inline void pci_save_aer_state(struct pci_dev *dev) { } in pci_save_aer_state()
708 static inline void pci_restore_aer_state(struct pci_dev *dev) { } in pci_restore_aer_state()
712 int pci_acpi_program_hp_params(struct pci_dev *dev);
714 void pci_set_acpi_fwnode(struct pci_dev *dev);
715 int pci_dev_acpi_reset(struct pci_dev *dev, bool probe);
716 bool acpi_pci_power_manageable(struct pci_dev *dev);
717 bool acpi_pci_bridge_d3(struct pci_dev *dev);
718 int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state);
719 pci_power_t acpi_pci_get_power_state(struct pci_dev *dev);
720 void acpi_pci_refresh_power_state(struct pci_dev *dev);
721 int acpi_pci_wakeup(struct pci_dev *dev, bool enable);
722 bool acpi_pci_need_resume(struct pci_dev *dev);
723 pci_power_t acpi_pci_choose_state(struct pci_dev *pdev);
725 static inline int pci_dev_acpi_reset(struct pci_dev *dev, bool probe) in pci_dev_acpi_reset()
729 static inline void pci_set_acpi_fwnode(struct pci_dev *dev) { } in pci_set_acpi_fwnode()
730 static inline int pci_acpi_program_hp_params(struct pci_dev *dev) in pci_acpi_program_hp_params()
734 static inline bool acpi_pci_power_manageable(struct pci_dev *dev) in acpi_pci_power_manageable()
738 static inline bool acpi_pci_bridge_d3(struct pci_dev *dev) in acpi_pci_bridge_d3()
742 static inline int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) in acpi_pci_set_power_state()
746 static inline pci_power_t acpi_pci_get_power_state(struct pci_dev *dev) in acpi_pci_get_power_state()
750 static inline void acpi_pci_refresh_power_state(struct pci_dev *dev) { } in acpi_pci_refresh_power_state()
751 static inline int acpi_pci_wakeup(struct pci_dev *dev, bool enable) in acpi_pci_wakeup()
755 static inline bool acpi_pci_need_resume(struct pci_dev *dev) in acpi_pci_need_resume()
759 static inline pci_power_t acpi_pci_choose_state(struct pci_dev *pdev) in acpi_pci_choose_state()
773 int mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state);
774 pci_power_t mid_pci_get_power_state(struct pci_dev *pdev);
780 static inline int mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state) in mid_pci_set_power_state()
784 static inline pci_power_t mid_pci_get_power_state(struct pci_dev *pdev) in mid_pci_get_power_state()