Lines Matching refs:req

4221 	struct hwrm_func_qstats_ext_input *req;
4229 rc = hwrm_req_init(bp, req, HWRM_FUNC_QSTATS_EXT);
4233 req->fid = cpu_to_le16(0xffff);
4234 req->flags = FUNC_QSTATS_EXT_REQ_FLAGS_COUNTER_MASK;
4236 resp = hwrm_req_hold(bp, req);
4237 rc = hwrm_req_send(bp, req);
4242 hwrm_req_drop(bp, req);
4712 struct hwrm_func_drv_rgtr_input *req;
4716 rc = hwrm_req_init(bp, req, HWRM_FUNC_DRV_RGTR);
4720 req->enables = cpu_to_le32(FUNC_DRV_RGTR_REQ_ENABLES_OS_TYPE |
4724 req->os_type = cpu_to_le16(FUNC_DRV_RGTR_REQ_OS_TYPE_LINUX);
4731 req->flags = cpu_to_le32(flags);
4732 req->ver_maj_8b = DRV_VER_MAJ;
4733 req->ver_min_8b = DRV_VER_MIN;
4734 req->ver_upd_8b = DRV_VER_UPD;
4735 req->ver_maj = cpu_to_le16(DRV_VER_MAJ);
4736 req->ver_min = cpu_to_le16(DRV_VER_MIN);
4737 req->ver_upd = cpu_to_le16(DRV_VER_UPD);
4754 req->vf_req_fwd[i] = cpu_to_le32(data[i]);
4756 req->enables |=
4761 req->flags |= cpu_to_le32(
4783 req->async_event_fwd[i] |= cpu_to_le32(events[i]);
4786 req->enables =
4789 resp = hwrm_req_hold(bp, req);
4790 rc = hwrm_req_send(bp, req);
4797 hwrm_req_drop(bp, req);
4803 struct hwrm_func_drv_unrgtr_input *req;
4809 rc = hwrm_req_init(bp, req, HWRM_FUNC_DRV_UNRGTR);
4812 return hwrm_req_send(bp, req);
4817 struct hwrm_tunnel_dst_port_free_input *req;
4827 rc = hwrm_req_init(bp, req, HWRM_TUNNEL_DST_PORT_FREE);
4831 req->tunnel_type = tunnel_type;
4835 req->tunnel_dst_port_id = cpu_to_le16(bp->vxlan_fw_dst_port_id);
4840 req->tunnel_dst_port_id = cpu_to_le16(bp->nge_fw_dst_port_id);
4848 rc = hwrm_req_send(bp, req);
4859 struct hwrm_tunnel_dst_port_alloc_input *req;
4862 rc = hwrm_req_init(bp, req, HWRM_TUNNEL_DST_PORT_ALLOC);
4866 req->tunnel_type = tunnel_type;
4867 req->tunnel_dst_port_val = port;
4869 resp = hwrm_req_hold(bp, req);
4870 rc = hwrm_req_send(bp, req);
4892 hwrm_req_drop(bp, req);
4898 struct hwrm_cfa_l2_set_rx_mask_input *req;
4902 rc = hwrm_req_init(bp, req, HWRM_CFA_L2_SET_RX_MASK);
4906 req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
4908 req->num_mc_entries = cpu_to_le32(vnic->mc_list_count);
4909 req->mc_tbl_addr = cpu_to_le64(vnic->mc_list_mapping);
4911 req->mask = cpu_to_le32(vnic->rx_mask);
4912 return hwrm_req_send_silent(bp, req);
4919 struct hwrm_cfa_ntuple_filter_free_input *req;
4922 rc = hwrm_req_init(bp, req, HWRM_CFA_NTUPLE_FILTER_FREE);
4926 req->ntuple_filter_id = fltr->filter_id;
4927 return hwrm_req_send(bp, req);
4953 struct hwrm_cfa_ntuple_filter_alloc_input *req;
4959 rc = hwrm_req_init(bp, req, HWRM_CFA_NTUPLE_FILTER_ALLOC);
4963 req->l2_filter_id = bp->vnic_info[0].fw_l2_filter_id[fltr->l2_fltr_idx];
4967 req->dst_id = cpu_to_le16(fltr->rxq);
4970 req->dst_id = cpu_to_le16(vnic->fw_vnic_id);
4972 req->flags = cpu_to_le32(flags);
4973 req->enables = cpu_to_le32(BNXT_NTP_FLTR_FLAGS);
4975 req->ethertype = htons(ETH_P_IP);
4976 memcpy(req->src_macaddr, fltr->src_mac_addr, ETH_ALEN);
4977 req->ip_addr_type = CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV4;
4978 req->ip_protocol = keys->basic.ip_proto;
4983 req->ethertype = htons(ETH_P_IPV6);
4984 req->ip_addr_type =
4986 *(struct in6_addr *)&req->src_ipaddr[0] =
4988 *(struct in6_addr *)&req->dst_ipaddr[0] =
4991 req->src_ipaddr_mask[i] = cpu_to_be32(0xffffffff);
4992 req->dst_ipaddr_mask[i] = cpu_to_be32(0xffffffff);
4995 req->src_ipaddr[0] = keys->addrs.v4addrs.src;
4996 req->src_ipaddr_mask[0] = cpu_to_be32(0xffffffff);
4997 req->dst_ipaddr[0] = keys->addrs.v4addrs.dst;
4998 req->dst_ipaddr_mask[0] = cpu_to_be32(0xffffffff);
5001 req->enables |= cpu_to_le32(BNXT_NTP_TUNNEL_FLTR_FLAG);
5002 req->tunnel_type =
5006 req->src_port = keys->ports.src;
5007 req->src_port_mask = cpu_to_be16(0xffff);
5008 req->dst_port = keys->ports.dst;
5009 req->dst_port_mask = cpu_to_be16(0xffff);
5011 resp = hwrm_req_hold(bp, req);
5012 rc = hwrm_req_send(bp, req);
5015 hwrm_req_drop(bp, req);
5024 struct hwrm_cfa_l2_filter_alloc_input *req;
5027 rc = hwrm_req_init(bp, req, HWRM_CFA_L2_FILTER_ALLOC);
5031 req->flags = cpu_to_le32(CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX);
5033 req->flags |=
5035 req->dst_id = cpu_to_le16(bp->vnic_info[vnic_id].fw_vnic_id);
5036 req->enables =
5040 memcpy(req->l2_addr, mac_addr, ETH_ALEN);
5041 req->l2_addr_mask[0] = 0xff;
5042 req->l2_addr_mask[1] = 0xff;
5043 req->l2_addr_mask[2] = 0xff;
5044 req->l2_addr_mask[3] = 0xff;
5045 req->l2_addr_mask[4] = 0xff;
5046 req->l2_addr_mask[5] = 0xff;
5048 resp = hwrm_req_hold(bp, req);
5049 rc = hwrm_req_send(bp, req);
5053 hwrm_req_drop(bp, req);
5059 struct hwrm_cfa_l2_filter_free_input *req;
5064 rc = hwrm_req_init(bp, req, HWRM_CFA_L2_FILTER_FREE);
5067 hwrm_req_hold(bp, req);
5072 req->l2_filter_id = vnic->fw_l2_filter_id[j];
5074 rc = hwrm_req_send(bp, req);
5078 hwrm_req_drop(bp, req);
5086 struct hwrm_vnic_tpa_cfg_input *req;
5092 rc = hwrm_req_init(bp, req, HWRM_VNIC_TPA_CFG);
5108 req->flags = cpu_to_le32(flags);
5110 req->enables =
5134 req->max_agg_segs = cpu_to_le16(segs);
5135 req->max_aggs = cpu_to_le16(max_aggs);
5137 req->min_agg_len = cpu_to_le32(512);
5139 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
5141 return hwrm_req_send(bp, req);
5275 __bnxt_hwrm_vnic_set_rss(struct bnxt *bp, struct hwrm_vnic_rss_cfg_input *req,
5284 req->hash_type = cpu_to_le32(bp->rss_hash_delta);
5286 req->flags |= VNIC_RSS_CFG_REQ_FLAGS_HASH_TYPE_INCLUDE;
5288 req->flags |= VNIC_RSS_CFG_REQ_FLAGS_HASH_TYPE_EXCLUDE;
5290 req->hash_type = cpu_to_le32(bp->rss_hash_cfg);
5292 req->hash_mode_flags = VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_DEFAULT;
5293 req->ring_grp_tbl_addr = cpu_to_le64(vnic->rss_table_dma_addr);
5294 req->hash_key_tbl_addr = cpu_to_le64(vnic->rss_hash_key_dma_addr);
5300 struct hwrm_vnic_rss_cfg_input *req;
5307 rc = hwrm_req_init(bp, req, HWRM_VNIC_RSS_CFG);
5312 __bnxt_hwrm_vnic_set_rss(bp, req, vnic);
5313 req->rss_ctx_idx = cpu_to_le16(vnic->fw_rss_cos_lb_ctx[0]);
5314 return hwrm_req_send(bp, req);
5320 struct hwrm_vnic_rss_cfg_input *req;
5325 rc = hwrm_req_init(bp, req, HWRM_VNIC_RSS_CFG);
5329 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
5331 return hwrm_req_send(bp, req);
5333 __bnxt_hwrm_vnic_set_rss(bp, req, vnic);
5337 hwrm_req_hold(bp, req);
5339 req->ring_grp_tbl_addr = cpu_to_le64(ring_tbl_map);
5340 req->ring_table_pair_index = i;
5341 req->rss_ctx_idx = cpu_to_le16(vnic->fw_rss_cos_lb_ctx[i]);
5342 rc = hwrm_req_send(bp, req);
5348 hwrm_req_drop(bp, req);
5356 struct hwrm_vnic_rss_qcfg_input *req;
5358 if (hwrm_req_init(bp, req, HWRM_VNIC_RSS_QCFG))
5361 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
5363 req->rss_ctx_idx = cpu_to_le16(vnic->fw_rss_cos_lb_ctx[0]);
5364 resp = hwrm_req_hold(bp, req);
5365 if (!hwrm_req_send(bp, req)) {
5369 hwrm_req_drop(bp, req);
5375 struct hwrm_vnic_plcmodes_cfg_input *req;
5378 rc = hwrm_req_init(bp, req, HWRM_VNIC_PLCMODES_CFG);
5382 req->flags = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT);
5383 req->enables = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID);
5386 req->jumbo_thresh = cpu_to_le16(bp->rx_buf_use_size);
5388 req->flags |= cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 |
5390 req->enables |=
5392 req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh);
5393 req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh);
5395 req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
5396 return hwrm_req_send(bp, req);
5402 struct hwrm_vnic_rss_cos_lb_ctx_free_input *req;
5404 if (hwrm_req_init(bp, req, HWRM_VNIC_RSS_COS_LB_CTX_FREE))
5407 req->rss_cos_lb_ctx_id =
5410 hwrm_req_send(bp, req);
5432 struct hwrm_vnic_rss_cos_lb_ctx_alloc_input *req;
5435 rc = hwrm_req_init(bp, req, HWRM_VNIC_RSS_COS_LB_CTX_ALLOC);
5439 resp = hwrm_req_hold(bp, req);
5440 rc = hwrm_req_send(bp, req);
5444 hwrm_req_drop(bp, req);
5459 struct hwrm_vnic_cfg_input *req;
5464 rc = hwrm_req_init(bp, req, HWRM_VNIC_CFG);
5471 req->default_rx_ring_id =
5473 req->default_cmpl_ring_id =
5475 req->enables =
5480 req->enables = cpu_to_le32(VNIC_CFG_REQ_ENABLES_DFLT_RING_GRP);
5483 req->rss_rule = cpu_to_le16(vnic->fw_rss_cos_lb_ctx[0]);
5484 req->enables |= cpu_to_le32(VNIC_CFG_REQ_ENABLES_RSS_RULE |
5487 req->rss_rule =
5489 req->enables |= cpu_to_le32(VNIC_CFG_REQ_ENABLES_RSS_RULE |
5491 req->flags |= cpu_to_le32(VNIC_CFG_REQ_FLAGS_RSS_DFLT_CR_MODE);
5493 req->rss_rule = cpu_to_le16(0xffff);
5498 req->cos_rule = cpu_to_le16(vnic->fw_rss_cos_lb_ctx[1]);
5499 req->enables |= cpu_to_le32(VNIC_CFG_REQ_ENABLES_COS_RULE);
5501 req->cos_rule = cpu_to_le16(0xffff);
5512 req->dflt_ring_grp = cpu_to_le16(bp->grp_info[grp_idx].fw_grp_id);
5513 req->lb_rule = cpu_to_le16(0xffff);
5515 req->mru = cpu_to_le16(bp->dev->mtu + ETH_HLEN + VLAN_HLEN);
5517 req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
5523 req->flags |= cpu_to_le32(VNIC_CFG_REQ_FLAGS_VLAN_STRIP_MODE);
5525 req->flags |= cpu_to_le32(bnxt_get_roce_vnic_mode(bp));
5527 return hwrm_req_send(bp, req);
5533 struct hwrm_vnic_free_input *req;
5535 if (hwrm_req_init(bp, req, HWRM_VNIC_FREE))
5538 req->vnic_id =
5541 hwrm_req_send(bp, req);
5561 struct hwrm_vnic_alloc_input *req;
5564 rc = hwrm_req_init(bp, req, HWRM_VNIC_ALLOC);
5575 netdev_err(bp->dev, "Not enough ring groups avail:%x req:%x\n",
5586 req->flags = cpu_to_le32(VNIC_ALLOC_REQ_FLAGS_DEFAULT);
5588 resp = hwrm_req_hold(bp, req);
5589 rc = hwrm_req_send(bp, req);
5592 hwrm_req_drop(bp, req);
5599 struct hwrm_vnic_qcaps_input *req;
5607 rc = hwrm_req_init(bp, req, HWRM_VNIC_QCAPS);
5611 resp = hwrm_req_hold(bp, req);
5612 rc = hwrm_req_send(bp, req);
5640 hwrm_req_drop(bp, req);
5647 struct hwrm_ring_grp_alloc_input *req;
5654 rc = hwrm_req_init(bp, req, HWRM_RING_GRP_ALLOC);
5658 resp = hwrm_req_hold(bp, req);
5662 req->cr = cpu_to_le16(bp->grp_info[grp_idx].cp_fw_ring_id);
5663 req->rr = cpu_to_le16(bp->grp_info[grp_idx].rx_fw_ring_id);
5664 req->ar = cpu_to_le16(bp->grp_info[grp_idx].agg_fw_ring_id);
5665 req->sc = cpu_to_le16(bp->grp_info[grp_idx].fw_stats_ctx);
5667 rc = hwrm_req_send(bp, req);
5675 hwrm_req_drop(bp, req);
5681 struct hwrm_ring_grp_free_input *req;
5687 if (hwrm_req_init(bp, req, HWRM_RING_GRP_FREE))
5690 hwrm_req_hold(bp, req);
5694 req->ring_group_id =
5697 hwrm_req_send(bp, req);
5700 hwrm_req_drop(bp, req);
5708 struct hwrm_ring_alloc_input *req;
5714 rc = hwrm_req_init(bp, req, HWRM_RING_ALLOC);
5718 req->enables = 0;
5720 req->page_tbl_addr = cpu_to_le64(rmem->pg_tbl_map);
5722 req->page_size = BNXT_PAGE_SHIFT;
5723 req->page_tbl_depth = 1;
5725 req->page_tbl_addr = cpu_to_le64(rmem->dma_arr[0]);
5727 req->fbo = 0;
5729 req->logical_id = cpu_to_le16(map_index);
5737 req->ring_type = RING_ALLOC_REQ_RING_TYPE_TX;
5740 req->cmpl_ring_id = cpu_to_le16(bnxt_cp_ring_for_tx(bp, txr));
5741 req->length = cpu_to_le32(bp->tx_ring_mask + 1);
5742 req->stat_ctx_id = cpu_to_le32(grp_info->fw_stats_ctx);
5743 req->queue_id = cpu_to_le16(ring->queue_id);
5747 req->ring_type = RING_ALLOC_REQ_RING_TYPE_RX;
5748 req->length = cpu_to_le32(bp->rx_ring_mask + 1);
5754 req->rx_buf_size = cpu_to_le16(bp->rx_buf_use_size);
5755 req->stat_ctx_id = cpu_to_le32(grp_info->fw_stats_ctx);
5756 req->enables |= cpu_to_le32(
5760 req->flags = cpu_to_le16(flags);
5765 req->ring_type = RING_ALLOC_REQ_RING_TYPE_RX_AGG;
5768 req->rx_ring_id = cpu_to_le16(grp_info->rx_fw_ring_id);
5769 req->rx_buf_size = cpu_to_le16(BNXT_RX_PAGE_SIZE);
5770 req->stat_ctx_id = cpu_to_le32(grp_info->fw_stats_ctx);
5771 req->enables |= cpu_to_le32(
5775 req->ring_type = RING_ALLOC_REQ_RING_TYPE_RX;
5777 req->length = cpu_to_le32(bp->rx_agg_ring_mask + 1);
5780 req->ring_type = RING_ALLOC_REQ_RING_TYPE_L2_CMPL;
5781 req->length = cpu_to_le32(bp->cp_ring_mask + 1);
5785 req->nq_ring_id = cpu_to_le16(grp_info->cp_fw_ring_id);
5786 req->cq_handle = cpu_to_le64(ring->handle);
5787 req->enables |= cpu_to_le32(
5790 req->int_mode = RING_ALLOC_REQ_INT_MODE_MSIX;
5794 req->ring_type = RING_ALLOC_REQ_RING_TYPE_NQ;
5795 req->length = cpu_to_le32(bp->cp_ring_mask + 1);
5797 req->int_mode = RING_ALLOC_REQ_INT_MODE_MSIX;
5805 resp = hwrm_req_hold(bp, req);
5806 rc = hwrm_req_send(bp, req);
5809 hwrm_req_drop(bp, req);
5826 struct hwrm_func_cfg_input *req;
5828 rc = hwrm_req_init(bp, req, HWRM_FUNC_CFG);
5832 req->fid = cpu_to_le16(0xffff);
5833 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_ASYNC_EVENT_CR);
5834 req->async_event_cr = cpu_to_le16(idx);
5835 return hwrm_req_send(bp, req);
5837 struct hwrm_func_vf_cfg_input *req;
5839 rc = hwrm_req_init(bp, req, HWRM_FUNC_VF_CFG);
5843 req->enables =
5845 req->async_event_cr = cpu_to_le16(idx);
5846 return hwrm_req_send(bp, req);
6019 struct hwrm_ring_free_input *req;
6026 rc = hwrm_req_init(bp, req, HWRM_RING_FREE);
6030 req->cmpl_ring = cpu_to_le16(cmpl_ring_id);
6031 req->ring_type = ring_type;
6032 req->ring_id = cpu_to_le16(ring->fw_ring_id);
6034 resp = hwrm_req_hold(bp, req);
6035 rc = hwrm_req_send(bp, req);
6037 hwrm_req_drop(bp, req);
6155 struct hwrm_func_qcfg_input *req;
6161 rc = hwrm_req_init(bp, req, HWRM_FUNC_QCFG);
6165 req->fid = cpu_to_le16(0xffff);
6166 resp = hwrm_req_hold(bp, req);
6167 rc = hwrm_req_send(bp, req);
6169 hwrm_req_drop(bp, req);
6203 hwrm_req_drop(bp, req);
6210 struct hwrm_func_qcfg_input *req;
6216 rc = hwrm_req_init(bp, req, HWRM_FUNC_QCFG);
6220 req->fid = cpu_to_le16(fid);
6221 resp = hwrm_req_hold(bp, req);
6222 rc = hwrm_req_send(bp, req);
6226 hwrm_req_drop(bp, req);
6236 struct hwrm_func_cfg_input *req;
6239 if (hwrm_req_init(bp, req, HWRM_FUNC_CFG))
6242 req->fid = cpu_to_le16(0xffff);
6244 req->num_tx_rings = cpu_to_le16(tx_rings);
6263 req->num_rx_rings = cpu_to_le16(rx_rings);
6265 req->num_cmpl_rings = cpu_to_le16(tx_rings + ring_grps);
6266 req->num_msix = cpu_to_le16(cp_rings);
6267 req->num_rsscos_ctxs =
6270 req->num_cmpl_rings = cpu_to_le16(cp_rings);
6271 req->num_hw_ring_grps = cpu_to_le16(ring_grps);
6272 req->num_rsscos_ctxs = cpu_to_le16(1);
6275 req->num_rsscos_ctxs =
6278 req->num_stat_ctxs = cpu_to_le16(stats);
6279 req->num_vnics = cpu_to_le16(vnics);
6281 req->enables = cpu_to_le32(enables);
6282 return req;
6289 struct hwrm_func_vf_cfg_input *req;
6292 if (hwrm_req_init(bp, req, HWRM_FUNC_VF_CFG))
6311 req->num_l2_ctxs = cpu_to_le16(BNXT_VF_MAX_L2_CTX);
6312 req->num_tx_rings = cpu_to_le16(tx_rings);
6313 req->num_rx_rings = cpu_to_le16(rx_rings);
6315 req->num_cmpl_rings = cpu_to_le16(tx_rings + ring_grps);
6316 req->num_rsscos_ctxs = cpu_to_le16(DIV_ROUND_UP(ring_grps, 64));
6318 req->num_cmpl_rings = cpu_to_le16(cp_rings);
6319 req->num_hw_ring_grps = cpu_to_le16(ring_grps);
6320 req->num_rsscos_ctxs = cpu_to_le16(BNXT_VF_MAX_RSS_CTX);
6322 req->num_stat_ctxs = cpu_to_le16(stats);
6323 req->num_vnics = cpu_to_le16(vnics);
6325 req->enables = cpu_to_le32(enables);
6326 return req;
6333 struct hwrm_func_cfg_input *req;
6336 req = __bnxt_hwrm_reserve_pf_rings(bp, tx_rings, rx_rings, ring_grps,
6338 if (!req)
6341 if (!req->enables) {
6342 hwrm_req_drop(bp, req);
6346 rc = hwrm_req_send(bp, req);
6360 struct hwrm_func_vf_cfg_input *req;
6368 req = __bnxt_hwrm_reserve_vf_rings(bp, tx_rings, rx_rings, ring_grps,
6370 if (!req)
6373 rc = hwrm_req_send(bp, req);
6574 struct hwrm_func_vf_cfg_input *req;
6580 req = __bnxt_hwrm_reserve_vf_rings(bp, tx_rings, rx_rings, ring_grps,
6591 req->flags = cpu_to_le32(flags);
6592 return hwrm_req_send_silent(bp, req);
6599 struct hwrm_func_cfg_input *req;
6602 req = __bnxt_hwrm_reserve_pf_rings(bp, tx_rings, rx_rings, ring_grps,
6617 req->flags = cpu_to_le32(flags);
6618 return hwrm_req_send_silent(bp, req);
6641 struct hwrm_ring_aggint_qcaps_input *req;
6657 if (hwrm_req_init(bp, req, HWRM_RING_AGGINT_QCAPS))
6660 resp = hwrm_req_hold(bp, req);
6661 rc = hwrm_req_send_silent(bp, req);
6681 hwrm_req_drop(bp, req);
6693 struct hwrm_ring_cmpl_ring_cfg_aggint_params_input *req)
6705 req->num_cmpl_aggr_int = cpu_to_le16(val);
6708 req->num_cmpl_dma_aggr = cpu_to_le16(val);
6712 req->num_cmpl_dma_aggr_during_int = cpu_to_le16(val);
6716 req->int_lat_tmr_max = cpu_to_le16(tmr);
6722 req->int_lat_tmr_min = cpu_to_le16(val);
6723 req->enables |= cpu_to_le16(BNXT_COAL_CMPL_MIN_TMR_ENABLE);
6728 req->cmpl_aggr_dma_tmr = cpu_to_le16(val);
6735 req->cmpl_aggr_dma_tmr_during_int = cpu_to_le16(val);
6736 req->enables |=
6743 req->flags = cpu_to_le16(flags);
6744 req->enables |= cpu_to_le16(BNXT_COAL_CMPL_ENABLES);
6750 struct hwrm_ring_cmpl_ring_cfg_aggint_params_input *req;
6760 rc = hwrm_req_init(bp, req, HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS);
6764 req->ring_id = cpu_to_le16(cpr->cp_ring_struct.fw_ring_id);
6765 req->flags =
6770 req->int_lat_tmr_min = cpu_to_le16(tmr);
6771 req->enables |= cpu_to_le16(BNXT_COAL_CMPL_MIN_TMR_ENABLE);
6772 return hwrm_req_send(bp, req);
6807 *req;
6830 req = req_rx;
6833 req = req_tx;
6837 req->ring_id = cpu_to_le16(ring_id);
6839 rc = hwrm_req_send(bp, req);
6847 req = req_tx;
6849 req->ring_id = cpu_to_le16(ring_id);
6850 rc = hwrm_req_send(bp, req);
6868 struct hwrm_stat_ctx_free_input *req;
6877 if (hwrm_req_init(bp, req, HWRM_STAT_CTX_FREE))
6881 hwrm_req_drop(bp, req);
6886 hwrm_req_hold(bp, req);
6892 req->stat_ctx_id = cpu_to_le32(cpr->hw_stats_ctx_id);
6894 req0->stat_ctx_id = req->stat_ctx_id;
6897 hwrm_req_send(bp, req);
6902 hwrm_req_drop(bp, req);
6910 struct hwrm_stat_ctx_alloc_input *req;
6916 rc = hwrm_req_init(bp, req, HWRM_STAT_CTX_ALLOC);
6920 req->stats_dma_length = cpu_to_le16(bp->hw_ring_stats_size);
6921 req->update_period_ms = cpu_to_le32(bp->stats_coal_ticks / 1000);
6923 resp = hwrm_req_hold(bp, req);
6928 req->stats_dma_addr = cpu_to_le64(cpr->stats.hw_stats_map);
6930 rc = hwrm_req_send(bp, req);
6938 hwrm_req_drop(bp, req);
6945 struct hwrm_func_qcfg_input *req;
6950 rc = hwrm_req_init(bp, req, HWRM_FUNC_QCFG);
6954 req->fid = cpu_to_le16(0xffff);
6955 resp = hwrm_req_hold(bp, req);
6956 rc = hwrm_req_send(bp, req);
7017 hwrm_req_drop(bp, req);
7057 struct hwrm_func_backing_store_qcaps_input *req;
7063 rc = hwrm_req_init(bp, req, HWRM_FUNC_BACKING_STORE_QCAPS);
7067 resp = hwrm_req_hold(bp, req);
7068 rc = hwrm_req_send_silent(bp, req);
7133 hwrm_req_drop(bp, req);
7164 struct hwrm_func_backing_store_cfg_input *req;
7167 void **__req = (void **)&req;
7168 u32 req_len = sizeof(*req);
7186 req->enables = cpu_to_le32(enables);
7189 req->qp_num_entries = cpu_to_le32(ctx_pg->entries);
7190 req->qp_num_qp1_entries = cpu_to_le16(ctx->qp_min_qp1_entries);
7191 req->qp_num_l2_entries = cpu_to_le16(ctx->qp_max_l2_entries);
7192 req->qp_entry_size = cpu_to_le16(ctx->qp_entry_size);
7194 &req->qpc_pg_size_qpc_lvl,
7195 &req->qpc_page_dir);
7199 req->srq_num_entries = cpu_to_le32(ctx_pg->entries);
7200 req->srq_num_l2_entries = cpu_to_le16(ctx->srq_max_l2_entries);
7201 req->srq_entry_size = cpu_to_le16(ctx->srq_entry_size);
7203 &req->srq_pg_size_srq_lvl,
7204 &req->srq_page_dir);
7208 req->cq_num_entries = cpu_to_le32(ctx_pg->entries);
7209 req->cq_num_l2_entries = cpu_to_le16(ctx->cq_max_l2_entries);
7210 req->cq_entry_size = cpu_to_le16(ctx->cq_entry_size);
7212 &req->cq_pg_size_cq_lvl,
7213 &req->cq_page_dir);
7217 req->vnic_num_vnic_entries =
7219 req->vnic_num_ring_table_entries =
7221 req->vnic_entry_size = cpu_to_le16(ctx->vnic_entry_size);
7223 &req->vnic_pg_size_vnic_lvl,
7224 &req->vnic_page_dir);
7228 req->stat_num_entries = cpu_to_le32(ctx->stat_max_entries);
7229 req->stat_entry_size = cpu_to_le16(ctx->stat_entry_size);
7231 &req->stat_pg_size_stat_lvl,
7232 &req->stat_page_dir);
7236 req->mrav_num_entries = cpu_to_le32(ctx_pg->entries);
7240 req->mrav_entry_size = cpu_to_le16(ctx->mrav_entry_size);
7242 &req->mrav_pg_size_mrav_lvl,
7243 &req->mrav_page_dir);
7247 req->tim_num_entries = cpu_to_le32(ctx_pg->entries);
7248 req->tim_entry_size = cpu_to_le16(ctx->tim_entry_size);
7250 &req->tim_pg_size_tim_lvl,
7251 &req->tim_page_dir);
7253 for (i = 0, num_entries = &req->tqm_sp_num_entries,
7254 pg_attr = &req->tqm_sp_pg_size_tqm_sp_lvl,
7255 pg_dir = &req->tqm_sp_page_dir,
7262 req->tqm_entry_size = cpu_to_le16(ctx->tqm_entry_size);
7267 req->flags = cpu_to_le32(flags);
7268 return hwrm_req_send(bp, req);
7549 struct hwrm_func_resource_qcaps_input *req;
7553 rc = hwrm_req_init(bp, req, HWRM_FUNC_RESOURCE_QCAPS);
7557 req->fid = cpu_to_le16(0xffff);
7558 resp = hwrm_req_hold(bp, req);
7559 rc = hwrm_req_send_silent(bp, req);
7600 hwrm_req_drop(bp, req);
7607 struct hwrm_port_mac_ptp_qcfg_input *req;
7618 rc = hwrm_req_init(bp, req, HWRM_PORT_MAC_PTP_QCFG);
7622 req->port_id = cpu_to_le16(bp->pf.port_id);
7623 resp = hwrm_req_hold(bp, req);
7624 rc = hwrm_req_send(bp, req);
7657 hwrm_req_drop(bp, req);
7671 struct hwrm_func_qcaps_input *req;
7676 rc = hwrm_req_init(bp, req, HWRM_FUNC_QCAPS);
7680 req->fid = cpu_to_le16(0xffff);
7681 resp = hwrm_req_hold(bp, req);
7682 rc = hwrm_req_send(bp, req);
7772 hwrm_req_drop(bp, req);
7779 struct hwrm_dbg_qcaps_input *req;
7786 rc = hwrm_req_init(bp, req, HWRM_DBG_QCAPS);
7790 req->fid = cpu_to_le16(0xffff);
7791 resp = hwrm_req_hold(bp, req);
7792 rc = hwrm_req_send(bp, req);
7799 hwrm_req_drop(bp, req);
7833 struct hwrm_cfa_adv_flow_mgnt_qcaps_input *req;
7840 rc = hwrm_req_init(bp, req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS);
7844 resp = hwrm_req_hold(bp, req);
7845 rc = hwrm_req_send(bp, req);
7855 hwrm_req_drop(bp, req);
8007 struct hwrm_error_recovery_qcfg_input *req;
8013 rc = hwrm_req_init(bp, req, HWRM_ERROR_RECOVERY_QCFG);
8017 resp = hwrm_req_hold(bp, req);
8018 rc = hwrm_req_send(bp, req);
8060 hwrm_req_drop(bp, req);
8070 struct hwrm_func_reset_input *req;
8073 rc = hwrm_req_init(bp, req, HWRM_FUNC_RESET);
8077 req->enables = 0;
8078 hwrm_req_timeout(bp, req, HWRM_RESET_TIMEOUT);
8079 return hwrm_req_send(bp, req);
8095 struct hwrm_queue_qportcfg_input *req;
8100 rc = hwrm_req_init(bp, req, HWRM_QUEUE_QPORTCFG);
8104 resp = hwrm_req_hold(bp, req);
8105 rc = hwrm_req_send(bp, req);
8139 hwrm_req_drop(bp, req);
8145 struct hwrm_ver_get_input *req;
8148 rc = hwrm_req_init(bp, req, HWRM_VER_GET);
8152 req->hwrm_intf_maj = HWRM_VERSION_MAJOR;
8153 req->hwrm_intf_min = HWRM_VERSION_MINOR;
8154 req->hwrm_intf_upd = HWRM_VERSION_UPDATE;
8156 hwrm_req_flags(bp, req, BNXT_HWRM_CTX_SILENT | BNXT_HWRM_FULL_WAIT);
8157 rc = hwrm_req_send(bp, req);
8164 struct hwrm_ver_get_input *req;
8169 rc = hwrm_req_init(bp, req, HWRM_VER_GET);
8173 hwrm_req_flags(bp, req, BNXT_HWRM_FULL_WAIT);
8175 req->hwrm_intf_maj = HWRM_VERSION_MAJOR;
8176 req->hwrm_intf_min = HWRM_VERSION_MINOR;
8177 req->hwrm_intf_upd = HWRM_VERSION_UPDATE;
8179 resp = hwrm_req_hold(bp, req);
8180 rc = hwrm_req_send(bp, req);
8278 hwrm_req_drop(bp, req);
8284 struct hwrm_fw_set_time_input *req;
8294 rc = hwrm_req_init(bp, req, HWRM_FW_SET_TIME);
8298 req->year = cpu_to_le16(1900 + tm.tm_year);
8299 req->month = 1 + tm.tm_mon;
8300 req->day = tm.tm_mday;
8301 req->hour = tm.tm_hour;
8302 req->minute = tm.tm_min;
8303 req->second = tm.tm_sec;
8304 return hwrm_req_send(bp, req);
8392 struct hwrm_port_qstats_input *req;
8402 rc = hwrm_req_init(bp, req, HWRM_PORT_QSTATS);
8406 req->flags = flags;
8407 req->port_id = cpu_to_le16(pf->port_id);
8408 req->tx_stat_host_addr = cpu_to_le64(bp->port_stats.hw_stats_map +
8410 req->rx_stat_host_addr = cpu_to_le64(bp->port_stats.hw_stats_map);
8411 return hwrm_req_send(bp, req);
8573 struct hwrm_func_cfg_input *req;
8584 rc = hwrm_req_init(bp, req, HWRM_FUNC_CFG);
8588 req->fid = cpu_to_le16(0xffff);
8589 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_EVB_MODE);
8590 req->evb_mode = evb_mode;
8591 return hwrm_req_send(bp, req);
8596 struct hwrm_func_cfg_input *req;
8602 rc = hwrm_req_init(bp, req, HWRM_FUNC_CFG);
8606 req->fid = cpu_to_le16(0xffff);
8607 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_CACHE_LINESIZE);
8608 req->options = FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_SIZE_64;
8610 req->options = FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_SIZE_128;
8612 return hwrm_req_send(bp, req);
9586 struct hwrm_port_phy_qcaps_input *req;
9592 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_QCAPS);
9596 resp = hwrm_req_hold(bp, req);
9597 rc = hwrm_req_send(bp, req);
9635 hwrm_req_drop(bp, req);
9650 struct hwrm_port_phy_qcfg_input *req;
9655 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_QCFG);
9659 resp = hwrm_req_hold(bp, req);
9660 rc = hwrm_req_send(bp, req);
9662 hwrm_req_drop(bp, req);
9761 hwrm_req_drop(bp, req);
9812 bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req)
9816 req->auto_pause =
9819 req->auto_pause |= PORT_PHY_CFG_REQ_AUTO_PAUSE_RX;
9821 req->auto_pause |= PORT_PHY_CFG_REQ_AUTO_PAUSE_TX;
9822 req->enables |=
9826 req->force_pause |= PORT_PHY_CFG_REQ_FORCE_PAUSE_RX;
9828 req->force_pause |= PORT_PHY_CFG_REQ_FORCE_PAUSE_TX;
9829 req->enables |=
9832 req->auto_pause = req->force_pause;
9833 req->enables |= cpu_to_le32(
9839 static void bnxt_hwrm_set_link_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req)
9842 req->auto_mode |= PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK;
9844 req->enables |= cpu_to_le32(PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK);
9845 req->auto_link_speed_mask = cpu_to_le16(bp->link_info.advertising);
9848 req->enables |=
9850 req->auto_link_pam4_speed_mask =
9853 req->enables |= cpu_to_le32(PORT_PHY_CFG_REQ_ENABLES_AUTO_MODE);
9854 req->flags |= cpu_to_le32(PORT_PHY_CFG_REQ_FLAGS_RESTART_AUTONEG);
9856 req->flags |= cpu_to_le32(PORT_PHY_CFG_REQ_FLAGS_FORCE);
9858 req->force_pam4_link_speed = cpu_to_le16(bp->link_info.req_link_speed);
9859 req->enables |= cpu_to_le32(PORT_PHY_CFG_REQ_ENABLES_FORCE_PAM4_LINK_SPEED);
9861 req->force_link_speed = cpu_to_le16(bp->link_info.req_link_speed);
9866 req->flags |= cpu_to_le32(PORT_PHY_CFG_REQ_FLAGS_RESET_PHY);
9871 struct hwrm_port_phy_cfg_input *req;
9874 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_CFG);
9878 bnxt_hwrm_set_pause_common(bp, req);
9882 bnxt_hwrm_set_link_common(bp, req);
9884 rc = hwrm_req_send(bp, req);
9901 struct hwrm_port_phy_cfg_input *req)
9914 req->flags |= cpu_to_le32(flags);
9916 req->eee_link_speed_mask = cpu_to_le16(eee_speeds);
9917 req->tx_lpi_timer = cpu_to_le32(eee->tx_lpi_timer);
9919 req->flags |= cpu_to_le32(PORT_PHY_CFG_REQ_FLAGS_EEE_DISABLE);
9925 struct hwrm_port_phy_cfg_input *req;
9928 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_CFG);
9933 bnxt_hwrm_set_pause_common(bp, req);
9935 bnxt_hwrm_set_link_common(bp, req);
9938 bnxt_hwrm_set_eee(bp, req);
9939 return hwrm_req_send(bp, req);
9944 struct hwrm_port_phy_cfg_input *req;
9954 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_CFG);
9958 req->flags = cpu_to_le32(PORT_PHY_CFG_REQ_FLAGS_FORCE_LINK_DWN);
9959 rc = hwrm_req_send(bp, req);
10058 struct hwrm_func_drv_if_change_input *req;
10067 rc = hwrm_req_init(bp, req, HWRM_FUNC_DRV_IF_CHANGE);
10072 req->flags = cpu_to_le32(FUNC_DRV_IF_CHANGE_REQ_FLAGS_UP);
10073 resp = hwrm_req_hold(bp, req);
10075 hwrm_req_flags(bp, req, BNXT_HWRM_FULL_WAIT);
10077 rc = hwrm_req_send(bp, req);
10086 hwrm_req_drop(bp, req);
10094 hwrm_req_drop(bp, req);
10147 struct hwrm_port_led_qcaps_input *req;
10155 rc = hwrm_req_init(bp, req, HWRM_PORT_LED_QCAPS);
10159 req->port_id = cpu_to_le16(pf->port_id);
10160 resp = hwrm_req_hold(bp, req);
10161 rc = hwrm_req_send(bp, req);
10163 hwrm_req_drop(bp, req);
10183 hwrm_req_drop(bp, req);
10190 struct hwrm_wol_filter_alloc_input *req;
10193 rc = hwrm_req_init(bp, req, HWRM_WOL_FILTER_ALLOC);
10197 req->port_id = cpu_to_le16(bp->pf.port_id);
10198 req->wol_type = WOL_FILTER_ALLOC_REQ_WOL_TYPE_MAGICPKT;
10199 req->enables = cpu_to_le32(WOL_FILTER_ALLOC_REQ_ENABLES_MAC_ADDRESS);
10200 memcpy(req->mac_address, bp->dev->dev_addr, ETH_ALEN);
10202 resp = hwrm_req_hold(bp, req);
10203 rc = hwrm_req_send(bp, req);
10206 hwrm_req_drop(bp, req);
10212 struct hwrm_wol_filter_free_input *req;
10215 rc = hwrm_req_init(bp, req, HWRM_WOL_FILTER_FREE);
10219 req->port_id = cpu_to_le16(bp->pf.port_id);
10220 req->enables = cpu_to_le32(WOL_FILTER_FREE_REQ_ENABLES_WOL_FILTER_ID);
10221 req->wol_filter_id = bp->wol_filter_id;
10223 return hwrm_req_send(bp, req);
10229 struct hwrm_wol_filter_qcfg_input *req;
10233 rc = hwrm_req_init(bp, req, HWRM_WOL_FILTER_QCFG);
10237 req->port_id = cpu_to_le16(bp->pf.port_id);
10238 req->handle = cpu_to_le16(handle);
10239 resp = hwrm_req_hold(bp, req);
10240 rc = hwrm_req_send(bp, req);
10251 hwrm_req_drop(bp, req);
10273 struct hwrm_temp_monitor_query_input *req;
10278 rc = hwrm_req_init(bp, req, HWRM_TEMP_MONITOR_QUERY);
10281 resp = hwrm_req_hold(bp, req);
10282 rc = hwrm_req_send(bp, req);
10285 hwrm_req_drop(bp, req);
10308 struct hwrm_temp_monitor_query_input *req;
10312 rc = hwrm_req_init(bp, req, HWRM_TEMP_MONITOR_QUERY);
10314 rc = hwrm_req_send_silent(bp, req);
10769 struct hwrm_port_phy_mdio_read_input *req;
10775 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_MDIO_READ);
10779 req->port_id = cpu_to_le16(bp->pf.port_id);
10780 req->phy_addr = phy_addr;
10781 req->reg_addr = cpu_to_le16(reg & 0x1f);
10783 req->cl45_mdio = 1;
10784 req->phy_addr = mdio_phy_id_prtad(phy_addr);
10785 req->dev_addr = mdio_phy_id_devad(phy_addr);
10786 req->reg_addr = cpu_to_le16(reg);
10789 resp = hwrm_req_hold(bp, req);
10790 rc = hwrm_req_send(bp, req);
10793 hwrm_req_drop(bp, req);
10800 struct hwrm_port_phy_mdio_write_input *req;
10806 rc = hwrm_req_init(bp, req, HWRM_PORT_PHY_MDIO_WRITE);
10810 req->port_id = cpu_to_le16(bp->pf.port_id);
10811 req->phy_addr = phy_addr;
10812 req->reg_addr = cpu_to_le16(reg & 0x1f);
10814 req->cl45_mdio = 1;
10815 req->phy_addr = mdio_phy_id_prtad(phy_addr);
10816 req->dev_addr = mdio_phy_id_devad(phy_addr);
10817 req->reg_addr = cpu_to_le16(reg);
10819 req->reg_data = cpu_to_le16(val);
10821 return hwrm_req_send(bp, req);
11091 struct hwrm_cfa_l2_filter_free_input *req;
11103 rc = hwrm_req_init(bp, req, HWRM_CFA_L2_FILTER_FREE);
11106 hwrm_req_hold(bp, req);
11108 req->l2_filter_id = vnic->fw_l2_filter_id[i];
11110 rc = hwrm_req_send(bp, req);
11112 hwrm_req_drop(bp, req);
11494 struct hwrm_dbg_read_direct_input *req;
11499 rc = hwrm_req_init(bp, req, HWRM_DBG_READ_DIRECT);
11503 dbg_reg_buf = hwrm_req_dma_slice(bp, req, num_words * 4,
11510 req->host_dest_addr = cpu_to_le64(mapping);
11512 resp = hwrm_req_hold(bp, req);
11513 req->read_addr = cpu_to_le32(reg_off + CHIMP_REG_VIEW_ADDR);
11514 req->read_len32 = cpu_to_le32(num_words);
11516 rc = hwrm_req_send(bp, req);
11525 hwrm_req_drop(bp, req);
11533 struct hwrm_dbg_ring_info_get_input *req;
11536 rc = hwrm_req_init(bp, req, HWRM_DBG_RING_INFO_GET);
11540 req->ring_type = ring_type;
11541 req->fw_ring_id = cpu_to_le32(ring_id);
11542 resp = hwrm_req_hold(bp, req);
11543 rc = hwrm_req_send(bp, req);
11548 hwrm_req_drop(bp, req);
11606 struct hwrm_ring_reset_input *req;
11612 rc = hwrm_req_init(bp, req, HWRM_RING_RESET);
11618 req->cmpl_ring = cpu_to_le16(cp_ring_id);
11619 req->ring_type = RING_RESET_REQ_RING_TYPE_RX_RING_GRP;
11620 req->ring_id = cpu_to_le16(bp->grp_info[bnapi->index].fw_grp_id);
11621 return hwrm_req_send_silent(bp, req);
12050 struct hwrm_func_echo_response_input *req;
12053 rc = hwrm_req_init(bp, req, HWRM_FUNC_ECHO_RESPONSE);
12056 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1);
12057 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2);
12058 hwrm_req_send(bp, req);
12443 struct hwrm_func_qcfg_input *req;
12449 if (hwrm_req_init(bp, req, HWRM_FUNC_QCFG))
12452 req->fid = cpu_to_le16(0xffff);
12453 resp = hwrm_req_hold(bp, req);
12454 if (!hwrm_req_send(bp, req))
12457 hwrm_req_drop(bp, req);
12476 struct hwrm_fw_reset_input *req;
12478 rc = hwrm_req_init(bp, req, HWRM_FW_RESET);
12480 req->target_id = cpu_to_le16(HWRM_TARGET_ID_KONG);
12481 req->embedded_proc_type = FW_RESET_REQ_EMBEDDED_PROC_TYPE_CHIP;
12482 req->selfrst_status = FW_RESET_REQ_SELFRST_STATUS_SELFRSTASAP;
12483 req->flags = FW_RESET_REQ_FLAGS_RESET_GRACEFUL;
12484 rc = hwrm_req_send(bp, req);