From 788ee7b09883515f3a72a8f2a980df5e94f37e2c Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 9 Jan 2006 21:12:17 +0000 Subject: [MMC] Add DATA_MULTI flag Some hosts need to know that a transfer will be multi-block. Add a data flag to indicate multiple data block transfers. Signed-off-by: Russell King --- drivers/mmc/mmc_block.c | 8 +++++++- include/linux/mmc/mmc.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 198561d21710..f43cdfcbfd2c 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -200,7 +200,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) brq.data.flags |= MMC_DATA_WRITE; brq.data.blocks = 1; } - brq.mrq.stop = brq.data.blocks > 1 ? &brq.stop : NULL; + + if (brq.data.blocks > 1) { + brq.data.flags |= MMC_DATA_MULTI; + brq.mrq.stop = &brq.stop; + } else { + brq.mrq.stop = NULL; + } brq.data.sg = mq->sg; brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg); diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index aef6042f8f0b..86d491b3b73f 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -64,6 +64,7 @@ struct mmc_data { #define MMC_DATA_WRITE (1 << 8) #define MMC_DATA_READ (1 << 9) #define MMC_DATA_STREAM (1 << 10) +#define MMC_DATA_MULTI (1 << 11) unsigned int bytes_xfered; -- cgit v1.2.3