Lines Matching refs:tag

36 static inline u8 *get_desc(struct cqhci_host *cq_host, u8 tag)
38 return cq_host->desc_base + (tag * cq_host->slot_sz);
41 static inline u8 *get_link_desc(struct cqhci_host *cq_host, u8 tag)
43 u8 *desc = get_desc(cq_host, tag);
48 static inline size_t get_trans_desc_offset(struct cqhci_host *cq_host, u8 tag)
50 return cq_host->trans_desc_len * cq_host->mmc->max_segs * tag;
53 static inline dma_addr_t get_trans_desc_dma(struct cqhci_host *cq_host, u8 tag)
55 size_t offset = get_trans_desc_offset(cq_host, tag);
60 static inline u8 *get_trans_desc(struct cqhci_host *cq_host, u8 tag)
62 size_t offset = get_trans_desc_offset(cq_host, tag);
67 static void setup_trans_desc(struct cqhci_host *cq_host, u8 tag)
72 link_temp = get_link_desc(cq_host, tag);
73 trans_temp = get_trans_desc_dma(cq_host, tag);
79 if (tag == DCMD_SLOT && (cq_host->mmc->caps2 & MMC_CAP2_CQE_DCMD)) {
423 struct cqhci_host *cq_host, int tag)
425 __le64 *task_desc = (__le64 __force *)get_desc(cq_host, tag);
449 pr_debug("%s: cqhci: tag %d task descriptor 0x%016llx%016llx\n",
450 mmc_hostname(mrq->host), mrq->tag, desc1, desc0);
452 pr_debug("%s: cqhci: tag %d task descriptor 0x%016llx\n",
453 mmc_hostname(mrq->host), mrq->tag, desc0);
500 struct cqhci_host *cq_host, int tag)
517 desc = get_trans_desc(cq_host, tag);
589 return mrq->cmd ? DCMD_SLOT : mrq->tag;
595 int tag = cqhci_tag(mrq);
624 cqhci_prep_task_desc(mrq, cq_host, tag);
626 err = cqhci_prep_tran_desc(mrq, cq_host, tag);
643 cq_host->slot[tag].mrq = mrq;
644 cq_host->slot[tag].flags = 0;
649 cqhci_writel(cq_host, 1 << tag, CQHCI_TDBR);
650 if (!(cqhci_readl(cq_host, CQHCI_TDBR) & (1 << tag)))
651 pr_debug("%s: cqhci: doorbell not set for tag %d\n",
652 mmc_hostname(mmc), tag);
697 int tag;
718 tag = CQHCI_TERRI_C_TASK(terri);
719 slot = &cq_host->slot[tag];
727 tag = CQHCI_TERRI_D_TASK(terri);
728 slot = &cq_host->slot[tag];
749 tag = __ffs(tdpe);
750 tdpe &= ~(1 << tag);
751 slot = &cq_host->slot[tag];
764 for (tag = 0; tag < NUM_SLOTS; tag++) {
765 slot = &cq_host->slot[tag];
778 static void cqhci_finish_mrq(struct mmc_host *mmc, unsigned int tag)
781 struct cqhci_slot *slot = &cq_host->slot[tag];
786 WARN_ONCE(1, "%s: cqhci: spurious TCN for tag %d\n",
787 mmc_hostname(mmc), tag);
816 unsigned long tag = 0, comp_status;
844 for_each_set_bit(tag, &comp_status, cq_host->num_slots) {
846 pr_debug("%s: cqhci: completing tag %lu\n",
847 mmc_hostname(mmc), tag);
848 cqhci_finish_mrq(mmc, tag);
897 int tag = cqhci_tag(mrq);
898 struct cqhci_slot *slot = &cq_host->slot[tag];
912 pr_err("%s: cqhci: timeout for tag %d, qcnt %d\n",
913 mmc_hostname(mmc), tag, cq_host->qcnt);
1023 static void cqhci_recover_mrq(struct cqhci_host *cq_host, unsigned int tag)
1025 struct cqhci_slot *slot = &cq_host->slot[tag];