/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_tx.c | 41 void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw) in mlx5e_send_nop() argument 43 struct mlx5_wq_cyc *wq = &sq->wq; in mlx5e_send_nop() 45 u16 pi = sq->pc & wq->sz_m1; in mlx5e_send_nop() 52 cseg->opmod_idx_opcode = cpu_to_be32((sq->pc << 8) | MLX5_OPCODE_NOP); in mlx5e_send_nop() 53 cseg->qpn_ds = cpu_to_be32((sq->sqn << 8) | 0x01); in mlx5e_send_nop() 55 sq->skb[pi] = NULL; in mlx5e_send_nop() 56 sq->pc++; in mlx5e_send_nop() 60 mlx5e_tx_notify_hw(sq, wqe, 0); in mlx5e_send_nop() 79 static inline void mlx5e_dma_push(struct mlx5e_sq *sq, in mlx5e_dma_push() argument 84 sq->dma_fifo[sq->dma_fifo_pc & sq->dma_fifo_mask].addr = addr; in mlx5e_dma_push() [all …]
|
D | en_main.c | 55 struct mlx5e_sq_param sq; member 164 sq_stats = &priv->channel[i]->sq[j].stats; in mlx5e_update_stats() 479 mlx5e_send_nop(&c->sq[0], true); /* trigger mlx5e_post_rx_wqes() */ in mlx5e_open_rq() 507 static void mlx5e_free_sq_db(struct mlx5e_sq *sq) in mlx5e_free_sq_db() argument 509 kfree(sq->dma_fifo); in mlx5e_free_sq_db() 510 kfree(sq->skb); in mlx5e_free_sq_db() 513 static int mlx5e_alloc_sq_db(struct mlx5e_sq *sq, int numa) in mlx5e_alloc_sq_db() argument 515 int wq_sz = mlx5_wq_cyc_get_size(&sq->wq); in mlx5e_alloc_sq_db() 518 sq->skb = kzalloc_node(wq_sz * sizeof(*sq->skb), GFP_KERNEL, numa); in mlx5e_alloc_sq_db() 519 sq->dma_fifo = kzalloc_node(df_sz * sizeof(*sq->dma_fifo), GFP_KERNEL, in mlx5e_alloc_sq_db() [all …]
|
D | en.h | 394 static inline bool mlx5e_sq_has_room_for(struct mlx5e_sq *sq, u16 n) in mlx5e_sq_has_room_for() argument 396 return (((sq->wq.sz_m1 & (sq->cc - sq->pc)) >= n) || in mlx5e_sq_has_room_for() 397 (sq->cc == sq->pc)); in mlx5e_sq_has_room_for() 407 struct mlx5e_sq sq[MLX5E_MAX_NUM_TC]; member 558 void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw); 592 static inline void mlx5e_tx_notify_hw(struct mlx5e_sq *sq, in mlx5e_tx_notify_hw() argument 595 u16 ofst = MLX5_BF_OFFSET + sq->bf_offset; in mlx5e_tx_notify_hw() 600 *sq->wq.db = cpu_to_be32(sq->pc); in mlx5e_tx_notify_hw() 608 __iowrite64_copy(sq->uar_bf_map + ofst, &wqe->ctrl, bf_sz); in mlx5e_tx_notify_hw() 614 mlx5_write64((__be32 *)&wqe->ctrl, sq->uar_map + ofst, NULL); in mlx5e_tx_notify_hw() [all …]
|
D | en_txrx.c | 62 busy |= mlx5e_poll_tx_cq(&c->sq[i].cq); in mlx5e_napi_poll() 80 mlx5e_cq_arm(&c->sq[i].cq); in mlx5e_napi_poll()
|
/drivers/net/ethernet/cavium/thunder/ |
D | nicvf_queues.c | 351 struct snd_queue *sq, int q_len) in nicvf_init_snd_queue() argument 355 err = nicvf_alloc_q_desc_mem(nic, &sq->dmem, q_len, SND_QUEUE_DESC_SIZE, in nicvf_init_snd_queue() 360 sq->desc = sq->dmem.base; in nicvf_init_snd_queue() 361 sq->skbuff = kcalloc(q_len, sizeof(u64), GFP_KERNEL); in nicvf_init_snd_queue() 362 if (!sq->skbuff) in nicvf_init_snd_queue() 364 sq->head = 0; in nicvf_init_snd_queue() 365 sq->tail = 0; in nicvf_init_snd_queue() 366 atomic_set(&sq->free_cnt, q_len - 1); in nicvf_init_snd_queue() 367 sq->thresh = SND_QUEUE_THRESH; in nicvf_init_snd_queue() 370 sq->tso_hdrs = dma_alloc_coherent(&nic->pdev->dev, in nicvf_init_snd_queue() [all …]
|
D | nicvf_queues.h | 291 struct snd_queue sq[MAX_SND_QUEUES_PER_QS]; member 318 void nicvf_sq_enable(struct nicvf *nic, struct snd_queue *sq, int qidx); 320 void nicvf_put_sq_desc(struct snd_queue *sq, int desc_cnt); 322 struct snd_queue *sq, int qidx);
|
/drivers/infiniband/hw/cxgb4/ |
D | qp.c | 94 static void dealloc_oc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) in dealloc_oc_sq() argument 96 c4iw_ocqp_pool_free(rdev, sq->dma_addr, sq->memsize); in dealloc_oc_sq() 99 static void dealloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) in dealloc_host_sq() argument 101 dma_free_coherent(&(rdev->lldi.pdev->dev), sq->memsize, sq->queue, in dealloc_host_sq() 102 pci_unmap_addr(sq, mapping)); in dealloc_host_sq() 105 static void dealloc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) in dealloc_sq() argument 107 if (t4_sq_onchip(sq)) in dealloc_sq() 108 dealloc_oc_sq(rdev, sq); in dealloc_sq() 110 dealloc_host_sq(rdev, sq); in dealloc_sq() 113 static int alloc_oc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) in alloc_oc_sq() argument [all …]
|
D | cq.c | 194 CQE_QPID_V(wq->sq.qid)); in insert_recv_cqe() 227 CQE_QPID_V(wq->sq.qid)); in insert_sq_cqe() 245 if (wq->sq.flush_cidx == -1) in c4iw_flush_sq() 246 wq->sq.flush_cidx = wq->sq.cidx; in c4iw_flush_sq() 247 idx = wq->sq.flush_cidx; in c4iw_flush_sq() 248 BUG_ON(idx >= wq->sq.size); in c4iw_flush_sq() 249 while (idx != wq->sq.pidx) { in c4iw_flush_sq() 250 swsqe = &wq->sq.sw_sq[idx]; in c4iw_flush_sq() 254 if (wq->sq.oldest_read == swsqe) { in c4iw_flush_sq() 259 if (++idx == wq->sq.size) in c4iw_flush_sq() [all …]
|
D | t4.h | 337 struct t4_sq sq; member 392 static inline int t4_sq_onchip(struct t4_sq *sq) in t4_sq_onchip() argument 394 return sq->flags & T4_SQ_ONCHIP; in t4_sq_onchip() 399 return wq->sq.in_use == 0; in t4_sq_empty() 404 return wq->sq.in_use == (wq->sq.size - 1); in t4_sq_full() 409 return wq->sq.size - 1 - wq->sq.in_use; in t4_sq_avail() 414 wq->sq.in_use++; in t4_sq_produce() 415 if (++wq->sq.pidx == wq->sq.size) in t4_sq_produce() 416 wq->sq.pidx = 0; in t4_sq_produce() 417 wq->sq.wq_pidx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); in t4_sq_produce() [all …]
|
D | device.c | 132 le.qid = wq->sq.qid; in c4iw_log_wr_stats() 134 le.post_host_ts = wq->sq.sw_sq[wq->sq.cidx].host_ts; in c4iw_log_wr_stats() 135 le.post_sge_ts = wq->sq.sw_sq[wq->sq.cidx].sge_ts; in c4iw_log_wr_stats() 235 if (id != qp->wq.sq.qid) in dump_qp() 257 qp->wq.sq.qid, qp->wq.rq.qid, in dump_qp() 259 qp->wq.sq.flags & T4_SQ_ONCHIP, in dump_qp() 281 qp->wq.sq.qid, qp->wq.rq.qid, in dump_qp() 283 qp->wq.sq.flags & T4_SQ_ONCHIP, in dump_qp() 295 qp->wq.sq.qid, qp->wq.rq.qid, in dump_qp() 297 qp->wq.sq.flags & T4_SQ_ONCHIP); in dump_qp() [all …]
|
/drivers/infiniband/hw/mthca/ |
D | mthca_qp.c | 220 (n << qp->sq.wqe_shift); in get_send_wqe() 223 (n << qp->sq.wqe_shift)) >> in get_send_wqe() 225 ((qp->send_wqe_offset + (n << qp->sq.wqe_shift)) & in get_send_wqe() 498 qp_attr->cap.max_send_wr = qp->sq.max; in mthca_query_qp() 500 qp_attr->cap.max_send_sge = qp->sq.max_gs; in mthca_query_qp() 602 if (qp->sq.max) in __mthca_modify_qp() 603 qp_context->sq_size_stride = ilog2(qp->sq.max) << 3; in __mthca_modify_qp() 604 qp_context->sq_size_stride |= qp->sq.wqe_shift - 4; in __mthca_modify_qp() 723 qp_context->snd_db_index = cpu_to_be32(qp->sq.db_index); in __mthca_modify_qp() 824 mthca_wq_reset(&qp->sq); in __mthca_modify_qp() [all …]
|
/drivers/infiniband/hw/mlx5/ |
D | qp.c | 96 return get_wqe(qp, qp->sq.offset + (n << MLX5_IB_SQ_STRIDE)); in mlx5_get_send_wqe() 121 struct mlx5_ib_wq *wq = send ? &qp->sq : &qp->rq; in mlx5_ib_read_user_wqe() 360 qp->sq.wqe_cnt = wq_size / MLX5_SEND_WQE_BB; in calc_sq_size() 361 if (qp->sq.wqe_cnt > (1 << MLX5_CAP_GEN(dev->mdev, log_max_qp_sz))) { in calc_sq_size() 363 qp->sq.wqe_cnt, in calc_sq_size() 367 qp->sq.wqe_shift = ilog2(MLX5_SEND_WQE_BB); in calc_sq_size() 368 qp->sq.max_gs = attr->cap.max_send_sge; in calc_sq_size() 369 qp->sq.max_post = wq_size / wqe_size; in calc_sq_size() 370 attr->cap.max_send_wr = qp->sq.max_post; in calc_sq_size() 379 int desc_sz = 1 << qp->sq.wqe_shift; in set_user_buf_size() [all …]
|
/drivers/net/ |
D | virtio_net.c | 112 struct send_queue *sq; member 842 static void free_old_xmit_skbs(struct send_queue *sq) in free_old_xmit_skbs() argument 846 struct virtnet_info *vi = sq->vq->vdev->priv; in free_old_xmit_skbs() 849 while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { in free_old_xmit_skbs() 861 static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) in xmit_skb() argument 865 struct virtnet_info *vi = sq->vq->vdev->priv; in xmit_skb() 915 sg_init_table(sq->sg, skb_shinfo(skb)->nr_frags + (can_push ? 1 : 2)); in xmit_skb() 918 num_sg = skb_to_sgvec(skb, sq->sg, 0, skb->len); in xmit_skb() 924 sg_set_buf(sq->sg, hdr, hdr_len); in xmit_skb() 925 num_sg = skb_to_sgvec(skb, sq->sg + 1, 0, skb->len); in xmit_skb() [all …]
|
/drivers/infiniband/hw/mlx4/ |
D | qp.c | 196 return get_wqe(qp, qp->sq.offset + (n << qp->sq.wqe_shift)); in get_send_wqe() 219 s = roundup(size, 1U << qp->sq.wqe_shift); in stamp_send_wqe() 221 ind = (i >> qp->sq.wqe_shift) + n; in stamp_send_wqe() 222 stamp = ind & qp->sq.wqe_cnt ? cpu_to_be32(0x7fffffff) : in stamp_send_wqe() 224 buf = get_send_wqe(qp, ind & (qp->sq.wqe_cnt - 1)); in stamp_send_wqe() 225 wqe = buf + (i & ((1 << qp->sq.wqe_shift) - 1)); in stamp_send_wqe() 229 ctrl = buf = get_send_wqe(qp, n & (qp->sq.wqe_cnt - 1)); in stamp_send_wqe() 245 ctrl = wqe = get_send_wqe(qp, n & (qp->sq.wqe_cnt - 1)); in post_nop_wqe() 270 (n & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0); in post_nop_wqe() 278 unsigned s = qp->sq.wqe_cnt - (ind & (qp->sq.wqe_cnt - 1)); in pad_wraparound() [all …]
|
/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/ |
D | trx.c | 150 u8 sq; in _rtl8723e_query_rxphystatus() local 153 sq = 100; in _rtl8723e_query_rxphystatus() 155 sq = cck_buf->sq_rpt; in _rtl8723e_query_rxphystatus() 156 if (sq > 64) in _rtl8723e_query_rxphystatus() 157 sq = 0; in _rtl8723e_query_rxphystatus() 158 else if (sq < 20) in _rtl8723e_query_rxphystatus() 159 sq = 100; in _rtl8723e_query_rxphystatus() 161 sq = ((64 - sq) * 100) / 44; in _rtl8723e_query_rxphystatus() 164 pstatus->signalquality = sq; in _rtl8723e_query_rxphystatus() 165 pstatus->rx_mimo_signalquality[0] = sq; in _rtl8723e_query_rxphystatus()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192se/ |
D | trx.c | 153 u8 sq; in _rtl92se_query_rxphystatus() local 155 sq = 100; in _rtl92se_query_rxphystatus() 157 sq = cck_buf->sq_rpt; in _rtl92se_query_rxphystatus() 158 if (sq > 64) in _rtl92se_query_rxphystatus() 159 sq = 0; in _rtl92se_query_rxphystatus() 160 else if (sq < 20) in _rtl92se_query_rxphystatus() 161 sq = 100; in _rtl92se_query_rxphystatus() 163 sq = ((64 - sq) * 100) / 44; in _rtl92se_query_rxphystatus() 166 pstats->signalquality = sq; in _rtl92se_query_rxphystatus() 167 pstats->rx_mimo_sig_qual[0] = sq; in _rtl92se_query_rxphystatus()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/ |
D | trx.c | 210 u8 sq; in _rtl92ce_query_rxphystatus() local 212 sq = 100; in _rtl92ce_query_rxphystatus() 214 sq = cck_buf->sq_rpt; in _rtl92ce_query_rxphystatus() 215 if (sq > 64) in _rtl92ce_query_rxphystatus() 216 sq = 0; in _rtl92ce_query_rxphystatus() 217 else if (sq < 20) in _rtl92ce_query_rxphystatus() 218 sq = 100; in _rtl92ce_query_rxphystatus() 220 sq = ((64 - sq) * 100) / 44; in _rtl92ce_query_rxphystatus() 223 pstats->signalquality = sq; in _rtl92ce_query_rxphystatus() 224 pstats->rx_mimo_sig_qual[0] = sq; in _rtl92ce_query_rxphystatus()
|
/drivers/staging/vt6656/ |
D | dpc.c | 52 u8 *rx_sts, *rx_rate, *sq, *sq_3; in vnt_rx_data() local 130 sq = sq_3; in vnt_rx_data() 132 sq = skb_data + 8 + pay_load_with_padding + 8; in vnt_rx_data() 133 sq_3 = sq; in vnt_rx_data()
|
/drivers/net/wireless/realtek/rtl818x/rtl8180/ |
D | sa2400.c | 91 static u8 sa2400_rf_calc_rssi(u8 agc, u8 sq) in sa2400_rf_calc_rssi() argument 93 if (sq == 0x80) in sa2400_rf_calc_rssi() 96 if (sq > 78) in sa2400_rf_calc_rssi() 100 return 65 * sa2400_rf_rssi_map[sq] / 100; in sa2400_rf_calc_rssi()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/ |
D | trx.c | 169 u8 sq; in _rtl88ee_query_rxphystatus() local 172 sq = 100; in _rtl88ee_query_rxphystatus() 174 sq = cck_buf->sq_rpt; in _rtl88ee_query_rxphystatus() 175 if (sq > 64) in _rtl88ee_query_rxphystatus() 176 sq = 0; in _rtl88ee_query_rxphystatus() 177 else if (sq < 20) in _rtl88ee_query_rxphystatus() 178 sq = 100; in _rtl88ee_query_rxphystatus() 180 sq = ((64 - sq) * 100) / 44; in _rtl88ee_query_rxphystatus() 183 pstatus->signalquality = sq; in _rtl88ee_query_rxphystatus() 184 pstatus->rx_mimo_signalquality[0] = sq; in _rtl88ee_query_rxphystatus()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/ |
D | mac.c | 727 u8 sq; in _rtl92c_query_rxphystatus() local 729 sq = 100; in _rtl92c_query_rxphystatus() 731 sq = cck_buf->sq_rpt; in _rtl92c_query_rxphystatus() 732 if (sq > 64) in _rtl92c_query_rxphystatus() 733 sq = 0; in _rtl92c_query_rxphystatus() 734 else if (sq < 20) in _rtl92c_query_rxphystatus() 735 sq = 100; in _rtl92c_query_rxphystatus() 737 sq = ((64 - sq) * 100) / 44; in _rtl92c_query_rxphystatus() 739 pstats->signalquality = sq; in _rtl92c_query_rxphystatus() 740 pstats->RX_SIGQ[0] = sq; in _rtl92c_query_rxphystatus()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192de/ |
D | trx.c | 202 u8 sq; in _rtl92de_query_rxphystatus() local 204 sq = 100; in _rtl92de_query_rxphystatus() 206 sq = cck_buf->sq_rpt; in _rtl92de_query_rxphystatus() 207 if (sq > 64) in _rtl92de_query_rxphystatus() 208 sq = 0; in _rtl92de_query_rxphystatus() 209 else if (sq < 20) in _rtl92de_query_rxphystatus() 210 sq = 100; in _rtl92de_query_rxphystatus() 212 sq = ((64 - sq) * 100) / 44; in _rtl92de_query_rxphystatus() 214 pstats->signalquality = sq; in _rtl92de_query_rxphystatus() 215 pstats->rx_mimo_sig_qual[0] = sq; in _rtl92de_query_rxphystatus()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/ |
D | trx.c | 200 u8 sq; in query_rxphystatus() local 203 sq = 100; in query_rxphystatus() 205 sq = p_phystrpt->pwdb_all; in query_rxphystatus() 206 if (sq > 64) in query_rxphystatus() 207 sq = 0; in query_rxphystatus() 208 else if (sq < 20) in query_rxphystatus() 209 sq = 100; in query_rxphystatus() 211 sq = ((64 - sq) * 100) / 44; in query_rxphystatus() 214 pstatus->signalquality = sq; in query_rxphystatus() 215 pstatus->rx_mimo_signalquality[0] = sq; in query_rxphystatus()
|
/drivers/infiniband/hw/ocrdma/ |
D | ocrdma_hw.c | 137 return dev->mq.sq.va + (dev->mq.sq.head * sizeof(struct ocrdma_mqe)); in ocrdma_get_mqe() 142 dev->mq.sq.head = (dev->mq.sq.head + 1) & (OCRDMA_MQ_LEN - 1); in ocrdma_mq_inc_head() 147 return dev->mq.sq.va + (dev->mqe_ctx.tag * sizeof(struct ocrdma_mqe)); in ocrdma_get_mqe_rsp() 321 val |= dev->mq.sq.id & OCRDMA_MQ_ID_MASK; in ocrdma_ring_mq_db() 621 status = ocrdma_alloc_q(dev, &dev->mq.sq, OCRDMA_MQ_LEN, in ocrdma_create_mq() 625 status = ocrdma_mbx_create_mq(dev, &dev->mq.sq, &dev->mq.cq); in ocrdma_create_mq() 632 ocrdma_free_q(dev, &dev->mq.sq); in ocrdma_create_mq() 647 mbxq = &dev->mq.sq; in ocrdma_destroy_mq() 900 struct ocrdma_cq *cq, bool sq) in _ocrdma_qp_buddy_cq_handler() argument 905 struct list_head *head = sq?(&cq->sq_head):(&cq->rq_head); in _ocrdma_qp_buddy_cq_handler() [all …]
|
/drivers/net/wireless/hostap/ |
D | hostap_main.c | 1008 struct hfa384x_comms_quality sq; in prism2_update_comms_qual() local 1017 &sq, sizeof(sq), 1) >= 0) { in prism2_update_comms_qual() 1018 local->comms_qual = (s16) le16_to_cpu(sq.comm_qual); in prism2_update_comms_qual() 1019 local->avg_signal = (s16) le16_to_cpu(sq.signal_level); in prism2_update_comms_qual() 1020 local->avg_noise = (s16) le16_to_cpu(sq.noise_level); in prism2_update_comms_qual() 1026 &sq, sizeof(sq), 1) >= 0) { in prism2_update_comms_qual() 1027 local->comms_qual = le16_to_cpu(sq.comm_qual); in prism2_update_comms_qual() 1029 le16_to_cpu(sq.signal_level)); in prism2_update_comms_qual() 1031 le16_to_cpu(sq.noise_level)); in prism2_update_comms_qual()
|