Lines Matching defs:mrq

27 	struct mmc_request *mrq;
422 static void cqhci_prep_task_desc(struct mmc_request *mrq,
426 u32 req_flags = mrq->data->flags;
439 CQHCI_BLK_COUNT(mrq->data->blocks) |
440 CQHCI_BLK_ADDR((u64)mrq->data->blk_addr);
445 u64 desc1 = cqhci_crypto_prep_task_desc(mrq);
450 mmc_hostname(mrq->host), mrq->tag, desc1, desc0);
453 mmc_hostname(mrq->host), mrq->tag, desc0);
457 static int cqhci_dma_map(struct mmc_host *host, struct mmc_request *mrq)
460 struct mmc_data *data = mrq->data;
500 static int cqhci_prep_tran_desc(struct mmc_request *mrq,
503 struct mmc_data *data = mrq->data;
511 sg_count = cqhci_dma_map(mrq->host, mrq);
514 mmc_hostname(mrq->host), __func__, sg_count);
538 struct mmc_request *mrq)
548 if (!(mrq->cmd->flags & MMC_RSP_PRESENT)) {
552 if (mrq->cmd->flags & MMC_RSP_R1B) {
568 CQHCI_CMD_INDEX(mrq->cmd->opcode) |
571 cq_host->ops->update_dcmd_desc(mmc, mrq, &data);
575 mmc_hostname(mmc), mrq->cmd->opcode, timing, resp_type);
577 dataddr[0] = cpu_to_le64((u64)mrq->cmd->arg);
581 static void cqhci_post_req(struct mmc_host *host, struct mmc_request *mrq)
583 struct mmc_data *data = mrq->data;
592 static inline int cqhci_tag(struct mmc_request *mrq)
594 return mrq->cmd ? DCMD_SLOT : mrq->tag;
597 static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
600 int tag = cqhci_tag(mrq);
628 if (mrq->data) {
629 cqhci_prep_task_desc(mrq, cq_host, tag);
631 err = cqhci_prep_tran_desc(mrq, cq_host, tag);
638 cqhci_prep_dcmd_desc(mmc, mrq);
648 cq_host->slot[tag].mrq = mrq;
662 cqhci_post_req(mmc, mrq);
667 static void cqhci_recovery_needed(struct mmc_host *mmc, struct mmc_request *mrq,
676 if (notify && mrq->recovery_notifier)
677 mrq->recovery_notifier(mrq);
725 if (slot->mrq) {
727 cqhci_recovery_needed(mmc, slot->mrq, true);
734 if (slot->mrq) {
736 cqhci_recovery_needed(mmc, slot->mrq, true);
757 if (!slot->mrq)
760 cqhci_recovery_needed(mmc, slot->mrq, true);
771 if (!slot->mrq)
774 cqhci_recovery_needed(mmc, slot->mrq, true);
787 struct mmc_request *mrq = slot->mrq;
790 if (!mrq) {
802 slot->mrq = NULL;
806 data = mrq->data;
814 mmc_cqe_request_done(mmc, mrq);
850 /* complete the corresponding mrq */
898 static bool cqhci_timeout(struct mmc_host *mmc, struct mmc_request *mrq,
902 int tag = cqhci_tag(mrq);
908 timed_out = slot->mrq == mrq;
911 cqhci_recovery_needed(mmc, mrq, false);
1031 struct mmc_request *mrq = slot->mrq;
1034 if (!mrq)
1037 slot->mrq = NULL;
1041 data = mrq->data;
1046 mrq->cmd->error = cqhci_error_from_flags(slot->flags);
1049 mmc_cqe_request_done(cq_host->mmc, mrq);