Lines Matching refs:hw

57 csio_get_flbuf_size(struct csio_hw *hw, struct csio_sge *sge, uint32_t reg)  in csio_get_flbuf_size()  argument
59 sge->sge_fl_buf_size[reg] = csio_rd_reg32(hw, SGE_FL_BUFFER_SIZE0_A + in csio_get_flbuf_size()
72 csio_wr_qstat_pgsz(struct csio_hw *hw) in csio_wr_qstat_pgsz() argument
74 return (hw->wrm.sge.sge_control & EGRSTATUSPAGESIZE_F) ? 128 : 64; in csio_wr_qstat_pgsz()
79 csio_wr_ring_fldb(struct csio_hw *hw, struct csio_q *flq) in csio_wr_ring_fldb() argument
87 csio_wr_reg32(hw, DBPRIO_F | QID_V(flq->un.fl.flid) | in csio_wr_ring_fldb()
96 csio_wr_sge_intr_enable(struct csio_hw *hw, uint16_t iqid) in csio_wr_sge_intr_enable() argument
98 csio_wr_reg32(hw, CIDXINC_V(0) | in csio_wr_sge_intr_enable()
114 csio_wr_fill_fl(struct csio_hw *hw, struct csio_q *flq) in csio_wr_fill_fl() argument
116 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_fill_fl()
126 buf->vaddr = pci_alloc_consistent(hw->pdev, buf->len, in csio_wr_fill_fl()
129 csio_err(hw, "Could only fill %d buffers!\n", n + 1); in csio_wr_fill_fl()
150 csio_wr_update_fl(struct csio_hw *hw, struct csio_q *flq, uint16_t n) in csio_wr_update_fl() argument
185 csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize, in csio_wr_alloc_q() argument
189 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_alloc_q()
197 csio_err(hw, "No more free queues.\n"); in csio_wr_alloc_q()
203 qsz = ALIGN(qsize, CSIO_QCREDIT_SZ) + csio_wr_qstat_pgsz(hw); in csio_wr_alloc_q()
213 csio_err(hw, "Invalid Ingress queue WR size:%d\n", in csio_wr_alloc_q()
226 qsz = ALIGN(qsize/wrsize, 8) * wrsize + csio_wr_qstat_pgsz(hw); in csio_wr_alloc_q()
229 csio_err(hw, "Invalid queue type: 0x%x\n", type); in csio_wr_alloc_q()
235 q->vstart = pci_zalloc_consistent(hw->pdev, qsz, &q->pstart); in csio_wr_alloc_q()
237 csio_err(hw, in csio_wr_alloc_q()
265 flq_idx = csio_wr_alloc_q(hw, nflb * sizeof(__be64), in csio_wr_alloc_q()
269 csio_err(hw, in csio_wr_alloc_q()
283 csio_err(hw, in csio_wr_alloc_q()
294 if (csio_wr_fill_fl(hw, flq)) in csio_wr_alloc_q()
310 csio_q_iqid(hw, ret_idx) = CSIO_MAX_QID; in csio_wr_alloc_q()
313 q->credits = (qsz - csio_wr_qstat_pgsz(hw)) / CSIO_QCREDIT_SZ; in csio_wr_alloc_q()
315 - csio_wr_qstat_pgsz(hw)); in csio_wr_alloc_q()
316 csio_q_eqid(hw, ret_idx) = CSIO_MAX_QID; in csio_wr_alloc_q()
318 q->credits = (qsz - csio_wr_qstat_pgsz(hw)) / sizeof(__be64); in csio_wr_alloc_q()
320 - csio_wr_qstat_pgsz(hw)); in csio_wr_alloc_q()
321 csio_q_flid(hw, ret_idx) = CSIO_MAX_QID; in csio_wr_alloc_q()
336 csio_wr_iq_create_rsp(struct csio_hw *hw, struct csio_mb *mbp, int iq_idx) in csio_wr_iq_create_rsp() argument
345 csio_mb_iq_alloc_write_rsp(hw, mbp, &retval, &iqp); in csio_wr_iq_create_rsp()
348 csio_err(hw, "IQ cmd returned 0x%x!\n", retval); in csio_wr_iq_create_rsp()
349 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_create_rsp()
353 csio_q_iqid(hw, iq_idx) = iqp.iqid; in csio_wr_iq_create_rsp()
354 csio_q_physiqid(hw, iq_idx) = iqp.physiqid; in csio_wr_iq_create_rsp()
355 csio_q_pidx(hw, iq_idx) = csio_q_cidx(hw, iq_idx) = 0; in csio_wr_iq_create_rsp()
356 csio_q_inc_idx(hw, iq_idx) = 0; in csio_wr_iq_create_rsp()
359 iq_id = iqp.iqid - hw->wrm.fw_iq_start; in csio_wr_iq_create_rsp()
363 csio_err(hw, in csio_wr_iq_create_rsp()
366 CSIO_MAX_IQ, iq_id, iqp.iqid, hw->wrm.fw_iq_start); in csio_wr_iq_create_rsp()
367 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_create_rsp()
370 csio_q_set_intr_map(hw, iq_idx, iq_id); in csio_wr_iq_create_rsp()
380 csio_wr_sge_intr_enable(hw, iqp.physiqid); in csio_wr_iq_create_rsp()
382 flq_idx = csio_q_iq_flq_idx(hw, iq_idx); in csio_wr_iq_create_rsp()
384 struct csio_q *flq = hw->wrm.q_arr[flq_idx]; in csio_wr_iq_create_rsp()
386 csio_q_flid(hw, flq_idx) = iqp.fl0id; in csio_wr_iq_create_rsp()
387 csio_q_cidx(hw, flq_idx) = 0; in csio_wr_iq_create_rsp()
388 csio_q_pidx(hw, flq_idx) = csio_q_credits(hw, flq_idx) - 8; in csio_wr_iq_create_rsp()
389 csio_q_inc_idx(hw, flq_idx) = csio_q_credits(hw, flq_idx) - 8; in csio_wr_iq_create_rsp()
392 csio_wr_ring_fldb(hw, flq); in csio_wr_iq_create_rsp()
395 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_create_rsp()
414 csio_wr_iq_create(struct csio_hw *hw, void *priv, int iq_idx, in csio_wr_iq_create() argument
423 csio_q_portid(hw, iq_idx) = portid; in csio_wr_iq_create()
425 mbp = mempool_alloc(hw->mb_mempool, GFP_ATOMIC); in csio_wr_iq_create()
427 csio_err(hw, "IQ command out of memory!\n"); in csio_wr_iq_create()
431 switch (hw->intr_mode) { in csio_wr_iq_create()
435 if (hw->intr_iq_idx == iq_idx) in csio_wr_iq_create()
440 csio_q_physiqid(hw, hw->intr_iq_idx); in csio_wr_iq_create()
447 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_create()
452 iqp.pfn = hw->pfn; in csio_wr_iq_create()
466 switch (csio_q_wr_sz(hw, iq_idx)) { in csio_wr_iq_create()
477 iqp.iqsize = csio_q_size(hw, iq_idx) / in csio_wr_iq_create()
478 csio_q_wr_sz(hw, iq_idx); in csio_wr_iq_create()
479 iqp.iqaddr = csio_q_pstart(hw, iq_idx); in csio_wr_iq_create()
481 flq_idx = csio_q_iq_flq_idx(hw, iq_idx); in csio_wr_iq_create()
483 struct csio_q *flq = hw->wrm.q_arr[flq_idx]; in csio_wr_iq_create()
489 iqp.fl0size = csio_q_size(hw, flq_idx) / CSIO_QCREDIT_SZ; in csio_wr_iq_create()
490 iqp.fl0addr = csio_q_pstart(hw, flq_idx); in csio_wr_iq_create()
493 csio_mb_iq_alloc_write(hw, mbp, priv, CSIO_MB_DEFAULT_TMO, &iqp, cbfn); in csio_wr_iq_create()
495 if (csio_mb_issue(hw, mbp)) { in csio_wr_iq_create()
496 csio_err(hw, "Issue of IQ cmd failed!\n"); in csio_wr_iq_create()
497 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_create()
504 return csio_wr_iq_create_rsp(hw, mbp, iq_idx); in csio_wr_iq_create()
516 csio_wr_eq_cfg_rsp(struct csio_hw *hw, struct csio_mb *mbp, int eq_idx) in csio_wr_eq_cfg_rsp() argument
523 csio_mb_eq_ofld_alloc_write_rsp(hw, mbp, &retval, &eqp); in csio_wr_eq_cfg_rsp()
526 csio_err(hw, "EQ OFLD cmd returned 0x%x!\n", retval); in csio_wr_eq_cfg_rsp()
527 mempool_free(mbp, hw->mb_mempool); in csio_wr_eq_cfg_rsp()
531 csio_q_eqid(hw, eq_idx) = (uint16_t)eqp.eqid; in csio_wr_eq_cfg_rsp()
532 csio_q_physeqid(hw, eq_idx) = (uint16_t)eqp.physeqid; in csio_wr_eq_cfg_rsp()
533 csio_q_pidx(hw, eq_idx) = csio_q_cidx(hw, eq_idx) = 0; in csio_wr_eq_cfg_rsp()
534 csio_q_inc_idx(hw, eq_idx) = 0; in csio_wr_eq_cfg_rsp()
536 mempool_free(mbp, hw->mb_mempool); in csio_wr_eq_cfg_rsp()
553 csio_wr_eq_create(struct csio_hw *hw, void *priv, int eq_idx, in csio_wr_eq_create() argument
562 mbp = mempool_alloc(hw->mb_mempool, GFP_ATOMIC); in csio_wr_eq_create()
564 csio_err(hw, "EQ command out of memory!\n"); in csio_wr_eq_create()
568 eqp.pfn = hw->pfn; in csio_wr_eq_create()
572 eqp.iqid = csio_q_iqid(hw, iq_idx); in csio_wr_eq_create()
577 eqp.eqsize = csio_q_size(hw, eq_idx) / CSIO_QCREDIT_SZ; in csio_wr_eq_create()
578 eqp.eqaddr = csio_q_pstart(hw, eq_idx); in csio_wr_eq_create()
580 csio_mb_eq_ofld_alloc_write(hw, mbp, priv, CSIO_MB_DEFAULT_TMO, in csio_wr_eq_create()
583 if (csio_mb_issue(hw, mbp)) { in csio_wr_eq_create()
584 csio_err(hw, "Issue of EQ OFLD cmd failed!\n"); in csio_wr_eq_create()
585 mempool_free(mbp, hw->mb_mempool); in csio_wr_eq_create()
592 return csio_wr_eq_cfg_rsp(hw, mbp, eq_idx); in csio_wr_eq_create()
604 csio_wr_iq_destroy_rsp(struct csio_hw *hw, struct csio_mb *mbp, int iq_idx) in csio_wr_iq_destroy_rsp() argument
612 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_destroy_rsp()
628 csio_wr_iq_destroy(struct csio_hw *hw, void *priv, int iq_idx, in csio_wr_iq_destroy() argument
638 mbp = mempool_alloc(hw->mb_mempool, GFP_ATOMIC); in csio_wr_iq_destroy()
642 iqp.pfn = hw->pfn; in csio_wr_iq_destroy()
644 iqp.iqid = csio_q_iqid(hw, iq_idx); in csio_wr_iq_destroy()
647 flq_idx = csio_q_iq_flq_idx(hw, iq_idx); in csio_wr_iq_destroy()
649 iqp.fl0id = csio_q_flid(hw, flq_idx); in csio_wr_iq_destroy()
655 csio_mb_iq_free(hw, mbp, priv, CSIO_MB_DEFAULT_TMO, &iqp, cbfn); in csio_wr_iq_destroy()
657 rv = csio_mb_issue(hw, mbp); in csio_wr_iq_destroy()
659 mempool_free(mbp, hw->mb_mempool); in csio_wr_iq_destroy()
666 return csio_wr_iq_destroy_rsp(hw, mbp, iq_idx); in csio_wr_iq_destroy()
678 csio_wr_eq_destroy_rsp(struct csio_hw *hw, struct csio_mb *mbp, int eq_idx) in csio_wr_eq_destroy_rsp() argument
686 mempool_free(mbp, hw->mb_mempool); in csio_wr_eq_destroy_rsp()
702 csio_wr_eq_destroy(struct csio_hw *hw, void *priv, int eq_idx, in csio_wr_eq_destroy() argument
711 mbp = mempool_alloc(hw->mb_mempool, GFP_ATOMIC); in csio_wr_eq_destroy()
715 eqp.pfn = hw->pfn; in csio_wr_eq_destroy()
717 eqp.eqid = csio_q_eqid(hw, eq_idx); in csio_wr_eq_destroy()
719 csio_mb_eq_ofld_free(hw, mbp, priv, CSIO_MB_DEFAULT_TMO, &eqp, cbfn); in csio_wr_eq_destroy()
721 rv = csio_mb_issue(hw, mbp); in csio_wr_eq_destroy()
723 mempool_free(mbp, hw->mb_mempool); in csio_wr_eq_destroy()
730 return csio_wr_eq_destroy_rsp(hw, mbp, eq_idx); in csio_wr_eq_destroy()
741 csio_wr_cleanup_eq_stpg(struct csio_hw *hw, int qidx) in csio_wr_cleanup_eq_stpg() argument
743 struct csio_q *q = csio_hw_to_wrm(hw)->q_arr[qidx]; in csio_wr_cleanup_eq_stpg()
758 csio_wr_cleanup_iq_ftr(struct csio_hw *hw, int qidx) in csio_wr_cleanup_iq_ftr() argument
760 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_cleanup_iq_ftr()
782 csio_wr_destroy_queues(struct csio_hw *hw, bool cmd) in csio_wr_destroy_queues() argument
786 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_destroy_queues()
794 if (csio_q_eqid(hw, i) != CSIO_MAX_QID) { in csio_wr_destroy_queues()
795 csio_wr_cleanup_eq_stpg(hw, i); in csio_wr_destroy_queues()
797 csio_q_eqid(hw, i) = CSIO_MAX_QID; in csio_wr_destroy_queues()
801 rv = csio_wr_eq_destroy(hw, NULL, i, NULL); in csio_wr_destroy_queues()
805 csio_q_eqid(hw, i) = CSIO_MAX_QID; in csio_wr_destroy_queues()
808 if (csio_q_iqid(hw, i) != CSIO_MAX_QID) { in csio_wr_destroy_queues()
809 csio_wr_cleanup_iq_ftr(hw, i); in csio_wr_destroy_queues()
811 csio_q_iqid(hw, i) = CSIO_MAX_QID; in csio_wr_destroy_queues()
812 flq_idx = csio_q_iq_flq_idx(hw, i); in csio_wr_destroy_queues()
814 csio_q_flid(hw, flq_idx) = in csio_wr_destroy_queues()
819 rv = csio_wr_iq_destroy(hw, NULL, i, NULL); in csio_wr_destroy_queues()
823 csio_q_iqid(hw, i) = CSIO_MAX_QID; in csio_wr_destroy_queues()
824 flq_idx = csio_q_iq_flq_idx(hw, i); in csio_wr_destroy_queues()
826 csio_q_flid(hw, flq_idx) = CSIO_MAX_QID; in csio_wr_destroy_queues()
833 hw->flags &= ~CSIO_HWF_Q_FW_ALLOCED; in csio_wr_destroy_queues()
857 csio_wr_get(struct csio_hw *hw, int qidx, uint32_t size, in csio_wr_get() argument
860 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_get()
976 csio_wr_issue(struct csio_hw *hw, int qidx, bool prio) in csio_wr_issue() argument
978 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_issue()
985 csio_wr_reg32(hw, DBPRIO_V(prio) | QID_V(q->un.eq.physeqid) | in csio_wr_issue()
1016 csio_wr_inval_flq_buf(struct csio_hw *hw, struct csio_q *flq) in csio_wr_inval_flq_buf() argument
1036 csio_wr_process_fl(struct csio_hw *hw, struct csio_q *q, in csio_wr_process_fl() argument
1043 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_process_fl()
1049 struct csio_q *flq = hw->wrm.q_arr[q->un.iq.flq_idx]; in csio_wr_process_fl()
1057 csio_wr_inval_flq_buf(hw, flq); in csio_wr_process_fl()
1082 csio_wr_inval_flq_buf(hw, flq); in csio_wr_process_fl()
1087 iq_handler(hw, wr, q->wr_sz - sizeof(struct csio_iqwr_footer), in csio_wr_process_fl()
1093 csio_wr_inval_flq_buf(hw, flq); in csio_wr_process_fl()
1123 csio_wr_process_iq(struct csio_hw *hw, struct csio_q *q, in csio_wr_process_iq() argument
1129 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_process_iq()
1156 iq_handler(hw, wr, q->wr_sz - sizeof(*ftr), NULL, priv); in csio_wr_process_iq()
1159 csio_wr_process_fl(hw, q, wr, in csio_wr_process_iq()
1166 q_completed = hw->wrm.intr_map[qid]; in csio_wr_process_iq()
1169 csio_q_physiqid(hw, hw->intr_iq_idx))) { in csio_wr_process_iq()
1182 q_completed->un.iq.iq_intx_handler(hw, NULL, in csio_wr_process_iq()
1187 csio_warn(hw, "Unknown resp type 0x%x received\n", in csio_wr_process_iq()
1238 csio_wr_update_fl(hw, flq, (flq->credits - 8) - avail); in csio_wr_process_iq()
1239 csio_wr_ring_fldb(hw, flq); in csio_wr_process_iq()
1245 csio_wr_reg32(hw, CIDXINC_V(q->inc_idx) | in csio_wr_process_iq()
1257 csio_wr_process_iq_idx(struct csio_hw *hw, int qidx, in csio_wr_process_iq_idx() argument
1263 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_process_iq_idx()
1266 return csio_wr_process_iq(hw, iq, iq_handler, priv); in csio_wr_process_iq_idx()
1304 csio_wr_fixup_host_params(struct csio_hw *hw) in csio_wr_fixup_host_params() argument
1306 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_fixup_host_params()
1313 csio_wr_reg32(hw, HOSTPAGESIZEPF0_V(s_hps) | HOSTPAGESIZEPF1_V(s_hps) | in csio_wr_fixup_host_params()
1322 csio_set_reg_field(hw, SGE_CONTROL_A, in csio_wr_fixup_host_params()
1329 csio_wr_reg32(hw, PAGE_SIZE, SGE_FL_BUFFER_SIZE0_A); in csio_wr_fixup_host_params()
1335 if (hw->flags & CSIO_HWF_USING_SOFT_PARAMS) { in csio_wr_fixup_host_params()
1336 csio_wr_reg32(hw, in csio_wr_fixup_host_params()
1337 (csio_rd_reg32(hw, SGE_FL_BUFFER_SIZE2_A) + in csio_wr_fixup_host_params()
1340 csio_wr_reg32(hw, in csio_wr_fixup_host_params()
1341 (csio_rd_reg32(hw, SGE_FL_BUFFER_SIZE3_A) + in csio_wr_fixup_host_params()
1346 csio_wr_reg32(hw, HPZ0_V(PAGE_SHIFT - 12), ULP_RX_TDDP_PSZ_A); in csio_wr_fixup_host_params()
1349 csio_set_reg_field(hw, SGE_CONTROL_A, in csio_wr_fixup_host_params()
1353 csio_hw_tp_wr_bits_indirect(hw, TP_INGRESS_CONFIG_A, in csio_wr_fixup_host_params()
1358 csio_init_intr_coalesce_parms(struct csio_hw *hw) in csio_init_intr_coalesce_parms() argument
1360 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_init_intr_coalesce_parms()
1380 csio_wr_get_sge(struct csio_hw *hw) in csio_wr_get_sge() argument
1382 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_get_sge()
1389 sge->sge_control = csio_rd_reg32(hw, SGE_CONTROL_A); in csio_wr_get_sge()
1413 csio_get_flbuf_size(hw, sge, i); in csio_wr_get_sge()
1415 timer_value_0_and_1 = csio_rd_reg32(hw, SGE_TIMER_VALUE_0_AND_1_A); in csio_wr_get_sge()
1416 timer_value_2_and_3 = csio_rd_reg32(hw, SGE_TIMER_VALUE_2_AND_3_A); in csio_wr_get_sge()
1417 timer_value_4_and_5 = csio_rd_reg32(hw, SGE_TIMER_VALUE_4_AND_5_A); in csio_wr_get_sge()
1419 sge->timer_val[0] = (uint16_t)csio_core_ticks_to_us(hw, in csio_wr_get_sge()
1421 sge->timer_val[1] = (uint16_t)csio_core_ticks_to_us(hw, in csio_wr_get_sge()
1423 sge->timer_val[2] = (uint16_t)csio_core_ticks_to_us(hw, in csio_wr_get_sge()
1425 sge->timer_val[3] = (uint16_t)csio_core_ticks_to_us(hw, in csio_wr_get_sge()
1427 sge->timer_val[4] = (uint16_t)csio_core_ticks_to_us(hw, in csio_wr_get_sge()
1429 sge->timer_val[5] = (uint16_t)csio_core_ticks_to_us(hw, in csio_wr_get_sge()
1432 ingress_rx_threshold = csio_rd_reg32(hw, SGE_INGRESS_RX_THRESHOLD_A); in csio_wr_get_sge()
1438 csio_init_intr_coalesce_parms(hw); in csio_wr_get_sge()
1449 csio_wr_set_sge(struct csio_hw *hw) in csio_wr_set_sge() argument
1451 struct csio_wrm *wrm = csio_hw_to_wrm(hw); in csio_wr_set_sge()
1459 csio_set_reg_field(hw, SGE_CONTROL_A, RXPKTCPLMODE_F, RXPKTCPLMODE_F); in csio_wr_set_sge()
1461 sge->sge_control = csio_rd_reg32(hw, SGE_CONTROL_A); in csio_wr_set_sge()
1469 csio_set_reg_field(hw, SGE_DBFIFO_STATUS_A, in csio_wr_set_sge()
1472 csio_set_reg_field(hw, SGE_DBFIFO_STATUS2_A, in csio_wr_set_sge()
1476 csio_set_reg_field(hw, SGE_DOORBELL_CONTROL_A, ENABLE_DROP_F, in csio_wr_set_sge()
1481 CSIO_SET_FLBUF_SIZE(hw, 1, CSIO_SGE_FLBUF_SIZE1); in csio_wr_set_sge()
1482 csio_wr_reg32(hw, (CSIO_SGE_FLBUF_SIZE2 + sge->csio_fl_align - 1) in csio_wr_set_sge()
1484 csio_wr_reg32(hw, (CSIO_SGE_FLBUF_SIZE3 + sge->csio_fl_align - 1) in csio_wr_set_sge()
1486 CSIO_SET_FLBUF_SIZE(hw, 4, CSIO_SGE_FLBUF_SIZE4); in csio_wr_set_sge()
1487 CSIO_SET_FLBUF_SIZE(hw, 5, CSIO_SGE_FLBUF_SIZE5); in csio_wr_set_sge()
1488 CSIO_SET_FLBUF_SIZE(hw, 6, CSIO_SGE_FLBUF_SIZE6); in csio_wr_set_sge()
1489 CSIO_SET_FLBUF_SIZE(hw, 7, CSIO_SGE_FLBUF_SIZE7); in csio_wr_set_sge()
1490 CSIO_SET_FLBUF_SIZE(hw, 8, CSIO_SGE_FLBUF_SIZE8); in csio_wr_set_sge()
1493 csio_get_flbuf_size(hw, sge, i); in csio_wr_set_sge()
1508 csio_wr_reg32(hw, THRESHOLD_0_V(sge->counter_val[0]) | in csio_wr_set_sge()
1514 csio_wr_reg32(hw, in csio_wr_set_sge()
1515 TIMERVALUE0_V(csio_us_to_core_ticks(hw, sge->timer_val[0])) | in csio_wr_set_sge()
1516 TIMERVALUE1_V(csio_us_to_core_ticks(hw, sge->timer_val[1])), in csio_wr_set_sge()
1519 csio_wr_reg32(hw, in csio_wr_set_sge()
1520 TIMERVALUE2_V(csio_us_to_core_ticks(hw, sge->timer_val[2])) | in csio_wr_set_sge()
1521 TIMERVALUE3_V(csio_us_to_core_ticks(hw, sge->timer_val[3])), in csio_wr_set_sge()
1524 csio_wr_reg32(hw, in csio_wr_set_sge()
1525 TIMERVALUE4_V(csio_us_to_core_ticks(hw, sge->timer_val[4])) | in csio_wr_set_sge()
1526 TIMERVALUE5_V(csio_us_to_core_ticks(hw, sge->timer_val[5])), in csio_wr_set_sge()
1529 csio_init_intr_coalesce_parms(hw); in csio_wr_set_sge()
1533 csio_wr_sge_init(struct csio_hw *hw) in csio_wr_sge_init() argument
1551 if (csio_is_hw_master(hw)) { in csio_wr_sge_init()
1552 if (hw->fw_state != CSIO_DEV_STATE_INIT) in csio_wr_sge_init()
1553 csio_wr_fixup_host_params(hw); in csio_wr_sge_init()
1555 if (hw->flags & CSIO_HWF_USING_SOFT_PARAMS) in csio_wr_sge_init()
1556 csio_wr_get_sge(hw); in csio_wr_sge_init()
1558 csio_wr_set_sge(hw); in csio_wr_sge_init()
1560 csio_wr_get_sge(hw); in csio_wr_sge_init()
1571 csio_wrm_init(struct csio_wrm *wrm, struct csio_hw *hw) in csio_wrm_init() argument
1576 csio_err(hw, "Num queues is not set\n"); in csio_wrm_init()
1612 csio_wrm_exit(struct csio_wrm *wrm, struct csio_hw *hw) in csio_wrm_exit() argument
1630 pci_free_consistent(hw->pdev, buf->len, in csio_wrm_exit()
1636 pci_free_consistent(hw->pdev, q->size, in csio_wrm_exit()
1642 hw->flags &= ~CSIO_HWF_Q_MEM_ALLOCED; in csio_wrm_exit()