Lines Matching refs:mqrq
177 static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
1304 static void mmc_blk_data_prep(struct mmc_queue *mq, struct mmc_queue_req *mqrq, in mmc_blk_data_prep() argument
1310 struct mmc_blk_request *brq = &mqrq->brq; in mmc_blk_data_prep()
1311 struct request *req = mmc_queue_req_to_req(mqrq); in mmc_blk_data_prep()
1324 mmc_crypto_prepare_req(mqrq); in mmc_blk_data_prep()
1409 brq->data.sg = mqrq->sg; in mmc_blk_data_prep()
1410 brq->data.sg_len = mmc_queue_map_sg(mq, mqrq); in mmc_blk_data_prep()
1442 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_cqe_complete_rq() local
1443 struct mmc_request *mrq = &mqrq->brq.mrq; in mmc_blk_cqe_complete_rq()
1461 if (mqrq->retries++ < MMC_CQE_RETRIES) in mmc_blk_cqe_complete_rq()
1509 struct mmc_queue_req *mqrq = container_of(mrq, struct mmc_queue_req, in mmc_blk_cqe_req_done() local
1511 struct request *req = mmc_queue_req_to_req(mqrq); in mmc_blk_cqe_req_done()
1533 static struct mmc_request *mmc_blk_cqe_prep_dcmd(struct mmc_queue_req *mqrq, in mmc_blk_cqe_prep_dcmd() argument
1536 struct mmc_blk_request *brq = &mqrq->brq; in mmc_blk_cqe_prep_dcmd()
1548 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_cqe_issue_flush() local
1549 struct mmc_request *mrq = mmc_blk_cqe_prep_dcmd(mqrq, req); in mmc_blk_cqe_issue_flush()
1563 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_hsq_issue_rw_rq() local
1567 mmc_blk_rw_rq_prep(mqrq, mq->card, 0, mq); in mmc_blk_hsq_issue_rw_rq()
1568 mqrq->brq.mrq.done = mmc_blk_hsq_req_done; in mmc_blk_hsq_issue_rw_rq()
1569 mmc_pre_req(host, &mqrq->brq.mrq); in mmc_blk_hsq_issue_rw_rq()
1571 err = mmc_cqe_start_req(host, &mqrq->brq.mrq); in mmc_blk_hsq_issue_rw_rq()
1573 mmc_post_req(host, &mqrq->brq.mrq, err); in mmc_blk_hsq_issue_rw_rq()
1580 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_cqe_issue_rw_rq() local
1586 mmc_blk_data_prep(mq, mqrq, 0, NULL, NULL); in mmc_blk_cqe_issue_rw_rq()
1588 return mmc_blk_cqe_start_req(mq->card->host, &mqrq->brq.mrq); in mmc_blk_cqe_issue_rw_rq()
1591 static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, in mmc_blk_rw_rq_prep() argument
1597 struct mmc_blk_request *brq = &mqrq->brq; in mmc_blk_rw_rq_prep()
1598 struct request *req = mmc_queue_req_to_req(mqrq); in mmc_blk_rw_rq_prep()
1602 mmc_blk_data_prep(mq, mqrq, recovery_mode, &do_rel_wr, &do_data_tag); in mmc_blk_rw_rq_prep()
1675 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_fix_state() local
1676 struct mmc_blk_request *brq = &mqrq->brq; in mmc_blk_fix_state()
1696 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_read_single() local
1697 struct mmc_request *mrq = &mqrq->brq.mrq; in mmc_blk_read_single()
1709 mmc_blk_rw_rq_prep(mqrq, card, 1, mq); in mmc_blk_read_single()
1744 if (mqrq->retries > MMC_MAX_RETRIES - 1) in mmc_blk_read_single()
1745 mqrq->retries = MMC_MAX_RETRIES - 1; in mmc_blk_read_single()
1764 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_status_error() local
1765 struct mmc_blk_request *brq = &mqrq->brq; in mmc_blk_status_error()
1805 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_mq_rw_recovery() local
1806 struct mmc_blk_request *brq = &mqrq->brq; in mmc_blk_mq_rw_recovery()
1858 mqrq->retries = MMC_NO_RETRIES; in mmc_blk_mq_rw_recovery()
1870 if (mqrq->retries + 1 == MMC_MAX_RETRIES) in mmc_blk_mq_rw_recovery()
1878 if (mqrq->retries < MMC_MAX_RETRIES - MMC_DATA_RETRIES) { in mmc_blk_mq_rw_recovery()
1879 mqrq->retries = MMC_MAX_RETRIES - MMC_DATA_RETRIES; in mmc_blk_mq_rw_recovery()
1943 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_card_busy() local
1953 mqrq->brq.data.bytes_xfered = 0; in mmc_blk_card_busy()
1966 if (cb_data.status & mmc_blk_stop_err_bits(&mqrq->brq)) { in mmc_blk_card_busy()
1967 mqrq->brq.data.bytes_xfered = 0; in mmc_blk_card_busy()
1973 mqrq->brq.cmd.resp[0] |= R1_EXCEPTION_EVENT; in mmc_blk_card_busy()
1988 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_mq_complete_rq() local
1989 unsigned int nr_bytes = mqrq->brq.data.bytes_xfered; in mmc_blk_mq_complete_rq()
1998 } else if (mqrq->retries++ < MMC_MAX_RETRIES) { in mmc_blk_mq_complete_rq()
2008 struct mmc_queue_req *mqrq) in mmc_blk_urgent_bkops_needed() argument
2011 (mqrq->brq.cmd.resp[0] & R1_EXCEPTION_EVENT || in mmc_blk_urgent_bkops_needed()
2012 mqrq->brq.stop.resp[0] & R1_EXCEPTION_EVENT); in mmc_blk_urgent_bkops_needed()
2016 struct mmc_queue_req *mqrq) in mmc_blk_urgent_bkops() argument
2018 if (mmc_blk_urgent_bkops_needed(mq, mqrq)) in mmc_blk_urgent_bkops()
2024 struct mmc_queue_req *mqrq = in mmc_blk_hsq_req_done() local
2026 struct request *req = mmc_queue_req_to_req(mqrq); in mmc_blk_hsq_req_done()
2032 if (mmc_blk_rq_error(&mqrq->brq) || in mmc_blk_hsq_req_done()
2033 mmc_blk_urgent_bkops_needed(mq, mqrq)) { in mmc_blk_hsq_req_done()
2071 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_mq_poll_completion() local
2074 if (mmc_blk_rq_error(&mqrq->brq) || in mmc_blk_mq_poll_completion()
2082 mmc_blk_urgent_bkops(mq, mqrq); in mmc_blk_mq_poll_completion()
2105 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_mq_post_req() local
2106 struct mmc_request *mrq = &mqrq->brq.mrq; in mmc_blk_mq_post_req()
2131 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_mq_recovery() local
2136 if (mmc_blk_rq_error(&mqrq->brq)) { in mmc_blk_mq_recovery()
2141 mmc_blk_urgent_bkops(mq, mqrq); in mmc_blk_mq_recovery()
2180 struct mmc_queue_req *mqrq = container_of(mrq, struct mmc_queue_req, in mmc_blk_mq_req_done() local
2182 struct request *req = mmc_queue_req_to_req(mqrq); in mmc_blk_mq_req_done()
2218 if (mmc_blk_rq_error(&mqrq->brq) || in mmc_blk_mq_req_done()
2219 mmc_blk_urgent_bkops_needed(mq, mqrq)) { in mmc_blk_mq_req_done()
2275 struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); in mmc_blk_mq_issue_rw_rq() local
2280 mmc_blk_rw_rq_prep(mqrq, mq->card, 0, mq); in mmc_blk_mq_issue_rw_rq()
2282 mqrq->brq.mrq.done = mmc_blk_mq_req_done; in mmc_blk_mq_issue_rw_rq()
2284 mmc_pre_req(host, &mqrq->brq.mrq); in mmc_blk_mq_issue_rw_rq()
2292 err = mmc_start_request(host, &mqrq->brq.mrq); in mmc_blk_mq_issue_rw_rq()
2306 mmc_post_req(host, &mqrq->brq.mrq, err); in mmc_blk_mq_issue_rw_rq()