Lines Matching refs:mrq
160 struct mmc_request *mrq; member
281 int opc = host->mrq ? host->mrq->cmd->opcode : -1; in usdhi6_error_code()
299 err, host->wait, host->mrq ? host->mrq->cmd->opcode : -1); in usdhi6_error_code()
317 struct mmc_data *data = host->mrq->data; in usdhi6_blk_bounce()
321 __func__, host->mrq->cmd->opcode, data->sg_len, in usdhi6_blk_bounce()
344 struct mmc_request *mrq = host->mrq; in usdhi6_sg_prep() local
345 struct mmc_data *data = mrq->data; in usdhi6_sg_prep()
357 struct mmc_data *data = host->mrq->data; in usdhi6_sg_map()
389 sg->offset, host->mrq->cmd->opcode, host->mrq); in usdhi6_sg_map()
397 struct mmc_data *data = host->mrq->data; in usdhi6_sg_unmap()
437 struct mmc_data *data = host->mrq->data; in usdhi6_sg_advance()
512 host->mrq->cmd->opcode, host->mrq); in usdhi6_sg_advance()
534 struct mmc_data *data = host->mrq->data; in usdhi6_dma_stop_unmap()
553 struct mmc_request *mrq = host->mrq; in usdhi6_dma_complete() local
555 if (WARN(!mrq || !mrq->data, "%s: NULL data in DMA completion for %p!\n", in usdhi6_dma_complete()
556 dev_name(mmc_dev(host->mmc)), mrq)) in usdhi6_dma_complete()
560 mrq->cmd->opcode); in usdhi6_dma_complete()
563 usdhi6_wait_for_brwe(host, mrq->data->flags & MMC_DATA_READ); in usdhi6_dma_complete()
569 struct mmc_data *data = host->mrq->data; in usdhi6_dma_setup()
620 if (host->mrq->data->flags & MMC_DATA_READ) in usdhi6_dma_start()
628 struct mmc_data *data = host->mrq->data; in usdhi6_dma_kill()
641 struct mmc_data *data = host->mrq->data; in usdhi6_dma_check_error()
667 if (host->mrq->data->flags & MMC_DATA_READ) in usdhi6_dma_kick()
874 struct mmc_request *mrq = host->mrq; in usdhi6_timeout_set() local
878 if (!mrq->data) in usdhi6_timeout_set()
879 ticks = host->rate / 1000 * mrq->cmd->busy_timeout; in usdhi6_timeout_set()
881 ticks = host->rate / 1000000 * (mrq->data->timeout_ns / 1000) + in usdhi6_timeout_set()
882 mrq->data->timeout_clks; in usdhi6_timeout_set()
894 mrq->data ? "data" : "cmd", ticks, host->rate); in usdhi6_timeout_set()
903 struct mmc_request *mrq = host->mrq; in usdhi6_request_done() local
904 struct mmc_data *data = mrq->data; in usdhi6_request_done()
908 host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode, in usdhi6_request_done()
914 if (mrq->cmd->error || in usdhi6_request_done()
916 (mrq->stop && mrq->stop->error)) in usdhi6_request_done()
918 __func__, mrq->cmd->opcode, data ? data->blocks : 0, in usdhi6_request_done()
920 mrq->cmd->error, in usdhi6_request_done()
922 mrq->stop ? mrq->stop->error : 1); in usdhi6_request_done()
927 host->mrq = NULL; in usdhi6_request_done()
929 mmc_request_done(host->mmc, mrq); in usdhi6_request_done()
934 struct mmc_request *mrq = host->mrq; in usdhi6_cmd_flags() local
935 struct mmc_command *cmd = mrq->cmd; in usdhi6_cmd_flags()
943 if (mrq->data) { in usdhi6_cmd_flags()
946 if (mrq->data->flags & MMC_DATA_READ) in usdhi6_cmd_flags()
952 mrq->data->blocks > 1)) { in usdhi6_cmd_flags()
954 if (!mrq->stop) in usdhi6_cmd_flags()
987 struct mmc_request *mrq = host->mrq; in usdhi6_rq_start() local
988 struct mmc_command *cmd = mrq->cmd; in usdhi6_rq_start()
989 struct mmc_data *data = mrq->data; in usdhi6_rq_start()
1021 if (mrq->stop) in usdhi6_rq_start()
1068 data->sg->offset, mrq->stop ? " + stop" : ""); in usdhi6_rq_start()
1091 static void usdhi6_request(struct mmc_host *mmc, struct mmc_request *mrq) in usdhi6_request() argument
1098 host->mrq = mrq; in usdhi6_request()
1104 mrq->cmd->error = ret; in usdhi6_request()
1202 struct mmc_command *cmd = host->mrq->stop; in usdhi6_resp_cmd12()
1208 struct mmc_command *cmd = host->mrq->cmd; in usdhi6_resp_read()
1254 struct mmc_data *data = host->mrq->data; in usdhi6_blk_read()
1294 struct mmc_data *data = host->mrq->data; in usdhi6_blk_write()
1337 struct mmc_request *mrq = host->mrq; in usdhi6_stop_cmd() local
1339 switch (mrq->cmd->opcode) { in usdhi6_stop_cmd()
1342 if (mrq->stop->opcode == MMC_STOP_TRANSMISSION) { in usdhi6_stop_cmd()
1350 mrq->stop->opcode, mrq->cmd->opcode); in usdhi6_stop_cmd()
1351 mrq->stop->error = -EOPNOTSUPP; in usdhi6_stop_cmd()
1359 struct mmc_request *mrq = host->mrq; in usdhi6_end_cmd() local
1360 struct mmc_command *cmd = mrq->cmd; in usdhi6_end_cmd()
1369 if (!mrq->data) in usdhi6_end_cmd()
1374 if (!mrq->stop) in usdhi6_end_cmd()
1378 } else if (mrq->data->flags & MMC_DATA_READ) { in usdhi6_end_cmd()
1381 mrq->data->blocks > 1)) in usdhi6_end_cmd()
1388 mrq->data->blocks > 1)) in usdhi6_end_cmd()
1425 return !host->mrq->data->error && in usdhi6_mread_block()
1426 (host->wait != USDHI6_WAIT_FOR_DATA_END || !host->mrq->stop); in usdhi6_mread_block()
1452 return !host->mrq->data->error && in usdhi6_mwrite_block()
1453 (host->wait != USDHI6_WAIT_FOR_DATA_END || !host->mrq->stop); in usdhi6_mwrite_block()
1461 struct mmc_request *mrq; in usdhi6_sd_bh() local
1468 mrq = host->mrq; in usdhi6_sd_bh()
1469 if (!mrq) in usdhi6_sd_bh()
1472 cmd = mrq->cmd; in usdhi6_sd_bh()
1473 data = mrq->data; in usdhi6_sd_bh()
1506 if (mrq->stop) in usdhi6_sd_bh()
1507 mrq->stop->error = ret; in usdhi6_sd_bh()
1509 mrq->data->error = ret; in usdhi6_sd_bh()
1514 mrq->stop->error = 0; in usdhi6_sd_bh()
1518 mrq->data->error = usdhi6_error_code(host); in usdhi6_sd_bh()
1520 mrq->data->error); in usdhi6_sd_bh()
1534 usdhi6_wait_for_brwe(host, mrq->data->flags & MMC_DATA_READ); in usdhi6_sd_bh()
1542 host->mrq->stop && in usdhi6_sd_bh()
1543 !host->mrq->stop->error && in usdhi6_sd_bh()
1675 struct mmc_request *mrq = host->mrq; in usdhi6_timeout_work() local
1676 struct mmc_data *data = mrq ? mrq->data : NULL; in usdhi6_timeout_work()
1682 host->wait, mrq ? mrq->cmd->opcode : -1, in usdhi6_timeout_work()
1697 if (mrq) in usdhi6_timeout_work()
1698 mrq->cmd->error = -ETIMEDOUT; in usdhi6_timeout_work()
1702 mrq->stop->error = -ETIMEDOUT; in usdhi6_timeout_work()
1722 if (mrq) in usdhi6_timeout_work()