• Home
  • Raw
  • Download

Lines Matching refs:snic

33 snic_get_vnic_config(struct snic *snic)  in snic_get_vnic_config()  argument
35 struct vnic_snic_config *c = &snic->config; in snic_get_vnic_config()
40 ret = svnic_dev_spec(snic->vdev, \ in snic_get_vnic_config()
45 SNIC_HOST_ERR(snic->shost, \ in snic_get_vnic_config()
120 snic_get_res_counts(struct snic *snic) in snic_get_res_counts() argument
122 snic->wq_count = svnic_dev_get_res_count(snic->vdev, RES_TYPE_WQ); in snic_get_res_counts()
123 SNIC_BUG_ON(snic->wq_count == 0); in snic_get_res_counts()
124 snic->cq_count = svnic_dev_get_res_count(snic->vdev, RES_TYPE_CQ); in snic_get_res_counts()
125 SNIC_BUG_ON(snic->cq_count == 0); in snic_get_res_counts()
126 snic->intr_count = svnic_dev_get_res_count(snic->vdev, in snic_get_res_counts()
128 SNIC_BUG_ON(snic->intr_count == 0); in snic_get_res_counts()
132 snic_free_vnic_res(struct snic *snic) in snic_free_vnic_res() argument
136 for (i = 0; i < snic->wq_count; i++) in snic_free_vnic_res()
137 svnic_wq_free(&snic->wq[i]); in snic_free_vnic_res()
139 for (i = 0; i < snic->cq_count; i++) in snic_free_vnic_res()
140 svnic_cq_free(&snic->cq[i]); in snic_free_vnic_res()
142 for (i = 0; i < snic->intr_count; i++) in snic_free_vnic_res()
143 svnic_intr_free(&snic->intr[i]); in snic_free_vnic_res()
147 snic_alloc_vnic_res(struct snic *snic) in snic_alloc_vnic_res() argument
157 intr_mode = svnic_dev_get_intr_mode(snic->vdev); in snic_alloc_vnic_res()
170 SNIC_INFO("wq %d cq %d intr %d\n", snic->wq_count, in snic_alloc_vnic_res()
171 snic->cq_count, in snic_alloc_vnic_res()
172 snic->intr_count); in snic_alloc_vnic_res()
176 for (i = 0; i < snic->wq_count; i++) { in snic_alloc_vnic_res()
177 ret = svnic_wq_alloc(snic->vdev, in snic_alloc_vnic_res()
178 &snic->wq[i], in snic_alloc_vnic_res()
180 snic->config.wq_enet_desc_count, in snic_alloc_vnic_res()
187 for (i = 0; i < snic->wq_count; i++) { in snic_alloc_vnic_res()
188 ret = svnic_cq_alloc(snic->vdev, in snic_alloc_vnic_res()
189 &snic->cq[i], in snic_alloc_vnic_res()
191 snic->config.wq_enet_desc_count, in snic_alloc_vnic_res()
197 SNIC_BUG_ON(snic->cq_count != 2 * snic->wq_count); in snic_alloc_vnic_res()
199 for (i = snic->wq_count; i < snic->cq_count; i++) { in snic_alloc_vnic_res()
200 ret = svnic_cq_alloc(snic->vdev, in snic_alloc_vnic_res()
201 &snic->cq[i], in snic_alloc_vnic_res()
203 (snic->config.wq_enet_desc_count * 3), in snic_alloc_vnic_res()
209 for (i = 0; i < snic->intr_count; i++) { in snic_alloc_vnic_res()
210 ret = svnic_intr_alloc(snic->vdev, &snic->intr[i], i); in snic_alloc_vnic_res()
221 err_intr_offset = snic->err_intr_offset; in snic_alloc_vnic_res()
223 for (i = 0; i < snic->wq_count; i++) { in snic_alloc_vnic_res()
224 svnic_wq_init(&snic->wq[i], in snic_alloc_vnic_res()
230 for (i = 0; i < snic->cq_count; i++) { in snic_alloc_vnic_res()
233 svnic_cq_init(&snic->cq[i], in snic_alloc_vnic_res()
253 for (i = 0; i < snic->intr_count; i++) { in snic_alloc_vnic_res()
254 svnic_intr_init(&snic->intr[i], in snic_alloc_vnic_res()
255 snic->config.intr_timer, in snic_alloc_vnic_res()
256 snic->config.intr_timer_type, in snic_alloc_vnic_res()
261 ret = svnic_dev_stats_dump(snic->vdev, &snic->stats); in snic_alloc_vnic_res()
263 SNIC_HOST_ERR(snic->shost, in snic_alloc_vnic_res()
270 svnic_dev_stats_clear(snic->vdev); in snic_alloc_vnic_res()
276 snic_free_vnic_res(snic); in snic_alloc_vnic_res()
282 snic_log_q_error(struct snic *snic) in snic_log_q_error() argument
287 for (i = 0; i < snic->wq_count; i++) { in snic_log_q_error()
288 err_status = ioread32(&snic->wq[i].ctrl->error_status); in snic_log_q_error()
290 SNIC_HOST_ERR(snic->shost, in snic_log_q_error()