Lines Matching refs:mrq
160 struct mmc_request *mrq; member
277 int opc = host->mrq ? host->mrq->cmd->opcode : -1; in usdhi6_error_code()
295 err, host->wait, host->mrq ? host->mrq->cmd->opcode : -1); in usdhi6_error_code()
313 struct mmc_data *data = host->mrq->data; in usdhi6_blk_bounce()
317 __func__, host->mrq->cmd->opcode, data->sg_len, in usdhi6_blk_bounce()
340 struct mmc_request *mrq = host->mrq; in usdhi6_sg_prep() local
341 struct mmc_data *data = mrq->data; in usdhi6_sg_prep()
353 struct mmc_data *data = host->mrq->data; in usdhi6_sg_map()
385 sg->offset, host->mrq->cmd->opcode, host->mrq); in usdhi6_sg_map()
393 struct mmc_data *data = host->mrq->data; in usdhi6_sg_unmap()
433 struct mmc_data *data = host->mrq->data; in usdhi6_sg_advance()
508 host->mrq->cmd->opcode, host->mrq); in usdhi6_sg_advance()
530 struct mmc_data *data = host->mrq->data; in usdhi6_dma_stop_unmap()
549 struct mmc_request *mrq = host->mrq; in usdhi6_dma_complete() local
551 if (WARN(!mrq || !mrq->data, "%s: NULL data in DMA completion for %p!\n", in usdhi6_dma_complete()
552 dev_name(mmc_dev(host->mmc)), mrq)) in usdhi6_dma_complete()
556 mrq->cmd->opcode); in usdhi6_dma_complete()
559 usdhi6_wait_for_brwe(host, mrq->data->flags & MMC_DATA_READ); in usdhi6_dma_complete()
565 struct mmc_data *data = host->mrq->data; in usdhi6_dma_setup()
616 if (host->mrq->data->flags & MMC_DATA_READ) in usdhi6_dma_start()
624 struct mmc_data *data = host->mrq->data; in usdhi6_dma_kill()
637 struct mmc_data *data = host->mrq->data; in usdhi6_dma_check_error()
663 if (host->mrq->data->flags & MMC_DATA_READ) in usdhi6_dma_kick()
866 struct mmc_request *mrq = host->mrq; in usdhi6_timeout_set() local
870 if (!mrq->data) in usdhi6_timeout_set()
871 ticks = host->rate / 1000 * mrq->cmd->busy_timeout; in usdhi6_timeout_set()
873 ticks = host->rate / 1000000 * (mrq->data->timeout_ns / 1000) + in usdhi6_timeout_set()
874 mrq->data->timeout_clks; in usdhi6_timeout_set()
886 mrq->data ? "data" : "cmd", ticks, host->rate); in usdhi6_timeout_set()
895 struct mmc_request *mrq = host->mrq; in usdhi6_request_done() local
896 struct mmc_data *data = mrq->data; in usdhi6_request_done()
900 host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode, in usdhi6_request_done()
906 if (mrq->cmd->error || in usdhi6_request_done()
908 (mrq->stop && mrq->stop->error)) in usdhi6_request_done()
910 __func__, mrq->cmd->opcode, data ? data->blocks : 0, in usdhi6_request_done()
912 mrq->cmd->error, in usdhi6_request_done()
914 mrq->stop ? mrq->stop->error : 1); in usdhi6_request_done()
919 host->mrq = NULL; in usdhi6_request_done()
921 mmc_request_done(host->mmc, mrq); in usdhi6_request_done()
926 struct mmc_request *mrq = host->mrq; in usdhi6_cmd_flags() local
927 struct mmc_command *cmd = mrq->cmd; in usdhi6_cmd_flags()
935 if (mrq->data) { in usdhi6_cmd_flags()
938 if (mrq->data->flags & MMC_DATA_READ) in usdhi6_cmd_flags()
944 mrq->data->blocks > 1)) { in usdhi6_cmd_flags()
946 if (!mrq->stop) in usdhi6_cmd_flags()
979 struct mmc_request *mrq = host->mrq; in usdhi6_rq_start() local
980 struct mmc_command *cmd = mrq->cmd; in usdhi6_rq_start()
981 struct mmc_data *data = mrq->data; in usdhi6_rq_start()
1013 if (mrq->stop) in usdhi6_rq_start()
1060 data->sg->offset, mrq->stop ? " + stop" : ""); in usdhi6_rq_start()
1083 static void usdhi6_request(struct mmc_host *mmc, struct mmc_request *mrq) in usdhi6_request() argument
1090 host->mrq = mrq; in usdhi6_request()
1096 mrq->cmd->error = ret; in usdhi6_request()
1162 struct mmc_command *cmd = host->mrq->stop; in usdhi6_resp_cmd12()
1168 struct mmc_command *cmd = host->mrq->cmd; in usdhi6_resp_read()
1214 struct mmc_data *data = host->mrq->data; in usdhi6_blk_read()
1254 struct mmc_data *data = host->mrq->data; in usdhi6_blk_write()
1297 struct mmc_request *mrq = host->mrq; in usdhi6_stop_cmd() local
1299 switch (mrq->cmd->opcode) { in usdhi6_stop_cmd()
1302 if (mrq->stop->opcode == MMC_STOP_TRANSMISSION) { in usdhi6_stop_cmd()
1310 mrq->stop->opcode, mrq->cmd->opcode); in usdhi6_stop_cmd()
1311 mrq->stop->error = -EOPNOTSUPP; in usdhi6_stop_cmd()
1319 struct mmc_request *mrq = host->mrq; in usdhi6_end_cmd() local
1320 struct mmc_command *cmd = mrq->cmd; in usdhi6_end_cmd()
1329 if (!mrq->data) in usdhi6_end_cmd()
1334 if (!mrq->stop) in usdhi6_end_cmd()
1338 } else if (mrq->data->flags & MMC_DATA_READ) { in usdhi6_end_cmd()
1341 mrq->data->blocks > 1)) in usdhi6_end_cmd()
1348 mrq->data->blocks > 1)) in usdhi6_end_cmd()
1385 return !host->mrq->data->error && in usdhi6_mread_block()
1386 (host->wait != USDHI6_WAIT_FOR_DATA_END || !host->mrq->stop); in usdhi6_mread_block()
1412 return !host->mrq->data->error && in usdhi6_mwrite_block()
1413 (host->wait != USDHI6_WAIT_FOR_DATA_END || !host->mrq->stop); in usdhi6_mwrite_block()
1421 struct mmc_request *mrq; in usdhi6_sd_bh() local
1428 mrq = host->mrq; in usdhi6_sd_bh()
1429 if (!mrq) in usdhi6_sd_bh()
1432 cmd = mrq->cmd; in usdhi6_sd_bh()
1433 data = mrq->data; in usdhi6_sd_bh()
1466 if (mrq->stop) in usdhi6_sd_bh()
1467 mrq->stop->error = ret; in usdhi6_sd_bh()
1469 mrq->data->error = ret; in usdhi6_sd_bh()
1474 mrq->stop->error = 0; in usdhi6_sd_bh()
1478 mrq->data->error = usdhi6_error_code(host); in usdhi6_sd_bh()
1480 mrq->data->error); in usdhi6_sd_bh()
1494 usdhi6_wait_for_brwe(host, mrq->data->flags & MMC_DATA_READ); in usdhi6_sd_bh()
1502 host->mrq->stop && in usdhi6_sd_bh()
1503 !host->mrq->stop->error && in usdhi6_sd_bh()
1635 struct mmc_request *mrq = host->mrq; in usdhi6_timeout_work() local
1636 struct mmc_data *data = mrq ? mrq->data : NULL; in usdhi6_timeout_work()
1642 host->wait, mrq ? mrq->cmd->opcode : -1, in usdhi6_timeout_work()
1657 if (mrq) in usdhi6_timeout_work()
1658 mrq->cmd->error = -ETIMEDOUT; in usdhi6_timeout_work()
1662 mrq->stop->error = -ETIMEDOUT; in usdhi6_timeout_work()
1685 if (mrq) in usdhi6_timeout_work()