Lines Matching refs:pfhwdev

120 static int get_cap_from_fw(struct hinic_pfhwdev *pfhwdev)  in get_cap_from_fw()  argument
122 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in get_cap_from_fw()
132 err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_CFGM, in get_cap_from_fw()
153 struct hinic_pfhwdev *pfhwdev; in get_dev_cap() local
159 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in get_dev_cap()
161 err = get_cap_from_fw(pfhwdev); in get_dev_cap()
242 struct hinic_pfhwdev *pfhwdev; in hinic_port_msg_cmd() local
249 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_port_msg_cmd()
251 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC, cmd, in hinic_port_msg_cmd()
304 struct hinic_pfhwdev *pfhwdev; in set_hw_ioctxt() local
322 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in set_hw_ioctxt()
324 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, in set_hw_ioctxt()
377 struct hinic_pfhwdev *pfhwdev; in wait_for_io_stopped() local
387 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in wait_for_io_stopped()
393 err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, in wait_for_io_stopped()
427 struct hinic_pfhwdev *pfhwdev; in clear_io_resources() local
443 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in clear_io_resources()
445 err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, in clear_io_resources()
470 struct hinic_pfhwdev *pfhwdev; in set_resources_state() local
480 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in set_resources_state()
482 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, in set_resources_state()
619 struct hinic_pfhwdev *pfhwdev; in hinic_hwdev_cb_register() local
628 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_hwdev_cb_register()
631 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in hinic_hwdev_cb_register()
648 struct hinic_pfhwdev *pfhwdev; in hinic_hwdev_cb_unregister() local
657 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_hwdev_cb_unregister()
660 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in hinic_hwdev_cb_unregister()
681 struct hinic_pfhwdev *pfhwdev = handle; in nic_mgmt_msg_handler() local
689 hwdev = &pfhwdev->hwdev; in nic_mgmt_msg_handler()
701 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in nic_mgmt_msg_handler()
722 static int init_pfhwdev(struct hinic_pfhwdev *pfhwdev) in init_pfhwdev() argument
724 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in init_pfhwdev()
729 err = hinic_pf_to_mgmt_init(&pfhwdev->pf_to_mgmt, hwif); in init_pfhwdev()
735 hinic_register_mgmt_msg_cb(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC, in init_pfhwdev()
736 pfhwdev, nic_mgmt_msg_handler); in init_pfhwdev()
746 static void free_pfhwdev(struct hinic_pfhwdev *pfhwdev) in free_pfhwdev() argument
748 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in free_pfhwdev()
752 hinic_unregister_mgmt_msg_cb(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC); in free_pfhwdev()
754 hinic_pf_to_mgmt_free(&pfhwdev->pf_to_mgmt); in free_pfhwdev()
767 struct hinic_pfhwdev *pfhwdev; in hinic_init_hwdev() local
788 pfhwdev = devm_kzalloc(&pdev->dev, sizeof(*pfhwdev), GFP_KERNEL); in hinic_init_hwdev()
789 if (!pfhwdev) { in hinic_init_hwdev()
794 hwdev = &pfhwdev->hwdev; in hinic_init_hwdev()
819 err = init_pfhwdev(pfhwdev); in hinic_init_hwdev()
848 free_pfhwdev(pfhwdev); in hinic_init_hwdev()
869 struct hinic_pfhwdev *pfhwdev = container_of(hwdev, in hinic_free_hwdev() local
875 free_pfhwdev(pfhwdev); in hinic_free_hwdev()
983 struct hinic_pfhwdev *pfhwdev; in hinic_hwdev_hw_ci_addr_set() local
1004 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_hwdev_hw_ci_addr_set()
1005 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, in hinic_hwdev_hw_ci_addr_set()