• Home
  • Raw
  • Download

Lines Matching refs:mrq

25 	struct mmc_request *mrq;  member
402 static void cqhci_prep_task_desc(struct mmc_request *mrq, in cqhci_prep_task_desc() argument
405 u32 req_flags = mrq->data->flags; in cqhci_prep_task_desc()
417 CQHCI_BLK_COUNT(mrq->data->blocks) | in cqhci_prep_task_desc()
418 CQHCI_BLK_ADDR((u64)mrq->data->blk_addr); in cqhci_prep_task_desc()
421 mmc_hostname(mrq->host), mrq->tag, (unsigned long long)*data); in cqhci_prep_task_desc()
424 static int cqhci_dma_map(struct mmc_host *host, struct mmc_request *mrq) in cqhci_dma_map() argument
427 struct mmc_data *data = mrq->data; in cqhci_dma_map()
466 static int cqhci_prep_tran_desc(struct mmc_request *mrq, in cqhci_prep_tran_desc() argument
469 struct mmc_data *data = mrq->data; in cqhci_prep_tran_desc()
477 sg_count = cqhci_dma_map(mrq->host, mrq); in cqhci_prep_tran_desc()
480 mmc_hostname(mrq->host), __func__, sg_count); in cqhci_prep_tran_desc()
500 struct mmc_request *mrq) in cqhci_prep_dcmd_desc() argument
510 if (!(mrq->cmd->flags & MMC_RSP_PRESENT)) { in cqhci_prep_dcmd_desc()
514 if (mrq->cmd->flags & MMC_RSP_R1B) { in cqhci_prep_dcmd_desc()
530 CQHCI_CMD_INDEX(mrq->cmd->opcode) | in cqhci_prep_dcmd_desc()
533 cq_host->ops->update_dcmd_desc(mmc, mrq, &data); in cqhci_prep_dcmd_desc()
537 mmc_hostname(mmc), mrq->cmd->opcode, timing, resp_type); in cqhci_prep_dcmd_desc()
539 dataddr[0] = cpu_to_le64((u64)mrq->cmd->arg); in cqhci_prep_dcmd_desc()
543 static void cqhci_post_req(struct mmc_host *host, struct mmc_request *mrq) in cqhci_post_req() argument
545 struct mmc_data *data = mrq->data; in cqhci_post_req()
554 static inline int cqhci_tag(struct mmc_request *mrq) in cqhci_tag() argument
556 return mrq->cmd ? DCMD_SLOT : mrq->tag; in cqhci_tag()
559 static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) in cqhci_request() argument
564 int tag = cqhci_tag(mrq); in cqhci_request()
589 if (mrq->data) { in cqhci_request()
591 cqhci_prep_task_desc(mrq, &data, 1); in cqhci_request()
593 err = cqhci_prep_tran_desc(mrq, cq_host, tag); in cqhci_request()
600 cqhci_prep_dcmd_desc(mmc, mrq); in cqhci_request()
610 cq_host->slot[tag].mrq = mrq; in cqhci_request()
624 cqhci_post_req(mmc, mrq); in cqhci_request()
629 static void cqhci_recovery_needed(struct mmc_host *mmc, struct mmc_request *mrq, in cqhci_recovery_needed() argument
638 if (notify && mrq->recovery_notifier) in cqhci_recovery_needed()
639 mrq->recovery_notifier(mrq); in cqhci_recovery_needed()
686 if (slot->mrq) { in cqhci_error_irq()
688 cqhci_recovery_needed(mmc, slot->mrq, true); in cqhci_error_irq()
695 if (slot->mrq) { in cqhci_error_irq()
697 cqhci_recovery_needed(mmc, slot->mrq, true); in cqhci_error_irq()
708 if (!slot->mrq) in cqhci_error_irq()
711 cqhci_recovery_needed(mmc, slot->mrq, true); in cqhci_error_irq()
724 struct mmc_request *mrq = slot->mrq; in cqhci_finish_mrq() local
727 if (!mrq) { in cqhci_finish_mrq()
739 slot->mrq = NULL; in cqhci_finish_mrq()
743 data = mrq->data; in cqhci_finish_mrq()
751 mmc_cqe_request_done(mmc, mrq); in cqhci_finish_mrq()
827 static bool cqhci_timeout(struct mmc_host *mmc, struct mmc_request *mrq, in cqhci_timeout() argument
831 int tag = cqhci_tag(mrq); in cqhci_timeout()
837 timed_out = slot->mrq == mrq; in cqhci_timeout()
840 cqhci_recovery_needed(mmc, mrq, false); in cqhci_timeout()
960 struct mmc_request *mrq = slot->mrq; in cqhci_recover_mrq() local
963 if (!mrq) in cqhci_recover_mrq()
966 slot->mrq = NULL; in cqhci_recover_mrq()
970 data = mrq->data; in cqhci_recover_mrq()
975 mrq->cmd->error = cqhci_error_from_flags(slot->flags); in cqhci_recover_mrq()
978 mmc_cqe_request_done(cq_host->mmc, mrq); in cqhci_recover_mrq()