Skip to content

Commit

Permalink
[MMC] Add DATA_MULTI flag
Browse files Browse the repository at this point in the history
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 <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Jan 9, 2006
1 parent cfa7f52 commit 788ee7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/mmc/mmc_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions include/linux/mmc/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 788ee7b

Please sign in to comment.