Lines Matching full:adapter

45 int t4vf_wait_dev_ready(struct adapter *adapter)  in t4vf_wait_dev_ready()  argument
52 val = t4_read_reg(adapter, whoami); in t4vf_wait_dev_ready()
56 val = t4_read_reg(adapter, whoami); in t4vf_wait_dev_ready()
66 * @adapter: the adapter
72 int t4vf_fw_reset(struct adapter *adapter) in t4vf_fw_reset() argument
80 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_fw_reset()
84 * t4vf_get_sge_params - retrieve adapter Scatter gather Engine parameters
85 * @adapter: the adapter
89 * needed. The SGE parameters are stored in @adapter->params.sge.
91 int t4vf_get_sge_params(struct adapter *adapter) in t4vf_get_sge_params() argument
93 struct sge_params *sp = &adapter->params.sge; in t4vf_get_sge_params()
113 v = t4vf_query_params(adapter, 7, params, vals); in t4vf_get_sge_params()
122 sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(vals[2])); in t4vf_get_sge_params()
123 sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(vals[2])); in t4vf_get_sge_params()
124 sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(vals[3])); in t4vf_get_sge_params()
125 sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(vals[3])); in t4vf_get_sge_params()
126 sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(vals[4])); in t4vf_get_sge_params()
127 sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(vals[4])); in t4vf_get_sge_params()
130 if (is_t4(adapter)) in t4vf_get_sge_params()
132 else if (is_t5(adapter)) in t4vf_get_sge_params()
141 whoami = t4_read_reg(adapter, VF_PL_REG(A_PL_VF_WHOAMI)); in t4vf_get_sge_params()
142 if (chip_id(adapter) <= CHELSIO_T5) in t4vf_get_sge_params()
154 v = t4vf_query_params(adapter, 1, params, vals); in t4vf_get_sge_params()
174 if (chip_id(adapter) <= CHELSIO_T5) { in t4vf_get_sge_params()
181 if (is_t4(adapter)) in t4vf_get_sge_params()
186 v = t4vf_query_params(adapter, 1, params, vals); in t4vf_get_sge_params()
188 CH_ERR(adapter, "Unable to get SGE Control2; " in t4vf_get_sge_params()
204 if (!is_t4(adapter)) { in t4vf_get_sge_params()
211 v = t4vf_query_params(adapter, 2, params, vals); in t4vf_get_sge_params()
213 CH_WARN(adapter, "Unable to get VF SGE Queues/Page; " in t4vf_get_sge_params()
228 * t4vf_get_rss_glb_config - retrieve adapter RSS Global Configuration
229 * @adapter: the adapter
232 * and stores them in the @adapter's RSS parameters.
234 int t4vf_get_rss_glb_config(struct adapter *adapter) in t4vf_get_rss_glb_config() argument
236 struct rss_params *rss = &adapter->params.rss; in t4vf_get_rss_glb_config()
249 v = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_get_rss_glb_config()
304 * @adapter: the adapter
307 * function. The results are stored in @adapter->vfres.
309 int t4vf_get_vfres(struct adapter *adapter) in t4vf_get_vfres() argument
311 struct vf_resources *vfres = &adapter->params.vfres; in t4vf_get_vfres()
325 v = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_get_vfres()
355 int t4vf_prep_adapter(struct adapter *adapter) in t4vf_prep_adapter() argument
362 err = t4vf_wait_dev_ready(adapter); in t4vf_prep_adapter()
366 adapter->params.chipid = pci_get_device(adapter->dev) >> 12; in t4vf_prep_adapter()
367 if (adapter->params.chipid >= 0xa) { in t4vf_prep_adapter()
368 adapter->params.chipid -= (0xa - 0x4); in t4vf_prep_adapter()
369 adapter->params.fpga = 1; in t4vf_prep_adapter()
376 adapter->params.nports = 1; in t4vf_prep_adapter()
377 adapter->params.vfres.pmask = 1; in t4vf_prep_adapter()
378 adapter->params.vpd.cclk = 50000; in t4vf_prep_adapter()
380 adapter->chip_params = t4_get_chip_params(chip_id(adapter)); in t4vf_prep_adapter()
381 if (adapter->chip_params == NULL) in t4vf_prep_adapter()
389 * @adapter: The adapter
397 int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port, in t4vf_get_vf_mac() argument
408 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &cmd); in t4vf_get_vf_mac()
435 * @adapter: The adapter
440 int t4vf_get_vf_vlan(struct adapter *adapter) in t4vf_get_vf_vlan() argument
452 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &cmd); in t4vf_get_vf_vlan()