Lines Matching refs:hwfn
415 struct qed_hwfn *hwfn = &cdev->hwfns[index % cdev->num_hwfns]; in qed_simd_handler_config() local
418 hwfn->simd_proto_handler[relative_idx].func = handler; in qed_simd_handler_config()
419 hwfn->simd_proto_handler[relative_idx].token = token; in qed_simd_handler_config()
424 struct qed_hwfn *hwfn = &cdev->hwfns[index % cdev->num_hwfns]; in qed_simd_handler_clean() local
427 memset(&hwfn->simd_proto_handler[relative_idx], 0, in qed_simd_handler_clean()
440 struct qed_hwfn *hwfn; in qed_single_int() local
451 hwfn = &cdev->hwfns[i]; in qed_single_int()
455 tasklet_schedule(hwfn->sp_dpc); in qed_single_int()
463 hwfn->simd_proto_handler[j].func( in qed_single_int()
464 hwfn->simd_proto_handler[j].token); in qed_single_int()
471 DP_VERBOSE(hwfn, NETIF_MSG_INTR, in qed_single_int()
479 int qed_slowpath_irq_req(struct qed_hwfn *hwfn) in qed_slowpath_irq_req() argument
481 struct qed_dev *cdev = hwfn->cdev; in qed_slowpath_irq_req()
486 id = hwfn->my_id; in qed_slowpath_irq_req()
487 snprintf(hwfn->name, NAME_SIZE, "sp-%d-%02x:%02x.%02x", in qed_slowpath_irq_req()
489 PCI_SLOT(cdev->pdev->devfn), hwfn->abs_pf_id); in qed_slowpath_irq_req()
491 qed_msix_sp_int, 0, hwfn->name, hwfn->sp_dpc); in qed_slowpath_irq_req()
493 DP_VERBOSE(hwfn, (NETIF_MSG_INTR | QED_MSG_SP), in qed_slowpath_irq_req()
733 struct qed_hwfn *hwfn; in qed_slowpath_start() local
771 hwfn = QED_LEADING_HWFN(cdev); in qed_slowpath_start()
778 rc = qed_mcp_send_drv_version(hwfn, hwfn->p_main_ptt, in qed_slowpath_start()
890 struct qed_hwfn *hwfn; in qed_set_link() local
899 hwfn = &cdev->hwfns[0]; in qed_set_link()
901 ptt = qed_ptt_acquire(hwfn); in qed_set_link()
905 link_params = qed_mcp_get_link_params(hwfn); in qed_set_link()
930 rc = qed_mcp_set_link(hwfn, ptt, params->link_up); in qed_set_link()
932 qed_ptt_release(hwfn, ptt); in qed_set_link()
965 static void qed_fill_link(struct qed_hwfn *hwfn, in qed_fill_link() argument
976 memcpy(¶ms, qed_mcp_get_link_params(hwfn), sizeof(params)); in qed_fill_link()
977 memcpy(&link, qed_mcp_get_link_state(hwfn), sizeof(link)); in qed_fill_link()
978 memcpy(&link_caps, qed_mcp_get_link_capabilities(hwfn), in qed_fill_link()
1036 qed_mcp_get_media_type(hwfn->cdev, &media_type); in qed_fill_link()
1084 void qed_link_update(struct qed_hwfn *hwfn) in qed_link_update() argument
1086 void *cookie = hwfn->cdev->ops_cookie; in qed_link_update()
1087 struct qed_common_cb_ops *op = hwfn->cdev->protocol_ops.common; in qed_link_update()
1090 qed_fill_link(hwfn, &if_link); in qed_link_update()
1092 if (IS_LEAD_HWFN(hwfn) && cookie) in qed_link_update()
1098 struct qed_hwfn *hwfn; in qed_drain() local
1103 hwfn = &cdev->hwfns[i]; in qed_drain()
1104 ptt = qed_ptt_acquire(hwfn); in qed_drain()
1106 DP_NOTICE(hwfn, "Failed to drain NIG; No PTT\n"); in qed_drain()
1109 rc = qed_mcp_drain(hwfn, ptt); in qed_drain()
1112 qed_ptt_release(hwfn, ptt); in qed_drain()