Lines Matching refs:hwif
57 if (!HINIC_IS_VF(hwdev->hwif) && dev_cap->intr_type != INTR_MSIX_TYPE) in parse_capability()
60 num_aeqs = HINIC_HWIF_NUM_AEQS(hwdev->hwif); in parse_capability()
61 num_ceqs = HINIC_HWIF_NUM_CEQS(hwdev->hwif); in parse_capability()
62 num_irqs = HINIC_HWIF_NUM_IRQS(hwdev->hwif); in parse_capability()
70 if (!HINIC_IS_VF(hwdev->hwif)) in parse_capability()
78 if (!HINIC_IS_VF(hwdev->hwif)) { in parse_capability()
97 struct hinic_hwif *hwif = hwdev->hwif; in get_capability() local
98 struct pci_dev *pdev = hwif->pdev; in get_capability()
124 struct hinic_hwif *hwif = hwdev->hwif; in get_dev_cap() local
125 struct pci_dev *pdev = hwif->pdev; in get_dev_cap()
129 switch (HINIC_FUNC_TYPE(hwif)) { in get_dev_cap()
156 struct hinic_hwif *hwif = hwdev->hwif; in init_msix() local
157 struct pci_dev *pdev = hwif->pdev; in init_msix()
161 num_aeqs = HINIC_HWIF_NUM_AEQS(hwif); in init_msix()
162 num_ceqs = HINIC_HWIF_NUM_CEQS(hwif); in init_msix()
164 if (nr_irqs > HINIC_HWIF_NUM_IRQS(hwif)) in init_msix()
165 nr_irqs = HINIC_HWIF_NUM_IRQS(hwif); in init_msix()
191 struct hinic_hwif *hwif = hwdev->hwif; in disable_msix() local
192 struct pci_dev *pdev = hwif->pdev; in disable_msix()
241 struct hinic_hwif *hwif = hwdev->hwif; in init_fw_ctxt() local
242 struct pci_dev *pdev = hwif->pdev; in init_fw_ctxt()
247 fw_ctxt.func_idx = HINIC_HWIF_FUNC_IDX(hwif); in init_fw_ctxt()
273 struct hinic_hwif *hwif = hwdev->hwif; in set_hw_ioctxt() local
277 hw_ioctxt.func_idx = HINIC_HWIF_FUNC_IDX(hwif); in set_hw_ioctxt()
278 hw_ioctxt.ppf_idx = HINIC_HWIF_PPF_IDX(hwif); in set_hw_ioctxt()
302 struct hinic_hwif *hwif = hwdev->hwif; in wait_for_outbound_state() local
303 struct pci_dev *pdev = hwif->pdev; in wait_for_outbound_state()
308 outbound_state = hinic_outbound_state_get(hwif); in wait_for_outbound_state()
322 struct hinic_hwif *hwif = hwdev->hwif; in wait_for_db_state() local
323 struct pci_dev *pdev = hwif->pdev; in wait_for_db_state()
329 db_state = hinic_db_state_get(hwif); in wait_for_db_state()
350 struct hinic_hwif *hwif = hwdev->hwif; in clear_io_resources() local
351 struct pci_dev *pdev = hwif->pdev; in clear_io_resources()
358 cmd_clear_io_res.func_idx = HINIC_HWIF_FUNC_IDX(hwif); in clear_io_resources()
385 struct hinic_hwif *hwif = hwdev->hwif; in set_resources_state() local
388 res_state.func_idx = HINIC_HWIF_FUNC_IDX(hwif); in set_resources_state()
410 struct hinic_hwif *hwif = hwdev->hwif; in get_base_qpn() local
412 struct pci_dev *pdev = hwif->pdev; in get_base_qpn()
415 cmd_base_qpn.func_idx = HINIC_HWIF_FUNC_IDX(hwif); in get_base_qpn()
442 struct hinic_hwif *hwif = hwdev->hwif; in hinic_hwdev_ifup() local
447 struct pci_dev *pdev = hwif->pdev; in hinic_hwdev_ifup()
456 num_aeqs = HINIC_HWIF_NUM_AEQS(hwif); in hinic_hwdev_ifup()
457 num_ceqs = HINIC_HWIF_NUM_CEQS(hwif); in hinic_hwdev_ifup()
465 err = hinic_io_init(func_to_io, hwif, nic_cap->max_qps, num_ceqs, in hinic_hwdev_ifup()
486 hinic_db_state_set(hwif, HINIC_DB_ENABLE); in hinic_hwdev_ifup()
556 struct hinic_hwif *hwif = hwdev->hwif; in hinic_hwdev_cb_unregister() local
561 if (!HINIC_IS_PF(hwif) && !HINIC_IS_PPF(hwif)) in hinic_hwdev_cb_unregister()
593 struct hinic_hwif *hwif; in nic_mgmt_msg_handler() local
598 hwif = hwdev->hwif; in nic_mgmt_msg_handler()
599 pdev = hwif->pdev; in nic_mgmt_msg_handler()
632 dev_err(&pfhwdev->hwdev.hwif->pdev->dev, in hinic_comm_recv_mgmt_self_cmd_reg()
649 dev_err(&pfhwdev->hwdev.hwif->pdev->dev, "Unregister recv mgmt process failed, cmd: 0x%x\n", in hinic_comm_recv_mgmt_self_cmd_unreg()
672 dev_warn(&pfhwdev->hwdev.hwif->pdev->dev, in comm_mgmt_msg_handler()
685 dev_warn(&pfhwdev->hwdev.hwif->pdev->dev, "Received unknown mgmt cpu event: 0x%x\n", in comm_mgmt_msg_handler()
699 dev_err(&hwdev->hwif->pdev->dev, "Invalid fault event report, length: %d, should be %zu\n", in pf_fault_event_handler()
719 dev_err(&hwdev->hwif->pdev->dev, "Invalid mgmt watchdog report, length: %d, should be %zu\n", in mgmt_watchdog_timeout_event_handler()
740 struct hinic_hwif *hwif = hwdev->hwif; in init_pfhwdev() local
741 struct pci_dev *pdev = hwif->pdev; in init_pfhwdev()
744 err = hinic_pf_to_mgmt_init(&pfhwdev->pf_to_mgmt, hwif); in init_pfhwdev()
752 dev_err(&hwif->pdev->dev, "Failed to init mailbox\n"); in init_pfhwdev()
757 if (!HINIC_IS_VF(hwif)) { in init_pfhwdev()
774 hinic_set_pf_action(hwif, HINIC_PF_MGMT_ACTIVE); in init_pfhwdev()
788 hinic_set_pf_action(hwdev->hwif, HINIC_PF_MGMT_INIT); in free_pfhwdev()
790 if (!HINIC_IS_VF(hwdev->hwif)) { in free_pfhwdev()
817 l2nic_reset.func_id = HINIC_HWIF_FUNC_IDX(hwdev->hwif); in hinic_l2nic_reset()
826 …dev_err(&hwdev->hwif->pdev->dev, "Failed to reset L2NIC resources, err: %d, status: 0x%x, out_size… in hinic_l2nic_reset()
846 interrupt_info->func_id = HINIC_HWIF_FUNC_IDX(hwdev->hwif); in hinic_get_interrupt_cfg()
853 …dev_err(&hwdev->hwif->pdev->dev, "Failed to get interrupt config, err: %d, status: 0x%x, out size:… in hinic_get_interrupt_cfg()
874 interrupt_info->func_id = HINIC_HWIF_FUNC_IDX(hwdev->hwif); in hinic_set_interrupt_cfg()
888 …dev_err(&hwdev->hwif->pdev->dev, "Failed to get interrupt config, err: %d, status: 0x%x, out size:… in hinic_set_interrupt_cfg()
909 struct hinic_hwif *hwif; in hinic_init_hwdev() local
912 hwif = devm_kzalloc(&pdev->dev, sizeof(*hwif), GFP_KERNEL); in hinic_init_hwdev()
913 if (!hwif) in hinic_init_hwdev()
916 err = hinic_init_hwif(hwif, pdev); in hinic_init_hwdev()
929 hwdev->hwif = hwif; in hinic_init_hwdev()
942 hinic_outbound_state_set(hwif, HINIC_OUTBOUND_ENABLE); in hinic_init_hwdev()
945 num_aeqs = HINIC_HWIF_NUM_AEQS(hwif); in hinic_init_hwdev()
947 err = hinic_aeqs_init(&hwdev->aeqs, hwif, num_aeqs, in hinic_init_hwdev()
1009 hinic_free_hwif(hwif); in hinic_init_hwdev()
1035 hinic_free_hwif(hwdev->hwif); in hinic_free_hwdev()
1096 return hinic_msix_attr_cnt_clear(hwdev->hwif, msix_index); in hinic_hwdev_msix_cnt_set()
1116 return hinic_msix_attr_set(hwdev->hwif, msix_index, in hinic_hwdev_msix_set()
1135 struct hinic_hwif *hwif = hwdev->hwif; in hinic_hwdev_hw_ci_addr_set() local
1146 hw_ci.func_idx = HINIC_HWIF_FUNC_IDX(hwif); in hinic_hwdev_hw_ci_addr_set()
1170 hinic_set_msix_state(hwdev->hwif, msix_index, flag); in hinic_hwdev_set_msix_state()
1190 dev_err(&hwdev->hwif->pdev->dev, in hinic_get_board_info()