• Home
  • Raw
  • Download

Lines Matching refs:req

28 	struct hwrm_fwd_async_event_cmpl_input req = {0};  in bnxt_hwrm_fwd_async_event_cmpl()  local
32 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FWD_ASYNC_EVENT_CMPL, -1, -1); in bnxt_hwrm_fwd_async_event_cmpl()
34 req.encap_async_event_target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_fwd_async_event_cmpl()
37 req.encap_async_event_target_id = cpu_to_le16(0xffff); in bnxt_hwrm_fwd_async_event_cmpl()
38 async_cmpl = (struct hwrm_async_event_cmpl *)req.encap_async_event_cmpl; in bnxt_hwrm_fwd_async_event_cmpl()
42 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_fwd_async_event_cmpl()
68 struct hwrm_func_cfg_input req = {0}; in bnxt_set_vf_spoofchk() local
95 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in bnxt_set_vf_spoofchk()
96 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_set_vf_spoofchk()
97 req.flags = cpu_to_le32(func_flags); in bnxt_set_vf_spoofchk()
98 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_set_vf_spoofchk()
111 struct hwrm_func_qcfg_input req = {0}; in bnxt_hwrm_func_qcfg_flags() local
114 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCFG, -1, -1); in bnxt_hwrm_func_qcfg_flags()
115 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_func_qcfg_flags()
117 rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_func_qcfg_flags()
138 struct hwrm_func_cfg_input req = {0}; in bnxt_hwrm_set_trusted_vf() local
143 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in bnxt_hwrm_set_trusted_vf()
144 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_set_trusted_vf()
146 req.flags = cpu_to_le32(FUNC_CFG_REQ_FLAGS_TRUSTED_VF_ENABLE); in bnxt_hwrm_set_trusted_vf()
148 req.flags = cpu_to_le32(FUNC_CFG_REQ_FLAGS_TRUSTED_VF_DISABLE); in bnxt_hwrm_set_trusted_vf()
149 return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_set_trusted_vf()
209 struct hwrm_func_cfg_input req = {0}; in bnxt_set_vf_mac() local
227 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in bnxt_set_vf_mac()
228 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_set_vf_mac()
229 req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR); in bnxt_set_vf_mac()
230 memcpy(req.dflt_mac_addr, mac, ETH_ALEN); in bnxt_set_vf_mac()
231 return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_set_vf_mac()
237 struct hwrm_func_cfg_input req = {0}; in bnxt_set_vf_vlan() local
264 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in bnxt_set_vf_vlan()
265 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_set_vf_vlan()
266 req.dflt_vlan = cpu_to_le16(vlan_tag); in bnxt_set_vf_vlan()
267 req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_VLAN); in bnxt_set_vf_vlan()
268 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_set_vf_vlan()
277 struct hwrm_func_cfg_input req = {0}; in bnxt_set_vf_bw() local
302 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in bnxt_set_vf_bw()
303 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_set_vf_bw()
304 req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_MAX_BW); in bnxt_set_vf_bw()
305 req.max_bw = cpu_to_le32(max_tx_rate); in bnxt_set_vf_bw()
306 req.enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_MIN_BW); in bnxt_set_vf_bw()
307 req.min_bw = cpu_to_le32(min_tx_rate); in bnxt_set_vf_bw()
308 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_set_vf_bw()
366 struct hwrm_func_vf_resc_free_input req = {0}; in bnxt_hwrm_func_vf_resource_free() local
368 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_RESC_FREE, -1, -1); in bnxt_hwrm_func_vf_resource_free()
372 req.vf_id = cpu_to_le16(i); in bnxt_hwrm_func_vf_resource_free()
373 rc = _hwrm_send_message(bp, &req, sizeof(req), in bnxt_hwrm_func_vf_resource_free()
452 struct hwrm_func_buf_rgtr_input req = {0}; in bnxt_hwrm_func_buf_rgtr() local
454 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_BUF_RGTR, -1, -1); in bnxt_hwrm_func_buf_rgtr()
456 req.req_buf_num_pages = cpu_to_le16(bp->pf.hwrm_cmd_req_pages); in bnxt_hwrm_func_buf_rgtr()
457 req.req_buf_page_size = cpu_to_le16(BNXT_PAGE_SHIFT); in bnxt_hwrm_func_buf_rgtr()
458 req.req_buf_len = cpu_to_le16(BNXT_HWRM_REQ_MAX_SIZE); in bnxt_hwrm_func_buf_rgtr()
459 req.req_buf_page_addr0 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[0]); in bnxt_hwrm_func_buf_rgtr()
460 req.req_buf_page_addr1 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[1]); in bnxt_hwrm_func_buf_rgtr()
461 req.req_buf_page_addr2 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[2]); in bnxt_hwrm_func_buf_rgtr()
462 req.req_buf_page_addr3 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[3]); in bnxt_hwrm_func_buf_rgtr()
464 return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_func_buf_rgtr()
470 struct hwrm_func_cfg_input req = {0}; in __bnxt_set_vf_params() local
474 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in __bnxt_set_vf_params()
475 req.fid = cpu_to_le16(vf->fw_fid); in __bnxt_set_vf_params()
478 req.enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR); in __bnxt_set_vf_params()
479 memcpy(req.dflt_mac_addr, vf->mac_addr, ETH_ALEN); in __bnxt_set_vf_params()
482 req.enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_VLAN); in __bnxt_set_vf_params()
483 req.dflt_vlan = cpu_to_le16(vf->vlan); in __bnxt_set_vf_params()
486 req.enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_MAX_BW); in __bnxt_set_vf_params()
487 req.max_bw = cpu_to_le32(vf->max_tx_rate); in __bnxt_set_vf_params()
489 req.enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_MIN_BW); in __bnxt_set_vf_params()
490 req.min_bw = cpu_to_le32(vf->min_tx_rate); in __bnxt_set_vf_params()
494 req.flags |= cpu_to_le32(FUNC_CFG_REQ_FLAGS_TRUSTED_VF_ENABLE); in __bnxt_set_vf_params()
496 _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in __bnxt_set_vf_params()
504 struct hwrm_func_vf_resource_cfg_input req = {0}; in bnxt_hwrm_func_vf_resc_cfg() local
513 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_RESOURCE_CFG, -1, -1); in bnxt_hwrm_func_vf_resc_cfg()
532 req.min_rsscos_ctx = cpu_to_le16(BNXT_VF_MIN_RSS_CTX); in bnxt_hwrm_func_vf_resc_cfg()
535 req.min_rsscos_ctx = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
539 req.min_cmpl_rings = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
540 req.min_tx_rings = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
541 req.min_rx_rings = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
542 req.min_l2_ctxs = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
543 req.min_vnics = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
544 req.min_stat_ctx = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
546 req.min_hw_ring_grps = cpu_to_le16(min); in bnxt_hwrm_func_vf_resc_cfg()
556 req.min_cmpl_rings = cpu_to_le16(vf_cp_rings); in bnxt_hwrm_func_vf_resc_cfg()
557 req.min_tx_rings = cpu_to_le16(vf_tx_rings); in bnxt_hwrm_func_vf_resc_cfg()
558 req.min_rx_rings = cpu_to_le16(vf_rx_rings); in bnxt_hwrm_func_vf_resc_cfg()
559 req.min_l2_ctxs = cpu_to_le16(BNXT_VF_MAX_L2_CTX); in bnxt_hwrm_func_vf_resc_cfg()
560 req.min_vnics = cpu_to_le16(vf_vnics); in bnxt_hwrm_func_vf_resc_cfg()
561 req.min_stat_ctx = cpu_to_le16(vf_stat_ctx); in bnxt_hwrm_func_vf_resc_cfg()
562 req.min_hw_ring_grps = cpu_to_le16(vf_ring_grps); in bnxt_hwrm_func_vf_resc_cfg()
563 req.min_rsscos_ctx = cpu_to_le16(vf_rss); in bnxt_hwrm_func_vf_resc_cfg()
565 req.max_cmpl_rings = cpu_to_le16(vf_cp_rings); in bnxt_hwrm_func_vf_resc_cfg()
566 req.max_tx_rings = cpu_to_le16(vf_tx_rings); in bnxt_hwrm_func_vf_resc_cfg()
567 req.max_rx_rings = cpu_to_le16(vf_rx_rings); in bnxt_hwrm_func_vf_resc_cfg()
568 req.max_l2_ctxs = cpu_to_le16(BNXT_VF_MAX_L2_CTX); in bnxt_hwrm_func_vf_resc_cfg()
569 req.max_vnics = cpu_to_le16(vf_vnics); in bnxt_hwrm_func_vf_resc_cfg()
570 req.max_stat_ctx = cpu_to_le16(vf_stat_ctx); in bnxt_hwrm_func_vf_resc_cfg()
571 req.max_hw_ring_grps = cpu_to_le16(vf_ring_grps); in bnxt_hwrm_func_vf_resc_cfg()
572 req.max_rsscos_ctx = cpu_to_le16(vf_rss); in bnxt_hwrm_func_vf_resc_cfg()
574 req.max_msix = cpu_to_le16(vf_msix / num_vfs); in bnxt_hwrm_func_vf_resc_cfg()
581 req.vf_id = cpu_to_le16(pf->first_vf_id + i); in bnxt_hwrm_func_vf_resc_cfg()
582 rc = _hwrm_send_message(bp, &req, sizeof(req), in bnxt_hwrm_func_vf_resc_cfg()
593 hw_resc->max_tx_rings -= le16_to_cpu(req.min_tx_rings) * n; in bnxt_hwrm_func_vf_resc_cfg()
594 hw_resc->max_rx_rings -= le16_to_cpu(req.min_rx_rings) * n; in bnxt_hwrm_func_vf_resc_cfg()
595 hw_resc->max_hw_ring_grps -= le16_to_cpu(req.min_hw_ring_grps) * in bnxt_hwrm_func_vf_resc_cfg()
597 hw_resc->max_cp_rings -= le16_to_cpu(req.min_cmpl_rings) * n; in bnxt_hwrm_func_vf_resc_cfg()
598 hw_resc->max_rsscos_ctxs -= le16_to_cpu(req.min_rsscos_ctx) * n; in bnxt_hwrm_func_vf_resc_cfg()
599 hw_resc->max_stat_ctxs -= le16_to_cpu(req.min_stat_ctx) * n; in bnxt_hwrm_func_vf_resc_cfg()
600 hw_resc->max_vnics -= le16_to_cpu(req.min_vnics) * n; in bnxt_hwrm_func_vf_resc_cfg()
617 struct hwrm_func_cfg_input req = {0}; in bnxt_hwrm_func_cfg() local
622 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); in bnxt_hwrm_func_cfg()
638 req.enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_MTU | in bnxt_hwrm_func_cfg()
650 req.mru = cpu_to_le16(mtu); in bnxt_hwrm_func_cfg()
651 req.mtu = cpu_to_le16(mtu); in bnxt_hwrm_func_cfg()
653 req.num_rsscos_ctxs = cpu_to_le16(1); in bnxt_hwrm_func_cfg()
654 req.num_cmpl_rings = cpu_to_le16(vf_cp_rings); in bnxt_hwrm_func_cfg()
655 req.num_tx_rings = cpu_to_le16(vf_tx_rings); in bnxt_hwrm_func_cfg()
656 req.num_rx_rings = cpu_to_le16(vf_rx_rings); in bnxt_hwrm_func_cfg()
657 req.num_hw_ring_grps = cpu_to_le16(vf_ring_grps); in bnxt_hwrm_func_cfg()
658 req.num_l2_ctxs = cpu_to_le16(4); in bnxt_hwrm_func_cfg()
660 req.num_vnics = cpu_to_le16(vf_vnics); in bnxt_hwrm_func_cfg()
662 req.num_stat_ctxs = cpu_to_le16(vf_stat_ctx); in bnxt_hwrm_func_cfg()
668 req.fid = cpu_to_le16(pf->first_vf_id + i); in bnxt_hwrm_func_cfg()
669 rc = _hwrm_send_message(bp, &req, sizeof(req), in bnxt_hwrm_func_cfg()
674 pf->vf[i].fw_fid = le16_to_cpu(req.fid); in bnxt_hwrm_func_cfg()
900 struct hwrm_fwd_resp_input req = {0}; in bnxt_hwrm_fwd_resp() local
905 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FWD_RESP, -1, -1); in bnxt_hwrm_fwd_resp()
908 req.target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_fwd_resp()
909 req.encap_resp_target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_fwd_resp()
910 req.encap_resp_len = cpu_to_le16(msg_size); in bnxt_hwrm_fwd_resp()
911 req.encap_resp_addr = encap_resp_addr; in bnxt_hwrm_fwd_resp()
912 req.encap_resp_cmpl_ring = encap_resp_cpr; in bnxt_hwrm_fwd_resp()
913 memcpy(req.encap_resp, encap_resp, msg_size); in bnxt_hwrm_fwd_resp()
915 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_fwd_resp()
925 struct hwrm_reject_fwd_resp_input req = {0}; in bnxt_hwrm_fwd_err_resp() local
930 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_REJECT_FWD_RESP, -1, -1); in bnxt_hwrm_fwd_err_resp()
932 req.target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_fwd_err_resp()
933 req.encap_resp_target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_fwd_err_resp()
934 memcpy(req.encap_request, vf->hwrm_cmd_req_addr, msg_size); in bnxt_hwrm_fwd_err_resp()
936 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_fwd_err_resp()
946 struct hwrm_exec_fwd_resp_input req = {0}; in bnxt_hwrm_exec_fwd_resp() local
951 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_EXEC_FWD_RESP, -1, -1); in bnxt_hwrm_exec_fwd_resp()
953 req.target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_exec_fwd_resp()
954 req.encap_resp_target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_exec_fwd_resp()
955 memcpy(req.encap_request, vf->hwrm_cmd_req_addr, msg_size); in bnxt_hwrm_exec_fwd_resp()
957 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_hwrm_exec_fwd_resp()
966 struct hwrm_func_vf_cfg_input *req = in bnxt_vf_configure_mac() local
972 if (req->enables & cpu_to_le32(FUNC_VF_CFG_REQ_ENABLES_DFLT_MAC_ADDR)) { in bnxt_vf_configure_mac()
975 if (is_valid_ether_addr(req->dflt_mac_addr) && in bnxt_vf_configure_mac()
977 ether_addr_equal(req->dflt_mac_addr, vf->mac_addr))) { in bnxt_vf_configure_mac()
978 ether_addr_copy(vf->vf_mac_addr, req->dflt_mac_addr); in bnxt_vf_configure_mac()
989 struct hwrm_cfa_l2_filter_alloc_input *req = in bnxt_vf_validate_set_mac() local
993 if (!is_valid_ether_addr((const u8 *)req->l2_addr)) in bnxt_vf_validate_set_mac()
1004 if (ether_addr_equal((const u8 *)req->l2_addr, vf->mac_addr)) in bnxt_vf_validate_set_mac()
1007 if (ether_addr_equal((const u8 *)req->l2_addr, vf->vf_mac_addr)) in bnxt_vf_validate_set_mac()
1124 struct hwrm_func_qcaps_input req = {0}; in bnxt_update_vf_mac() local
1127 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCAPS, -1, -1); in bnxt_update_vf_mac()
1128 req.fid = cpu_to_le16(0xffff); in bnxt_update_vf_mac()
1131 if (_hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT)) in bnxt_update_vf_mac()
1153 struct hwrm_func_vf_cfg_input req = {0}; in bnxt_approve_mac() local
1164 bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_CFG, -1, -1); in bnxt_approve_mac()
1165 req.enables = cpu_to_le32(FUNC_VF_CFG_REQ_ENABLES_DFLT_MAC_ADDR); in bnxt_approve_mac()
1166 memcpy(req.dflt_mac_addr, mac, ETH_ALEN); in bnxt_approve_mac()
1167 rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); in bnxt_approve_mac()