Lines Matching refs:pci_dev
86 bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
87 bool pcie_cap_has_lnkctl2(const struct pci_dev *dev);
88 bool pcie_cap_has_rtctl(const struct pci_dev *dev);
100 int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vmai,
103 bool pci_reset_supported(struct pci_dev *dev);
104 void pci_init_reset_methods(struct pci_dev *dev);
105 int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
106 int pci_bus_error_reset(struct pci_dev *dev);
120 void pci_allocate_cap_save_buffers(struct pci_dev *dev);
121 void pci_free_cap_save_buffers(struct pci_dev *dev);
122 int pci_add_cap_save_buffer(struct pci_dev *dev, char cap, unsigned int size);
123 int pci_add_ext_cap_save_buffer(struct pci_dev *dev,
125 struct pci_cap_saved_state *pci_find_saved_cap(struct pci_dev *dev, char cap);
126 struct pci_cap_saved_state *pci_find_saved_ext_cap(struct pci_dev *dev,
133 void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
134 void pci_refresh_power_state(struct pci_dev *dev);
135 int pci_power_up(struct pci_dev *dev);
136 void pci_disable_enabled_device(struct pci_dev *dev);
137 int pci_finish_runtime_suspend(struct pci_dev *dev);
138 void pcie_clear_device_status(struct pci_dev *dev);
139 void pcie_clear_root_pme_status(struct pci_dev *dev);
140 bool pci_check_pme_status(struct pci_dev *dev);
142 void pci_pme_restore(struct pci_dev *dev);
143 bool pci_dev_need_resume(struct pci_dev *dev);
144 void pci_dev_adjust_pme(struct pci_dev *dev);
145 void pci_dev_complete_resume(struct pci_dev *pci_dev);
146 void pci_config_pm_runtime_get(struct pci_dev *dev);
147 void pci_config_pm_runtime_put(struct pci_dev *dev);
148 void pci_pm_init(struct pci_dev *dev);
149 void pci_ea_init(struct pci_dev *dev);
150 void pci_msi_init(struct pci_dev *dev);
151 void pci_msix_init(struct pci_dev *dev);
152 bool pci_bridge_d3_possible(struct pci_dev *dev);
153 void pci_bridge_d3_update(struct pci_dev *dev);
154 int pci_bridge_wait_for_secondary_bus(struct pci_dev *dev, char *reset_type);
161 static inline void pci_wakeup_event(struct pci_dev *dev) in pci_wakeup_event()
167 static inline bool pci_has_subordinate(struct pci_dev *pci_dev) in pci_has_subordinate() argument
169 return !!(pci_dev->subordinate); in pci_has_subordinate()
172 static inline bool pci_power_manageable(struct pci_dev *pci_dev) in pci_power_manageable() argument
178 return !pci_has_subordinate(pci_dev) || pci_dev->bridge_d3; in pci_power_manageable()
181 static inline bool pcie_downstream_port(const struct pci_dev *dev) in pcie_downstream_port()
190 void pci_vpd_init(struct pci_dev *dev);
194 int pci_save_vc_state(struct pci_dev *dev);
195 void pci_restore_vc_state(struct pci_dev *dev);
196 void pci_allocate_vc_save_buffers(struct pci_dev *dev);
200 int pci_proc_attach_device(struct pci_dev *dev);
201 int pci_proc_detach_device(struct pci_dev *dev);
204 static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; } in pci_proc_attach_device()
205 static inline int pci_proc_detach_device(struct pci_dev *dev) { return 0; } in pci_proc_detach_device()
210 int pci_hp_add_bridge(struct pci_dev *dev);
236 static inline int pci_no_d1d2(struct pci_dev *dev) in pci_no_d1d2()
247 int pci_create_sysfs_dev_files(struct pci_dev *pdev);
248 void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
254 static inline int pci_create_sysfs_dev_files(struct pci_dev *pdev) { return 0; } in pci_create_sysfs_dev_files()
255 static inline void pci_remove_sysfs_dev_files(struct pci_dev *pdev) { } in pci_remove_sysfs_dev_files()
276 pci_match_one_device(const struct pci_device_id *id, const struct pci_dev *dev) in pci_match_one_device()
306 struct device *pci_get_host_bridge_device(struct pci_dev *dev);
309 int pci_configure_extended_tags(struct pci_dev *dev, void *ign);
316 int pci_setup_device(struct pci_dev *dev);
317 int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
319 void pci_configure_ari(struct pci_dev *dev);
325 bool pci_bus_clip_resource(struct pci_dev *dev, int idx);
327 const char *pci_resource_name(struct pci_dev *dev, unsigned int i);
329 void pci_reassigndev_resource_alignment(struct pci_dev *dev);
330 void pci_disable_bridge_window(struct pci_dev *dev);
377 enum pci_bus_speed pcie_get_speed_cap(struct pci_dev *dev);
378 enum pcie_link_width pcie_get_width_cap(struct pci_dev *dev);
379 void __pcie_print_link_status(struct pci_dev *dev, bool verbose);
380 void pcie_report_downtraining(struct pci_dev *dev);
399 struct pci_dev *dev; /* Lowest numbered PF */
400 struct pci_dev *self; /* This PF */
410 void pci_doe_init(struct pci_dev *pdev);
411 void pci_doe_destroy(struct pci_dev *pdev);
412 void pci_doe_disconnected(struct pci_dev *pdev);
414 static inline void pci_doe_init(struct pci_dev *pdev) { } in pci_doe_init()
415 static inline void pci_doe_destroy(struct pci_dev *pdev) { } in pci_doe_destroy()
416 static inline void pci_doe_disconnected(struct pci_dev *pdev) { } in pci_doe_disconnected()
420 void pci_npem_create(struct pci_dev *dev);
421 void pci_npem_remove(struct pci_dev *dev);
423 static inline void pci_npem_create(struct pci_dev *dev) { } in pci_npem_create()
424 static inline void pci_npem_remove(struct pci_dev *dev) { } in pci_npem_remove()
438 static inline bool pci_dev_set_io_state(struct pci_dev *dev, in pci_dev_set_io_state()
460 static inline int pci_dev_set_disconnected(struct pci_dev *dev, void *unused) in pci_dev_set_disconnected()
473 static inline void pci_dev_assign_added(struct pci_dev *dev, bool added) in pci_dev_assign_added()
478 static inline bool pci_dev_is_added(const struct pci_dev *dev) in pci_dev_is_added()
489 struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES];
507 int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info);
508 void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
521 void pci_save_dpc_state(struct pci_dev *dev);
522 void pci_restore_dpc_state(struct pci_dev *dev);
523 void pci_dpc_init(struct pci_dev *pdev);
524 void dpc_process_error(struct pci_dev *pdev);
525 pci_ers_result_t dpc_reset_link(struct pci_dev *pdev);
526 bool pci_dpc_recovered(struct pci_dev *pdev);
528 static inline void pci_save_dpc_state(struct pci_dev *dev) { } in pci_save_dpc_state()
529 static inline void pci_restore_dpc_state(struct pci_dev *dev) { } in pci_restore_dpc_state()
530 static inline void pci_dpc_init(struct pci_dev *pdev) { } in pci_dpc_init()
531 static inline bool pci_dpc_recovered(struct pci_dev *pdev) { return false; } in pci_dpc_recovered()
535 void pci_rcec_init(struct pci_dev *dev);
536 void pci_rcec_exit(struct pci_dev *dev);
537 void pcie_link_rcec(struct pci_dev *rcec);
538 void pcie_walk_rcec(struct pci_dev *rcec,
539 int (*cb)(struct pci_dev *, void *),
542 static inline void pci_rcec_init(struct pci_dev *dev) { } in pci_rcec_init()
543 static inline void pci_rcec_exit(struct pci_dev *dev) { } in pci_rcec_exit()
544 static inline void pcie_link_rcec(struct pci_dev *rcec) { } in pcie_link_rcec()
545 static inline void pcie_walk_rcec(struct pci_dev *rcec, in pcie_walk_rcec()
546 int (*cb)(struct pci_dev *, void *), in pcie_walk_rcec() argument
552 void pci_ats_init(struct pci_dev *dev);
553 void pci_restore_ats_state(struct pci_dev *dev);
555 static inline void pci_ats_init(struct pci_dev *d) { } in pci_ats_init()
556 static inline void pci_restore_ats_state(struct pci_dev *dev) { } in pci_restore_ats_state()
560 void pci_pri_init(struct pci_dev *dev);
561 void pci_restore_pri_state(struct pci_dev *pdev);
563 static inline void pci_pri_init(struct pci_dev *dev) { } in pci_pri_init()
564 static inline void pci_restore_pri_state(struct pci_dev *pdev) { } in pci_restore_pri_state()
568 void pci_pasid_init(struct pci_dev *dev);
569 void pci_restore_pasid_state(struct pci_dev *pdev);
571 static inline void pci_pasid_init(struct pci_dev *dev) { } in pci_pasid_init()
572 static inline void pci_restore_pasid_state(struct pci_dev *pdev) { } in pci_restore_pasid_state()
576 int pci_iov_init(struct pci_dev *dev);
577 void pci_iov_release(struct pci_dev *dev);
578 void pci_iov_remove(struct pci_dev *dev);
579 void pci_iov_update_resource(struct pci_dev *dev, int resno);
580 resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno);
581 void pci_restore_iov_state(struct pci_dev *dev);
586 static inline int pci_iov_init(struct pci_dev *dev) in pci_iov_init()
590 static inline void pci_iov_release(struct pci_dev *dev) { } in pci_iov_release()
591 static inline void pci_iov_remove(struct pci_dev *dev) { } in pci_iov_remove()
592 static inline void pci_restore_iov_state(struct pci_dev *dev) { } in pci_restore_iov_state()
601 void pci_ptm_init(struct pci_dev *dev);
602 void pci_save_ptm_state(struct pci_dev *dev);
603 void pci_restore_ptm_state(struct pci_dev *dev);
604 void pci_suspend_ptm(struct pci_dev *dev);
605 void pci_resume_ptm(struct pci_dev *dev);
607 static inline void pci_ptm_init(struct pci_dev *dev) { } in pci_ptm_init()
608 static inline void pci_save_ptm_state(struct pci_dev *dev) { } in pci_save_ptm_state()
609 static inline void pci_restore_ptm_state(struct pci_dev *dev) { } in pci_restore_ptm_state()
610 static inline void pci_suspend_ptm(struct pci_dev *dev) { } in pci_suspend_ptm()
611 static inline void pci_resume_ptm(struct pci_dev *dev) { } in pci_resume_ptm()
616 static inline resource_size_t pci_resource_alignment(struct pci_dev *dev, in pci_resource_alignment()
630 void pci_acs_init(struct pci_dev *dev);
632 int pci_dev_specific_acs_enabled(struct pci_dev *dev, u16 acs_flags);
633 int pci_dev_specific_enable_acs(struct pci_dev *dev);
634 int pci_dev_specific_disable_acs_redir(struct pci_dev *dev);
635 int pcie_failed_link_retrain(struct pci_dev *dev);
637 static inline int pci_dev_specific_acs_enabled(struct pci_dev *dev, in pci_dev_specific_acs_enabled()
642 static inline int pci_dev_specific_enable_acs(struct pci_dev *dev) in pci_dev_specific_enable_acs()
646 static inline int pci_dev_specific_disable_acs_redir(struct pci_dev *dev) in pci_dev_specific_disable_acs_redir()
650 static inline int pcie_failed_link_retrain(struct pci_dev *dev) in pcie_failed_link_retrain()
657 pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
659 pci_ers_result_t (*reset_subordinates)(struct pci_dev *pdev));
661 bool pcie_wait_for_link(struct pci_dev *pdev, bool active);
662 int pcie_retrain_link(struct pci_dev *pdev, bool use_lt);
665 void pci_save_ltr_state(struct pci_dev *dev);
666 void pci_restore_ltr_state(struct pci_dev *dev);
667 void pci_configure_aspm_l1ss(struct pci_dev *dev);
668 void pci_save_aspm_l1ss_state(struct pci_dev *dev);
669 void pci_restore_aspm_l1ss_state(struct pci_dev *dev);
672 void pcie_aspm_init_link_state(struct pci_dev *pdev);
673 void pcie_aspm_exit_link_state(struct pci_dev *pdev);
674 void pcie_aspm_pm_state_change(struct pci_dev *pdev, bool locked);
675 void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
676 void pci_configure_ltr(struct pci_dev *pdev);
677 void pci_bridge_reconfigure_ltr(struct pci_dev *pdev);
679 static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { } in pcie_aspm_init_link_state()
680 static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { } in pcie_aspm_exit_link_state()
681 static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev, bool locked) { } in pcie_aspm_pm_state_change()
682 static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { } in pcie_aspm_powersave_config_link()
683 static inline void pci_configure_ltr(struct pci_dev *pdev) { } in pci_configure_ltr()
684 static inline void pci_bridge_reconfigure_ltr(struct pci_dev *pdev) { } in pci_bridge_reconfigure_ltr()
688 void pcie_set_ecrc_checking(struct pci_dev *dev);
691 static inline void pcie_set_ecrc_checking(struct pci_dev *dev) { } in pcie_set_ecrc_checking()
698 int (*reset)(struct pci_dev *dev, bool probe);
702 int (*reset_fn)(struct pci_dev *pdev, bool probe);
707 int pci_dev_specific_reset(struct pci_dev *dev, bool probe);
709 static inline int pci_dev_specific_reset(struct pci_dev *dev, bool probe) in pci_dev_specific_reset()
726 int pci_rebar_get_current_size(struct pci_dev *pdev, int bar);
727 int pci_rebar_set_size(struct pci_dev *pdev, int bar, int size);
743 int pci_set_of_node(struct pci_dev *dev);
744 void pci_release_of_node(struct pci_dev *dev);
786 static inline int pci_set_of_node(struct pci_dev *dev) { return 0; } in pci_set_of_node()
787 static inline void pci_release_of_node(struct pci_dev *dev) { } in pci_release_of_node()
801 void of_pci_make_dev_node(struct pci_dev *pdev);
802 void of_pci_remove_node(struct pci_dev *pdev);
803 int of_pci_add_properties(struct pci_dev *pdev, struct of_changeset *ocs,
806 static inline void of_pci_make_dev_node(struct pci_dev *pdev) { } in of_pci_make_dev_node()
807 static inline void of_pci_remove_node(struct pci_dev *pdev) { } in of_pci_remove_node()
812 void pci_aer_init(struct pci_dev *dev);
813 void pci_aer_exit(struct pci_dev *dev);
815 void pci_aer_clear_fatal_status(struct pci_dev *dev);
816 int pci_aer_clear_status(struct pci_dev *dev);
817 int pci_aer_raw_clear_status(struct pci_dev *dev);
818 void pci_save_aer_state(struct pci_dev *dev);
819 void pci_restore_aer_state(struct pci_dev *dev);
822 static inline void pci_aer_init(struct pci_dev *d) { } in pci_aer_init()
823 static inline void pci_aer_exit(struct pci_dev *d) { } in pci_aer_exit()
824 static inline void pci_aer_clear_fatal_status(struct pci_dev *dev) { } in pci_aer_clear_fatal_status()
825 static inline int pci_aer_clear_status(struct pci_dev *dev) { return -EINVAL; } in pci_aer_clear_status()
826 static inline int pci_aer_raw_clear_status(struct pci_dev *dev) { return -EINVAL; } in pci_aer_raw_clear_status()
827 static inline void pci_save_aer_state(struct pci_dev *dev) { } in pci_save_aer_state()
828 static inline void pci_restore_aer_state(struct pci_dev *dev) { } in pci_restore_aer_state()
833 int pci_acpi_program_hp_params(struct pci_dev *dev);
835 void pci_set_acpi_fwnode(struct pci_dev *dev);
836 int pci_dev_acpi_reset(struct pci_dev *dev, bool probe);
837 bool acpi_pci_power_manageable(struct pci_dev *dev);
838 bool acpi_pci_bridge_d3(struct pci_dev *dev);
839 int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state);
840 pci_power_t acpi_pci_get_power_state(struct pci_dev *dev);
841 void acpi_pci_refresh_power_state(struct pci_dev *dev);
842 int acpi_pci_wakeup(struct pci_dev *dev, bool enable);
843 bool acpi_pci_need_resume(struct pci_dev *dev);
844 pci_power_t acpi_pci_choose_state(struct pci_dev *pdev);
850 static inline int pci_dev_acpi_reset(struct pci_dev *dev, bool probe) in pci_dev_acpi_reset()
854 static inline void pci_set_acpi_fwnode(struct pci_dev *dev) { } in pci_set_acpi_fwnode()
855 static inline int pci_acpi_program_hp_params(struct pci_dev *dev) in pci_acpi_program_hp_params()
859 static inline bool acpi_pci_power_manageable(struct pci_dev *dev) in acpi_pci_power_manageable()
863 static inline bool acpi_pci_bridge_d3(struct pci_dev *dev) in acpi_pci_bridge_d3()
867 static inline int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) in acpi_pci_set_power_state()
871 static inline pci_power_t acpi_pci_get_power_state(struct pci_dev *dev) in acpi_pci_get_power_state()
875 static inline void acpi_pci_refresh_power_state(struct pci_dev *dev) { } in acpi_pci_refresh_power_state()
876 static inline int acpi_pci_wakeup(struct pci_dev *dev, bool enable) in acpi_pci_wakeup()
880 static inline bool acpi_pci_need_resume(struct pci_dev *dev) in acpi_pci_need_resume()
884 static inline pci_power_t acpi_pci_choose_state(struct pci_dev *pdev) in acpi_pci_choose_state()
898 int mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state);
899 pci_power_t mid_pci_get_power_state(struct pci_dev *pdev);
905 static inline int mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state) in mid_pci_set_power_state()
909 static inline pci_power_t mid_pci_get_power_state(struct pci_dev *pdev) in mid_pci_get_power_state()
915 int pcim_intx(struct pci_dev *dev, int enable);
916 int pcim_request_region_exclusive(struct pci_dev *pdev, int bar,
918 void pcim_release_region(struct pci_dev *pdev, int bar);