Commit 43db9296 authored by Raju Rangoju's avatar Raju Rangoju Committed by David S. Miller

cxgb4: Support firmware rdma write with immediate work request.

If FW supports RDMA WRITE_WITH_IMMEDATE functionality, then advertise
that
to the ULDs. This will be used by iw_cxgb4 to allow WRITE_WITH_IMMEDIATE
work requests.
Signed-off-by: default avatarPotnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c68644ef
...@@ -390,6 +390,7 @@ struct adapter_params { ...@@ -390,6 +390,7 @@ struct adapter_params {
* used by the Port * used by the Port
*/ */
u8 mps_bg_map[MAX_NPORTS]; /* MPS Buffer Group Map */ u8 mps_bg_map[MAX_NPORTS]; /* MPS Buffer Group Map */
bool write_w_imm_support; /* FW supports WRITE_WITH_IMMEDIATE */
}; };
/* State needed to monitor the forward progress of SGE Ingress DMA activities /* State needed to monitor the forward progress of SGE Ingress DMA activities
......
...@@ -4519,6 +4519,12 @@ static int adap_init0(struct adapter *adap) ...@@ -4519,6 +4519,12 @@ static int adap_init0(struct adapter *adap)
"max_ordird_qp %d max_ird_adapter %d\n", "max_ordird_qp %d max_ird_adapter %d\n",
adap->params.max_ordird_qp, adap->params.max_ordird_qp,
adap->params.max_ird_adapter); adap->params.max_ird_adapter);
/* Enable write_with_immediate if FW supports it */
params[0] = FW_PARAM_DEV(RDMA_WRITE_WITH_IMM);
ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, params,
val);
adap->params.write_w_imm_support = (ret == 0 && val[0] != 0);
adap->num_ofld_uld += 2; adap->num_ofld_uld += 2;
} }
if (caps_cmd.iscsicaps) { if (caps_cmd.iscsicaps) {
......
...@@ -666,6 +666,7 @@ static void uld_init(struct adapter *adap, struct cxgb4_lld_info *lld) ...@@ -666,6 +666,7 @@ static void uld_init(struct adapter *adap, struct cxgb4_lld_info *lld)
lld->ulptx_memwrite_dsgl = adap->params.ulptx_memwrite_dsgl; lld->ulptx_memwrite_dsgl = adap->params.ulptx_memwrite_dsgl;
lld->nodeid = dev_to_node(adap->pdev_dev); lld->nodeid = dev_to_node(adap->pdev_dev);
lld->fr_nsmr_tpte_wr_support = adap->params.fr_nsmr_tpte_wr_support; lld->fr_nsmr_tpte_wr_support = adap->params.fr_nsmr_tpte_wr_support;
lld->write_w_imm_support = adap->params.write_w_imm_support;
} }
static void uld_attach(struct adapter *adap, unsigned int uld) static void uld_attach(struct adapter *adap, unsigned int uld)
......
...@@ -354,6 +354,7 @@ struct cxgb4_lld_info { ...@@ -354,6 +354,7 @@ struct cxgb4_lld_info {
void **iscsi_ppm; /* iscsi page pod manager */ void **iscsi_ppm; /* iscsi page pod manager */
int nodeid; /* device numa node id */ int nodeid; /* device numa node id */
bool fr_nsmr_tpte_wr_support; /* FW supports FR_NSMR_TPTE_WR */ bool fr_nsmr_tpte_wr_support; /* FW supports FR_NSMR_TPTE_WR */
bool write_w_imm_support; /* FW supports WRITE_WITH_IMMEDIATE */
}; };
struct cxgb4_uld_info { struct cxgb4_uld_info {
......
...@@ -1213,6 +1213,7 @@ enum fw_params_param_dev { ...@@ -1213,6 +1213,7 @@ enum fw_params_param_dev {
FW_PARAMS_PARAM_DEV_FILTER2_WR = 0x1D, FW_PARAMS_PARAM_DEV_FILTER2_WR = 0x1D,
FW_PARAMS_PARAM_DEV_MPSBGMAP = 0x1E, FW_PARAMS_PARAM_DEV_MPSBGMAP = 0x1E,
FW_PARAMS_PARAM_DEV_HMA_SIZE = 0x20, FW_PARAMS_PARAM_DEV_HMA_SIZE = 0x20,
FW_PARAMS_PARAM_DEV_RDMA_WRITE_WITH_IMM = 0x21,
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment