• Home
  • Raw
  • Download

Lines Matching refs:mrq

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