Lines Matching refs:pfhwdev

108 static int get_cap_from_fw(struct hinic_pfhwdev *pfhwdev)  in get_cap_from_fw()  argument
110 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in get_cap_from_fw()
120 err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_CFGM, in get_cap_from_fw()
141 struct hinic_pfhwdev *pfhwdev; in get_dev_cap() local
147 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in get_dev_cap()
149 err = get_cap_from_fw(pfhwdev); in get_dev_cap()
230 struct hinic_pfhwdev *pfhwdev; in hinic_port_msg_cmd() local
237 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_port_msg_cmd()
239 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC, cmd, in hinic_port_msg_cmd()
292 struct hinic_pfhwdev *pfhwdev; in set_hw_ioctxt() local
312 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in set_hw_ioctxt()
314 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, in set_hw_ioctxt()
367 struct hinic_pfhwdev *pfhwdev; in wait_for_io_stopped() local
377 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in wait_for_io_stopped()
383 err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, in wait_for_io_stopped()
417 struct hinic_pfhwdev *pfhwdev; in clear_io_resources() local
433 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in clear_io_resources()
435 err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, in clear_io_resources()
460 struct hinic_pfhwdev *pfhwdev; in set_resources_state() local
470 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in set_resources_state()
472 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, in set_resources_state()
609 struct hinic_pfhwdev *pfhwdev; in hinic_hwdev_cb_register() local
618 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_hwdev_cb_register()
621 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in hinic_hwdev_cb_register()
638 struct hinic_pfhwdev *pfhwdev; in hinic_hwdev_cb_unregister() local
647 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_hwdev_cb_unregister()
650 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in hinic_hwdev_cb_unregister()
671 struct hinic_pfhwdev *pfhwdev = handle; in nic_mgmt_msg_handler() local
679 hwdev = &pfhwdev->hwdev; in nic_mgmt_msg_handler()
691 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in nic_mgmt_msg_handler()
712 static int init_pfhwdev(struct hinic_pfhwdev *pfhwdev) in init_pfhwdev() argument
714 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in init_pfhwdev()
719 err = hinic_pf_to_mgmt_init(&pfhwdev->pf_to_mgmt, hwif); in init_pfhwdev()
725 hinic_register_mgmt_msg_cb(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC, in init_pfhwdev()
726 pfhwdev, nic_mgmt_msg_handler); in init_pfhwdev()
736 static void free_pfhwdev(struct hinic_pfhwdev *pfhwdev) in free_pfhwdev() argument
738 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in free_pfhwdev()
742 hinic_unregister_mgmt_msg_cb(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC); in free_pfhwdev()
744 hinic_pf_to_mgmt_free(&pfhwdev->pf_to_mgmt); in free_pfhwdev()
757 struct hinic_pfhwdev *pfhwdev; in hinic_init_hwdev() local
778 pfhwdev = devm_kzalloc(&pdev->dev, sizeof(*pfhwdev), GFP_KERNEL); in hinic_init_hwdev()
779 if (!pfhwdev) { in hinic_init_hwdev()
784 hwdev = &pfhwdev->hwdev; in hinic_init_hwdev()
809 err = init_pfhwdev(pfhwdev); in hinic_init_hwdev()
838 free_pfhwdev(pfhwdev); in hinic_init_hwdev()
859 struct hinic_pfhwdev *pfhwdev = container_of(hwdev, in hinic_free_hwdev() local
865 free_pfhwdev(pfhwdev); in hinic_free_hwdev()
980 struct hinic_pfhwdev *pfhwdev; in hinic_hwdev_hw_ci_addr_set() local
1001 pfhwdev = container_of(hwdev, struct hinic_pfhwdev, hwdev); in hinic_hwdev_hw_ci_addr_set()
1002 return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, in hinic_hwdev_hw_ci_addr_set()