Lines Matching refs:mrq
26 struct mmc_request *mrq;
413 static void cqhci_prep_task_desc(struct mmc_request *mrq,
416 u32 req_flags = mrq->data->flags;
428 CQHCI_BLK_COUNT(mrq->data->blocks) |
429 CQHCI_BLK_ADDR((u64)mrq->data->blk_addr);
432 mmc_hostname(mrq->host), mrq->tag, (unsigned long long)*data);
435 static int cqhci_dma_map(struct mmc_host *host, struct mmc_request *mrq)
438 struct mmc_data *data = mrq->data;
477 static int cqhci_prep_tran_desc(struct mmc_request *mrq,
480 struct mmc_data *data = mrq->data;
488 sg_count = cqhci_dma_map(mrq->host, mrq);
491 mmc_hostname(mrq->host), __func__, sg_count);
511 struct mmc_request *mrq)
521 if (!(mrq->cmd->flags & MMC_RSP_PRESENT)) {
525 if (mrq->cmd->flags & MMC_RSP_R1B) {
541 CQHCI_CMD_INDEX(mrq->cmd->opcode) |
544 cq_host->ops->update_dcmd_desc(mmc, mrq, &data);
548 mmc_hostname(mmc), mrq->cmd->opcode, timing, resp_type);
550 dataddr[0] = cpu_to_le64((u64)mrq->cmd->arg);
554 static void cqhci_post_req(struct mmc_host *host, struct mmc_request *mrq)
556 struct mmc_data *data = mrq->data;
565 static inline int cqhci_tag(struct mmc_request *mrq)
567 return mrq->cmd ? DCMD_SLOT : mrq->tag;
570 static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
575 int tag = cqhci_tag(mrq);
603 if (mrq->data) {
605 cqhci_prep_task_desc(mrq, &data, 1);
607 err = cqhci_prep_tran_desc(mrq, cq_host, tag);
614 cqhci_prep_dcmd_desc(mmc, mrq);
624 cq_host->slot[tag].mrq = mrq;
638 cqhci_post_req(mmc, mrq);
643 static void cqhci_recovery_needed(struct mmc_host *mmc, struct mmc_request *mrq,
652 if (notify && mrq->recovery_notifier)
653 mrq->recovery_notifier(mrq);
700 if (slot->mrq) {
702 cqhci_recovery_needed(mmc, slot->mrq, true);
709 if (slot->mrq) {
711 cqhci_recovery_needed(mmc, slot->mrq, true);
722 if (!slot->mrq)
725 cqhci_recovery_needed(mmc, slot->mrq, true);
738 struct mmc_request *mrq = slot->mrq;
741 if (!mrq) {
753 slot->mrq = NULL;
757 data = mrq->data;
765 mmc_cqe_request_done(mmc, mrq);
793 /* complete the corresponding mrq */
841 static bool cqhci_timeout(struct mmc_host *mmc, struct mmc_request *mrq,
845 int tag = cqhci_tag(mrq);
851 timed_out = slot->mrq == mrq;
854 cqhci_recovery_needed(mmc, mrq, false);
974 struct mmc_request *mrq = slot->mrq;
977 if (!mrq)
980 slot->mrq = NULL;
984 data = mrq->data;
989 mrq->cmd->error = cqhci_error_from_flags(slot->flags);
992 mmc_cqe_request_done(cq_host->mmc, mrq);