Lines Matching refs:req

43 		    struct hwrm_port_phy_cfg_input *req);
45 struct hwrm_port_phy_cfg_input *req);
47 struct hwrm_port_phy_cfg_input *req);
107 struct input *req = request;
109 req->req_type = htole16(req_type);
110 req->cmpl_ring = 0xffff;
111 req->target_id = 0xffff;
112 req->resp_addr = htole64(softc->hwrm_cmd_resp.idi_paddr);
118 struct input *req = msg;
129 req->seq_id = htole16(softc->hwrm_cmd_seq++);
131 cp_ring_id = le16toh(req->cmpl_ring);
136 memcpy(short_cmd_req, req, msg_len);
140 short_input.req_type = req->req_type;
183 GET_HWRM_REQ_TYPE(req->req_type), softc->hwrm_cmd_timeo,
184 le16toh(req->seq_id));
197 GET_HWRM_REQ_TYPE(req->req_type),
198 softc->hwrm_cmd_timeo, le16toh(req->req_type),
199 le16toh(req->seq_id), msg_len,
210 GET_HWRM_REQ_TYPE(req->req_type),
233 struct hwrm_queue_qportcfg_input req = {0};
240 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_QUEUE_QPORTCFG);
243 rc = _hwrm_send_message(softc, &req, sizeof(req));
270 struct hwrm_ver_get_input req = {0};
280 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VER_GET);
282 req.hwrm_intf_maj = HWRM_VERSION_MAJOR;
283 req.hwrm_intf_min = HWRM_VERSION_MINOR;
284 req.hwrm_intf_upd = HWRM_VERSION_UPDATE;
287 rc = _hwrm_send_message(softc, &req, sizeof(req));
365 struct hwrm_func_drv_rgtr_input req = {0};
367 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_DRV_RGTR);
369 req.enables = htole32(HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER |
371 req.os_type = htole16(HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_FREEBSD);
373 req.ver_maj = __FreeBSD_version / 100000;
374 req.ver_min = (__FreeBSD_version / 1000) % 100;
375 req.ver_upd = (__FreeBSD_version / 100) % 10;
377 return hwrm_send_message(softc, &req, sizeof(req));
384 struct hwrm_func_drv_unrgtr_input req = {0};
386 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_DRV_UNRGTR);
388 req.flags |=
390 return hwrm_send_message(softc, &req, sizeof(req));
420 struct hwrm_func_qcaps_input req = {0};
425 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_QCAPS);
426 req.fid = htole16(0xffff);
429 rc = _hwrm_send_message(softc, &req, sizeof(req));
475 struct hwrm_func_qcfg_input req = {0};
481 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_QCFG);
482 req.fid = htole16(0xffff);
484 rc = _hwrm_send_message(softc, &req, sizeof(req));
500 struct hwrm_func_reset_input req = {0};
502 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_RESET);
503 req.enables = 0;
505 return hwrm_send_message(softc, &req, sizeof(req));
510 struct hwrm_port_phy_cfg_input *req)
516 req->auto_mode |=
519 req->enables |=
521 req->flags |=
524 req->force_link_speed = htole16(fw_link_speed);
525 req->flags |= htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE);
529 req->flags |= htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY);
535 struct hwrm_port_phy_cfg_input *req)
540 req->auto_pause =
543 req->auto_pause |=
546 req->auto_pause |=
548 req->enables |=
552 req->force_pause |=
555 req->force_pause |=
557 req->enables |=
565 bnxt_hwrm_set_eee(struct bnxt_softc *softc, struct hwrm_port_phy_cfg_input *req)
578 req->flags |= htole32(flags);
580 req->eee_link_speed_mask = htole16(eee_speeds);
581 req->tx_lpi_timer = htole32(eee->tx_lpi_timer);
584 req->flags |=
594 struct hwrm_port_phy_cfg_input req = {0};
600 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_CFG);
603 bnxt_hwrm_set_pause_common(softc, &req);
610 bnxt_hwrm_set_link_common(softc, &req);
613 bnxt_hwrm_set_eee(softc, &req);
616 rc = _hwrm_send_message(softc, &req, sizeof(req));
635 struct hwrm_vnic_cfg_input req = {0};
639 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_CFG);
642 req.flags |= htole32(HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT);
644 req.flags |= htole32(HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE);
646 req.flags |= htole32(HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE);
647 req.enables = htole32(HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP |
650 req.vnic_id = htole16(vnic->id);
651 req.dflt_ring_grp = htole16(vnic->def_ring_grp);
652 req.rss_rule = htole16(vnic->rss_id);
653 req.cos_rule = htole16(vnic->cos_rule);
654 req.lb_rule = htole16(vnic->lb_rule);
655 req.mru = htole16(vnic->mru);
657 return hwrm_send_message(softc, &req, sizeof(req));
663 struct hwrm_vnic_alloc_input req = {0};
674 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_ALLOC);
677 req.flags = htole32(HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT);
680 rc = _hwrm_send_message(softc, &req, sizeof(req));
694 struct hwrm_vnic_rss_cos_lb_ctx_alloc_input req = {0};
705 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_RSS_COS_LB_CTX_ALLOC);
708 rc = _hwrm_send_message(softc, &req, sizeof(req));
722 struct hwrm_ring_grp_alloc_input req = {0};
733 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_RING_GRP_ALLOC);
734 req.cr = htole16(grp->cp_ring_id);
735 req.rr = htole16(grp->rx_ring_id);
736 req.ar = htole16(grp->ag_ring_id);
737 req.sc = htole16(grp->stats_ctx);
740 rc = _hwrm_send_message(softc, &req, sizeof(req));
759 struct hwrm_ring_alloc_input req = {0};
770 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_RING_ALLOC);
771 req.enables = htole32(0);
772 req.fbo = htole32(0);
775 req.enables |= htole32(
777 req.stat_ctx_id = htole32(stat_ctx_id);
779 req.ring_type = type;
780 req.page_tbl_addr = htole64(ring->paddr);
781 req.length = htole32(ring->ring_size);
782 req.logical_id = htole16(ring->id);
783 req.cmpl_ring_id = htole16(cmpl_ring_id);
784 req.queue_id = htole16(softc->q_info[0].id);
788 req.int_mode = HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX;
790 req.int_mode = HWRM_RING_ALLOC_INPUT_INT_MODE_POLL;
792 req.int_mode = HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX;
795 rc = _hwrm_send_message(softc, &req, sizeof(req));
810 struct hwrm_stat_ctx_alloc_input req = {0};
822 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_STAT_CTX_ALLOC);
824 req.update_period_ms = htole32(1000);
825 req.stats_dma_addr = htole64(paddr);
828 rc = _hwrm_send_message(softc, &req, sizeof(req));
843 struct hwrm_port_qstats_input req = {0};
846 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_QSTATS);
848 req.port_id = htole16(softc->pf.port_id);
849 req.rx_stat_host_addr = htole64(softc->hw_rx_port_stats.idi_paddr);
850 req.tx_stat_host_addr = htole64(softc->hw_tx_port_stats.idi_paddr);
853 rc = _hwrm_send_message(softc, &req, sizeof(req));
863 struct hwrm_cfa_l2_set_rx_mask_input req = {0};
899 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_SET_RX_MASK);
901 req.vnic_id = htole32(vnic->id);
902 req.mask = htole32(mask);
903 req.mc_tbl_addr = htole64(vnic->mc_list.idi_paddr);
904 req.num_mc_entries = htole32(vnic->mc_list_count);
905 req.vlan_tag_tbl_addr = htole64(vnic->vlan_tag_list.idi_paddr);
906 req.num_vlan_tags = htole32(num_vlan_tags);
907 return hwrm_send_message(softc, &req, sizeof(req));
914 struct hwrm_cfa_l2_filter_alloc_input req = {0};
926 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_FILTER_ALLOC);
928 req.flags = htole32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX);
932 req.enables = htole32(enables);
933 req.dst_id = htole16(vnic->id);
934 memcpy(req.l2_addr, if_getlladdr(iflib_get_ifp(softc->ctx)),
936 memset(&req.l2_addr_mask, 0xff, sizeof(req.l2_addr_mask));
939 rc = _hwrm_send_message(softc, &req, sizeof(req));
955 struct hwrm_vnic_rss_cfg_input req = {0};
959 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_RSS_CFG);
961 req.hash_type = htole32(hash_type);
962 req.ring_grp_tbl_addr = htole64(vnic->rss_grp_tbl.idi_paddr);
963 req.hash_key_tbl_addr = htole64(vnic->rss_hash_key_tbl.idi_paddr);
964 req.rss_ctx_idx = htole16(vnic->rss_id);
966 return hwrm_send_message(softc, &req, sizeof(req));
975 struct hwrm_func_cfg_input req = {0};
977 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG);
979 req.fid = htole16(0xffff);
980 req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR);
981 req.async_event_cr = htole16(softc->def_cp_ring.ring.phys_id);
983 rc = hwrm_send_message(softc, &req, sizeof(req));
986 struct hwrm_func_vf_cfg_input req = {0};
988 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_VF_CFG);
990 req.enables = htole32(HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR);
991 req.async_event_cr = htole16(softc->def_cp_ring.ring.phys_id);
993 rc = hwrm_send_message(softc, &req, sizeof(req));
1017 struct hwrm_vnic_tpa_cfg_input req = {0};
1024 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_TPA_CFG);
1037 req.flags = htole32(flags);
1039 req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS |
1043 req.max_agg_segs = htole16(softc->hw_lro.max_agg_segs);
1044 req.max_aggs = htole16(softc->hw_lro.max_aggs);
1045 req.min_agg_len = htole32(softc->hw_lro.min_agg_len);
1048 req.vnic_id = htole16(softc->vnic_info.id);
1050 return hwrm_send_message(softc, &req, sizeof(req));
1059 struct hwrm_nvm_find_dir_entry_input req = {0};
1067 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_FIND_DIR_ENTRY);
1069 req.enables = htole32(
1071 req.dir_idx = htole16(*index);
1073 req.dir_type = htole16(type);
1074 req.dir_ordinal = htole16(*ordinal);
1075 req.dir_ext = htole16(ext);
1076 req.opt_ordinal = search_opt;
1081 rc = _hwrm_send_message(softc, &req, sizeof(req));
1105 struct hwrm_nvm_read_input req = {0};
1113 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_READ);
1114 req.host_dest_addr = htole64(data->idi_paddr);
1115 req.dir_idx = htole16(index);
1116 req.offset = htole32(offset);
1117 req.len = htole32(length);
1121 rc = _hwrm_send_message(softc, &req, sizeof(req));
1138 struct hwrm_nvm_modify_input req = {0};
1159 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_MODIFY);
1160 req.host_src_addr = htole64(dma_data.idi_paddr);
1161 req.dir_idx = htole16(index);
1162 req.offset = htole32(offset);
1163 req.len = htole32(length);
1167 rc = _hwrm_send_message(softc, &req, sizeof(req));
1180 struct hwrm_fw_reset_input req = {0};
1187 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_RESET);
1188 req.embedded_proc_type = processor;
1189 req.selfrst_status = *selfreset;
1192 rc = _hwrm_send_message(softc, &req, sizeof(req));
1205 struct hwrm_fw_qstatus_input req = {0};
1212 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_QSTATUS);
1213 req.embedded_proc_type = type;
1216 rc = _hwrm_send_message(softc, &req, sizeof(req));
1232 struct hwrm_nvm_write_input req = {0};
1257 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_WRITE);
1259 req.host_src_addr = htole64(dma_data.idi_paddr);
1260 req.dir_type = htole16(type);
1261 req.dir_ordinal = htole16(ordinal);
1262 req.dir_ext = htole16(ext);
1263 req.dir_attr = htole16(attr);
1264 req.dir_data_length = htole32(data_length);
1265 req.option = htole16(option);
1267 req.flags =
1271 req.dir_item_length = htole32(*item_length);
1276 rc = _hwrm_send_message(softc, &req, sizeof(req));
1296 struct hwrm_nvm_erase_dir_entry_input req = {0};
1300 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_ERASE_DIR_ENTRY);
1301 req.dir_idx = htole16(index);
1305 rc = _hwrm_send_message(softc, &req, sizeof(req));
1315 struct hwrm_nvm_get_dir_info_input req = {0};
1321 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_GET_DIR_INFO);
1326 rc = _hwrm_send_message(softc, &req, sizeof(req));
1345 struct hwrm_nvm_get_dir_entries_input req = {0};
1369 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_GET_DIR_ENTRIES);
1370 req.host_dest_addr = htole64(dma_data->idi_paddr);
1374 rc = _hwrm_send_message(softc, &req, sizeof(req));
1391 struct hwrm_nvm_get_dev_info_input req = {0};
1397 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_GET_DEV_INFO);
1402 rc = _hwrm_send_message(softc, &req, sizeof(req));
1430 struct hwrm_nvm_install_update_input req = {0};
1436 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_INSTALL_UPDATE);
1437 req.install_type = htole32(install_type);
1442 rc = _hwrm_send_message(softc, &req, sizeof(req));
1465 struct hwrm_nvm_verify_update_input req = {0};
1469 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_VERIFY_UPDATE);
1471 req.dir_type = htole16(type);
1472 req.dir_ordinal = htole16(ordinal);
1473 req.dir_ext = htole16(ext);
1478 rc = _hwrm_send_message(softc, &req, sizeof(req));
1489 struct hwrm_fw_get_time_input req = {0};
1494 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_GET_TIME);
1497 rc = _hwrm_send_message(softc, &req, sizeof(req));
1528 struct hwrm_fw_set_time_input req = {0};
1530 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_SET_TIME);
1532 req.year = htole16(year);
1533 req.month = month;
1534 req.day = day;
1535 req.hour = hour;
1536 req.minute = minute;
1537 req.second = second;
1538 req.millisecond = htole16(millisecond);
1539 req.zone = htole16(zone);
1540 return hwrm_send_message(softc, &req, sizeof(req));
1547 struct hwrm_port_phy_qcfg_input req = {0};
1553 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_QCFG);
1555 rc = _hwrm_send_message(softc, &req, sizeof(req));
1632 struct hwrm_wol_filter_qcfg_input req = {0};
1638 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_WOL_FILTER_QCFG);
1639 req.port_id = htole16(softc->pf.port_id);
1640 req.handle = htole16(handle);
1641 rc = hwrm_send_message(softc, &req, sizeof(req));
1658 struct hwrm_wol_filter_alloc_input req = {0};
1663 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_WOL_FILTER_ALLOC);
1664 req.port_id = htole16(softc->pf.port_id);
1665 req.wol_type = HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_MAGICPKT;
1666 req.enables =
1668 memcpy(req.mac_address, softc->func.mac_addr, ETHER_ADDR_LEN);
1669 rc = hwrm_send_message(softc, &req, sizeof(req));
1679 struct hwrm_wol_filter_free_input req = {0};
1681 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_WOL_FILTER_FREE);
1682 req.port_id = htole16(softc->pf.port_id);
1683 req.enables =
1685 req.wol_filter_id = softc->wol_filter_id;
1686 return hwrm_send_message(softc, &req, sizeof(req));
1691 struct hwrm_ring_cmpl_ring_cfg_aggint_params_input *req)
1693 req->flags = htole16(flags);
1694 req->num_cmpl_dma_aggr = htole16((uint16_t)max_frames);
1695 req->num_cmpl_dma_aggr_during_int = htole16(max_frames >> 16);
1696 req->cmpl_aggr_dma_tmr = htole16((uint16_t)buf_tmrs);
1697 req->cmpl_aggr_dma_tmr_during_int = htole16(buf_tmrs >> 16);
1699 req->int_lat_tmr_min = htole16((uint16_t)buf_tmrs * 2);
1700 req->int_lat_tmr_max = htole16((uint16_t)buf_tmrs * 4);
1701 req->num_cmpl_aggr_int = htole16((uint16_t)max_frames * 4);
1709 req_tx = {0}, *req;
1758 req = &req_rx;
1764 * req = &req_tx;
1766 req->ring_id = htole16(softc->grp_info[i].cp_ring_id);
1768 rc = hwrm_send_message(softc, req, sizeof(*req));
1780 struct hwrm_func_drv_rgtr_input req = {0};
1788 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_DRV_RGTR);
1790 req.enables =
1809 req.async_event_fwd[i] |= htole32(events[i]);
1813 return hwrm_send_message(softc, &req, sizeof(req));