On Fri, May 20, 2011 at 5:29 AM, Jaehoon Chung <jh80.chung@xxxxxxxxxxx> wrote: > Hi Andrei. > > I have some question.. > In mmc_blk_issue_rw_rq() of block.c, there is the below code. > > static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req) > { > struct mmc_blk_data *md = mq->data; > struct mmc_card *card = md->queue.card; > struct mmc_blk_request brq; > int ret = 1, disable_multi = 0; > > /* > * Reliable writes are used to implement Forced Unit Access and > * REQ_META accesses, and are supported only on MMCs. > */ > bool do_rel_wr = ((req->cmd_flags & REQ_FUA) || > (req->cmd_flags & REQ_META)) && > (rq_data_dir(req) == WRITE) && > REL_WRITES_SUPPORTED(card); > > do { > struct mmc_command cmd = {0}; > u32 readcmd, writecmd, status = 0; > > memset(&brq, 0, sizeof(struct mmc_blk_request)); > brq.mrq.cmd = &brq.cmd; > brq.mrq.data = &brq.data; > > brq.cmd.arg = blk_rq_pos(req); > if (!mmc_card_blockaddr(card)) > brq.cmd.arg <<= 9; > brq.cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; > brq.data.blksz = 512; > brq.stop.opcode = MMC_STOP_TRANSMISSION; > brq.stop.arg = 0; > brq.stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; > brq.data.blocks = blk_rq_sectors(req); > > There is "brq.stop.opcode = MMC_STOP_TRANSMISSION". > If we use CMD23, this line didn't need? Actually i don't know, so i ask to you. > Nope. Needed. CMD23 support might not be implemented by host driver (like it isn't right now for anything non-SDHCI). And even it if were, you still need to send stop command on any error conditions. I suggest you read the relevant sections in the publically available eMMC spec. A -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html