Mellanox OFED驱动中PCIe驱动主要初始化流程函数图?(struct pci_driver mlx5_core_driver、probe_one、mlx5_load)

背景

经常需要去看mlx的PCIe初始化流程,尤其是mlx5_load, 但实际与PCIe初始化过程的关系和时机的全局图很难从单个函数或者单次跟踪某个行为查看,本文主要以PCIe初始化为锚点,注册PCIe驱动到Linux驱动框架后,PCIe设备被scan到之后调用probe函数为主要流程的图。

主要流程图

缩略图:
在这里插入图片描述
详细图:

mlx5_core.ko
init
mlx5_core_verify_params
mlx5_fpga_ipsec_build_fs_cmds
mlx5_register_debugfs
mlx5_create_core_dir
pci_register_driver
struct pci_driver mlx5_core_driver
.probe = probe_one,
.remove = remove_one,
.suspend = mlx5_suspend,
.resume = mlx5_resume,
.shutdown = shutdown,
.driver.pm = mlnx_pm,
.err_handler = &mlx5_err_handler,
.sriov_configure = mlx5_core_sriov_configure,
.sriov_get_vf_total_msix = mlx5_sriov_get_vf_total_msix,
.sriov_set_msix_vec_count = mlx5_core_sriov_set_msix_vec_count,
mlx5_sf_driver_register
mlx5e_init
cleanup
probe_one
remove_one
mlx5_suspend
mlx5_resume
shutdown
mlx5_err_handler
mlnx_pm
struct dev_pm_ops mlnx_pm
.suspend = suspend,
.resume = resume,
suspend
resume
struct pci_error_handlers mlx5_err_handler
.error_detected = mlx5_pci_err_detected,
.slot_reset = mlx5_pci_slot_reset,
.resume = mlx5_pci_resume
};
mlx5_pci_err_detected
mlx5_pci_slot_reset
mlx5_pci_resume
mlx5_core_disable_hca
disable_hca
mlx5_uninit_one
mlx5_pci_close
mlx5_try_fast_unload
mlx5_mdev_uninit
mlx5_function_teardown
mlx5_unload
mlx5_cleanup_once
mlx5_remove_core_dir
mlx5_unload_one
mlx5_pci_disable_device
mlx5_core_get_caps
mlx5_core_get_caps_mode
mlx5_core_other_function_set_caps
set_caps
mlx5_load_one
mlx5_load_one_devl_locked
handle_hca_cap
mlx5_is_roce_on
mlx5_core_disable_sf_hca
mlx5_pci_enable_device
set_hca_cap
mlx5_core_enable_sf_hca
enable_hca
mlx5_unload_one_devl_locked
__init_backport
mlx5_init_one
mlx5_function_setup
mlx5_load
mlx5_init_once
mlx5_core_enable_hca
mlx5_recover_device
mlx5_disable_device
mlx5_mdev_init
wait_fw_init
mlx5_core_set_issi

全部围绕这PCIe驱动的fops展开,最主要的是probe流程,最终走到mlx5_load流程,mlx5_load涉及到很多其他功能初始化,具体参考兄弟篇

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值