Home
last modified time | relevance | path

Searched refs:hwq (Results 1 – 25 of 35) sorted by relevance

12

/linux-6.12.1/drivers/ufs/core/
Dufs-mcq.c234 struct ufs_hw_queue *hwq; in ufshcd_mcq_memory_alloc() local
239 hwq = &hba->uhq[i]; in ufshcd_mcq_memory_alloc()
242 hwq->max_entries; in ufshcd_mcq_memory_alloc()
243 hwq->sqe_base_addr = dmam_alloc_coherent(hba->dev, utrdl_size, in ufshcd_mcq_memory_alloc()
244 &hwq->sqe_dma_addr, in ufshcd_mcq_memory_alloc()
246 if (!hwq->sqe_dma_addr) { in ufshcd_mcq_memory_alloc()
251 cqe_size = sizeof(struct cq_entry) * hwq->max_entries; in ufshcd_mcq_memory_alloc()
252 hwq->cqe_base_addr = dmam_alloc_coherent(hba->dev, cqe_size, in ufshcd_mcq_memory_alloc()
253 &hwq->cqe_dma_addr, in ufshcd_mcq_memory_alloc()
255 if (!hwq->cqe_dma_addr) { in ufshcd_mcq_memory_alloc()
[all …]
Dufshcd.c476 struct ufs_hw_queue *hwq = ufshcd_mcq_req_to_hwq(hba, rq); in ufshcd_add_command_trace() local
478 hwq_id = hwq->id; in ufshcd_add_command_trace()
2303 struct ufs_hw_queue *hwq) in ufshcd_send_command() argument
2323 spin_lock(&hwq->sq_lock); in ufshcd_send_command()
2324 dest = hwq->sqe_base_addr + hwq->sq_tail_slot; in ufshcd_send_command()
2326 ufshcd_inc_sq_tail(hwq); in ufshcd_send_command()
2327 spin_unlock(&hwq->sq_lock); in ufshcd_send_command()
2963 struct ufs_hw_queue *hwq = NULL; in ufshcd_queuecommand() local
3031 hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd)); in ufshcd_queuecommand()
3033 ufshcd_send_command(hba, tag, hwq); in ufshcd_queuecommand()
[all …]
Dufshcd-priv.h73 struct ufs_hw_queue *hwq);
/linux-6.12.1/drivers/scsi/cxlflash/
Dmain.c164 struct hwq *hwq = get_hwq(afu, cmd->hwq_index); in cmd_complete() local
166 spin_lock_irqsave(&hwq->hsq_slock, lock_flags); in cmd_complete()
168 spin_unlock_irqrestore(&hwq->hsq_slock, lock_flags); in cmd_complete()
196 static void flush_pending_cmds(struct hwq *hwq) in flush_pending_cmds() argument
198 struct cxlflash_cfg *cfg = hwq->afu->parent; in flush_pending_cmds()
203 list_for_each_entry_safe(cmd, tmp, &hwq->pending_cmds, list) { in flush_pending_cmds()
240 static int context_reset(struct hwq *hwq, __be64 __iomem *reset_reg) in context_reset() argument
242 struct cxlflash_cfg *cfg = hwq->afu->parent; in context_reset()
249 dev_dbg(dev, "%s: hwq=%p\n", __func__, hwq); in context_reset()
251 spin_lock_irqsave(&hwq->hsq_slock, lock_flags); in context_reset()
[all …]
Dcommon.h196 struct hwq { struct
231 struct hwq hwqs[CXLFLASH_MAX_HWQS]; argument
233 int (*context_reset)(struct hwq *hwq);
255 static inline struct hwq *get_hwq(struct afu *afu, u32 index) in get_hwq()
Dsuperpipe.c267 struct hwq *hwq = get_hwq(afu, PRIMARY_HWQ); in afu_attach() local
291 val = hwq->ctx_hndl; in afu_attach()
298 val = SISL_RHT_CNT_ID((u64)MAX_RHT_PER_CONTEXT, (u64)(hwq->ctx_hndl)); in afu_attach()
1658 struct hwq *hwq = get_hwq(afu, PRIMARY_HWQ); in cxlflash_afu_recover() local
1735 reg = readq_be(&hwq->ctrl_map->mbox_r); in cxlflash_afu_recover()
/linux-6.12.1/drivers/infiniband/hw/bnxt_re/
Dqplib_fp.c80 dev_dbg(&scq->hwq.pdev->dev, in __bnxt_qplib_add_flush_qp()
88 dev_dbg(&rcq->hwq.pdev->dev, in __bnxt_qplib_add_flush_qp()
147 qp->sq.hwq.prod = 0; in bnxt_qplib_clean_qp()
148 qp->sq.hwq.cons = 0; in bnxt_qplib_clean_qp()
150 qp->rq.hwq.prod = 0; in bnxt_qplib_clean_qp()
151 qp->rq.hwq.cons = 0; in bnxt_qplib_clean_qp()
241 struct bnxt_qplib_hwq *hwq = &nq->hwq; in clean_nq() local
247 spin_lock_bh(&hwq->lock); in clean_nq()
250 nq_ptr = (struct nq_base **)hwq->pbl_ptr; in clean_nq()
251 nqe = &nq_ptr[NQE_PG(hwq->cons)][NQE_IDX(hwq->cons)]; in clean_nq()
[all …]
Dqplib_res.h96 #define HWQ_CMP(idx, hwq) ((idx) & ((hwq)->max_elements - 1)) argument
98 #define HWQ_FREE_SLOTS(hwq) (hwq->max_elements - \ argument
99 ((HWQ_CMP(hwq->prod, hwq)\
100 - HWQ_CMP(hwq->cons, hwq))\
101 & (hwq->max_elements - 1)))
199 struct bnxt_qplib_hwq *hwq; member
349 static inline u8 bnxt_qplib_base_pg_size(struct bnxt_qplib_hwq *hwq) in bnxt_qplib_base_pg_size() argument
354 pbl = &hwq->pbl[PBL_LVL_0]; in bnxt_qplib_base_pg_size()
381 static inline void *bnxt_qplib_get_qe(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_get_qe() argument
386 pg_num = (indx / hwq->qe_ppg); in bnxt_qplib_get_qe()
[all …]
Dqplib_res.c157 struct bnxt_qplib_hwq *hwq) in bnxt_qplib_free_hwq() argument
161 if (!hwq->max_elements) in bnxt_qplib_free_hwq()
163 if (hwq->level >= PBL_LVL_MAX) in bnxt_qplib_free_hwq()
166 for (i = 0; i < hwq->level + 1; i++) { in bnxt_qplib_free_hwq()
167 if (i == hwq->level) in bnxt_qplib_free_hwq()
168 __free_pbl(res, &hwq->pbl[i], hwq->is_user); in bnxt_qplib_free_hwq()
170 __free_pbl(res, &hwq->pbl[i], false); in bnxt_qplib_free_hwq()
173 hwq->level = PBL_LVL_MAX; in bnxt_qplib_free_hwq()
174 hwq->max_elements = 0; in bnxt_qplib_free_hwq()
175 hwq->element_size = 0; in bnxt_qplib_free_hwq()
[all …]
Dqplib_rcfw.c239 struct bnxt_qplib_hwq *hwq = &cmdq->hwq; in __send_message_no_waiter() local
264 sw_prod = HWQ_CMP(hwq->prod, hwq); in __send_message_no_waiter()
265 cmdqe = bnxt_qplib_get_qe(hwq, sw_prod, NULL); in __send_message_no_waiter()
271 hwq->prod++; in __send_message_no_waiter()
275 cmdq_prod = hwq->prod; in __send_message_no_waiter()
290 struct bnxt_qplib_hwq *hwq; in __send_message() local
297 hwq = &cmdq->hwq; in __send_message()
303 spin_lock_bh(&hwq->lock); in __send_message()
305 free_slots = HWQ_FREE_SLOTS(hwq); in __send_message()
313 spin_unlock_bh(&hwq->lock); in __send_message()
[all …]
Dqplib_fp.h101 struct bnxt_qplib_hwq hwq; member
250 struct bnxt_qplib_hwq hwq; member
360 static inline u32 __bnxt_qplib_get_avail(struct bnxt_qplib_hwq *hwq) in __bnxt_qplib_get_avail() argument
364 cons = hwq->cons; in __bnxt_qplib_get_avail()
365 prod = hwq->prod; in __bnxt_qplib_get_avail()
368 avail += hwq->depth; in __bnxt_qplib_get_avail()
375 struct bnxt_qplib_hwq *hwq; in bnxt_qplib_queue_full() local
378 hwq = &que->hwq; in bnxt_qplib_queue_full()
380 avail = hwq->cons - hwq->prod; in bnxt_qplib_queue_full()
381 if (hwq->cons <= hwq->prod) in bnxt_qplib_queue_full()
[all …]
Dqplib_sp.c534 if (mrw->hwq.max_elements) in bnxt_qplib_free_mrw()
535 bnxt_qplib_free_hwq(res, &mrw->hwq); in bnxt_qplib_free_mrw()
599 if (mrw->hwq.max_elements) { in bnxt_qplib_dereg_mrw()
602 bnxt_qplib_free_hwq(res, &mrw->hwq); in bnxt_qplib_dereg_mrw()
627 if (mr->hwq.max_elements) in bnxt_qplib_reg_mr()
628 bnxt_qplib_free_hwq(res, &mr->hwq); in bnxt_qplib_reg_mr()
638 rc = bnxt_qplib_alloc_init_hwq(&mr->hwq, &hwq_attr); in bnxt_qplib_reg_mr()
651 if (mr->hwq.level == PBL_LVL_MAX) { in bnxt_qplib_reg_mr()
657 level = mr->hwq.level; in bnxt_qplib_reg_mr()
658 req.pbl = cpu_to_le64(mr->hwq.pbl[PBL_LVL_0].pg_map_arr[0]); in bnxt_qplib_reg_mr()
[all …]
Dqplib_rcfw.h188 struct bnxt_qplib_hwq hwq; member
207 struct bnxt_qplib_hwq hwq; member
Dqplib_sp.h123 struct bnxt_qplib_hwq hwq; member
128 struct bnxt_qplib_hwq hwq; member
Dmain.c1369 nq->hwq.max_elements = BNXT_QPLIB_NQE_MAX_CNT; in bnxt_re_alloc_res()
1377 rattr.dma_arr = nq->hwq.pbl[PBL_LVL_0].pg_map_arr; in bnxt_re_alloc_res()
1378 rattr.pages = nq->hwq.pbl[rdev->nq[i].hwq.level].pg_count; in bnxt_re_alloc_res()
1699 rattr.dma_arr = creq->hwq.pbl[PBL_LVL_0].pg_map_arr; in bnxt_re_dev_init()
1700 rattr.pages = creq->hwq.pbl[creq->hwq.level].pg_count; in bnxt_re_dev_init()
/linux-6.12.1/drivers/scsi/fnic/
Dfnic_scsi.c118 static int free_wq_copy_descs(struct fnic *fnic, struct vnic_wq_copy *wq, unsigned int hwq) in free_wq_copy_descs() argument
121 if (!fnic->fw_ack_recd[hwq]) in free_wq_copy_descs()
128 if (wq->to_clean_index <= fnic->fw_ack_index[hwq]) in free_wq_copy_descs()
129 wq->ring.desc_avail += (fnic->fw_ack_index[hwq] in free_wq_copy_descs()
134 + fnic->fw_ack_index[hwq] + 1); in free_wq_copy_descs()
142 (fnic->fw_ack_index[hwq] + 1) % wq->ring.desc_count; in free_wq_copy_descs()
145 fnic->fw_ack_recd[hwq] = 0; in free_wq_copy_descs()
294 uint16_t hwq) in fnic_queue_wq_copy_desc() argument
341 if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[hwq]) in fnic_queue_wq_copy_desc()
342 free_wq_copy_descs(fnic, wq, hwq); in fnic_queue_wq_copy_desc()
[all …]
Dfnic_main.c617 int hwq; in fnic_probe() local
775 for (hwq = 0; hwq < fnic->wq_copy_count; hwq++) { in fnic_probe()
776 fnic->sw_copy_wq[hwq].ioreq_table_size = fnic->fnic_max_tag_id; in fnic_probe()
777 fnic->sw_copy_wq[hwq].io_req_table = in fnic_probe()
778 kzalloc((fnic->sw_copy_wq[hwq].ioreq_table_size + 1) * in fnic_probe()
984 for (hwq = 0; hwq < fnic->wq_copy_count; hwq++) in fnic_probe()
985 kfree(fnic->sw_copy_wq[hwq].io_req_table); in fnic_probe()
1014 int hwq; in fnic_remove() local
1075 for (hwq = 0; hwq < fnic->wq_copy_count; hwq++) in fnic_remove()
1076 kfree(fnic->sw_copy_wq[hwq].io_req_table); in fnic_remove()
/linux-6.12.1/include/scsi/
Dscsi_tcq.h26 u16 hwq; in scsi_host_find_tag() local
31 hwq = blk_mq_unique_tag_to_hwq(tag); in scsi_host_find_tag()
32 if (hwq < shost->tag_set.nr_hw_queues) { in scsi_host_find_tag()
33 req = blk_mq_tag_to_rq(shost->tag_set.tags[hwq], in scsi_host_find_tag()
/linux-6.12.1/drivers/net/wireless/mediatek/mt76/mt7603/
Ddma.c32 u8 qid, tid = 0, hwq = 0; in mt7603_rx_loopback_skb() local
56 hwq = wmm_queue_map[IEEE80211_AC_BE]; in mt7603_rx_loopback_skb()
61 hwq = wmm_queue_map[qid]; in mt7603_rx_loopback_skb()
65 hwq = wmm_queue_map[IEEE80211_AC_BE]; in mt7603_rx_loopback_skb()
72 hwq = MT_TX_HW_QUEUE_MGMT; in mt7603_rx_loopback_skb()
79 val |= FIELD_PREP(MT_TXD0_Q_IDX, hwq); in mt7603_rx_loopback_skb()
/linux-6.12.1/drivers/net/wireless/ti/wlcore/
Dtx.c1196 int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); in wlcore_stop_queue_locked() local
1197 bool stopped = !!wl->queue_stop_reasons[hwq]; in wlcore_stop_queue_locked()
1200 WARN_ON_ONCE(test_and_set_bit(reason, &wl->queue_stop_reasons[hwq])); in wlcore_stop_queue_locked()
1205 ieee80211_stop_queue(wl->hw, hwq); in wlcore_stop_queue_locked()
1222 int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); in wlcore_wake_queue() local
1227 WARN_ON_ONCE(!test_and_clear_bit(reason, &wl->queue_stop_reasons[hwq])); in wlcore_wake_queue()
1229 if (wl->queue_stop_reasons[hwq]) in wlcore_wake_queue()
1232 ieee80211_wake_queue(wl->hw, hwq); in wlcore_wake_queue()
1299 int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); in wlcore_is_queue_stopped_by_reason_locked() local
1302 return test_bit(reason, &wl->queue_stop_reasons[hwq]); in wlcore_is_queue_stopped_by_reason_locked()
[all …]
/linux-6.12.1/drivers/net/wireless/mediatek/mt76/
Dtx.c413 struct mt76_queue *hwq = phy->q_tx[MT_TXQ_PSD]; in mt76_release_buffered_frames() local
416 spin_lock_bh(&hwq->lock); in mt76_release_buffered_frames()
440 dev->queue_ops->kick(dev, hwq); in mt76_release_buffered_frames()
445 spin_unlock_bh(&hwq->lock); in mt76_release_buffered_frames()
730 struct mt76_queue *hwq; in mt76_stop_tx_queues() local
736 hwq = phy->q_tx[mt76_txq_get_qid(txq)]; in mt76_stop_tx_queues()
739 spin_lock_bh(&hwq->lock); in mt76_stop_tx_queues()
741 spin_unlock_bh(&hwq->lock); in mt76_stop_tx_queues()
Dmac80211.c1793 struct mt76_queue *hwq; in mt76_init_queue() local
1796 hwq = devm_kzalloc(dev->dev, sizeof(*hwq), GFP_KERNEL); in mt76_init_queue()
1797 if (!hwq) in mt76_init_queue()
1800 hwq->flags = flags; in mt76_init_queue()
1801 hwq->wed = wed; in mt76_init_queue()
1803 err = dev->queue_ops->alloc(dev, hwq, idx, n_desc, 0, ring_base); in mt76_init_queue()
1807 return hwq; in mt76_init_queue()
/linux-6.12.1/drivers/scsi/
Dvirtio_scsi.c560 u16 hwq = blk_mq_unique_tag_to_hwq(tag); in virtscsi_pick_vq_mq() local
562 return &vscsi->req_vqs[hwq]; in virtscsi_pick_vq_mq()
774 static void virtscsi_commit_rqs(struct Scsi_Host *shost, u16 hwq) in virtscsi_commit_rqs() argument
778 virtscsi_kick_vq(&vscsi->req_vqs[hwq]); in virtscsi_commit_rqs()
/linux-6.12.1/drivers/net/wireless/intel/iwlegacy/
Dcommon.h2258 il_set_swq_id(struct il_tx_queue *txq, u8 ac, u8 hwq) in il_set_swq_id() argument
2261 BUG_ON(hwq > 31); /* only use 5 bits */ in il_set_swq_id()
2263 txq->swq_id = (hwq << 2) | ac; in il_set_swq_id()
2284 u8 hwq = (queue >> 2) & 0x1f; in il_wake_queue() local
2286 if (test_and_clear_bit(hwq, il->queue_stopped)) in il_wake_queue()
2295 u8 hwq = (queue >> 2) & 0x1f; in il_stop_queue() local
2297 if (!test_and_set_bit(hwq, il->queue_stopped)) in il_stop_queue()
/linux-6.12.1/drivers/ufs/host/
Dufs-mediatek.c1710 struct ufs_hw_queue *hwq; in ufs_mtk_mcq_intr() local
1714 hwq = &hba->uhq[qid]; in ufs_mtk_mcq_intr()
1721 ufshcd_mcq_poll_cqe_lock(hba, hwq); in ufs_mtk_mcq_intr()

12