Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307971
b: refs/heads/master
c: a5075eb
h: refs/heads/master
i:
  307969: d273ddf
  307967: a4eb8d8
v: v3
  • Loading branch information
Saugata Das authored and Chris Ball committed May 17, 2012
1 parent 94679ac commit 682fe8f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6801c41a77123712accfde898820972a1f6fc117
refs/heads/master: a5075eb94837edde6833fd5e0277fc2370cf8b39
19 changes: 17 additions & 2 deletions trunk/drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,14 +1284,24 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
int ret = 1, disable_multi = 0, retry = 0, type;
enum mmc_blk_status status;
struct mmc_queue_req *mq_rq;
struct request *req;
struct request *req = rqc;
struct mmc_async_req *areq;

if (!rqc && !mq->mqrq_prev->req)
return 0;

do {
if (rqc) {
/*
* When 4KB native sector is enabled, only 8 blocks
* multiple read or write is allowed
*/
if ((brq->data.blocks & 0x07) &&
(card->ext_csd.data_sector_size == 4096)) {
pr_err("%s: Transfer size is not 4KB sector size aligned\n",
req->rq_disk->disk_name);
goto cmd_abort;
}
mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
areq = &mq->mqrq_cur->mmc_active;
} else
Expand Down Expand Up @@ -1539,7 +1549,12 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
"mmcblk%d%s", md->name_idx, subname ? subname : "");

blk_queue_logical_block_size(md->queue.queue, 512);
if (mmc_card_mmc(card))
blk_queue_logical_block_size(md->queue.queue,
card->ext_csd.data_sector_size);
else
blk_queue_logical_block_size(md->queue.queue, 512);

set_capacity(md->disk, size);

if (mmc_host_cmd23(card->host)) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
} else {
card->ext_csd.data_tag_unit_size = 0;
}
} else {
card->ext_csd.data_sector_size = 512;
}

out:
Expand Down

0 comments on commit 682fe8f

Please sign in to comment.