diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2006-11-21 11:54:23 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-02-04 14:54:10 -0500 |
commit | fe4a3c7a20f14d86022a8132adbf6ddb98e7197c (patch) | |
tree | 0719b8eb2d8c04c286095365ebff3d29285a5796 /drivers/mmc/mmc.c | |
parent | dba4accab17bd2e2e09088f746257a8c14af1cc2 (diff) |
mmc: Allow host drivers to specify a max block size
Most controllers have an upper limit on the block size. Allow the host
drivers to specify this and make sure we avoid hitting this limit.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index b48c277312de..9bda3fddad17 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -108,6 +108,8 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) | |||
108 | mrq->cmd->error = 0; | 108 | mrq->cmd->error = 0; |
109 | mrq->cmd->mrq = mrq; | 109 | mrq->cmd->mrq = mrq; |
110 | if (mrq->data) { | 110 | if (mrq->data) { |
111 | BUG_ON(mrq->data->blksz > host->max_blk_size); | ||
112 | |||
111 | mrq->cmd->data = mrq->data; | 113 | mrq->cmd->data = mrq->data; |
112 | mrq->data->error = 0; | 114 | mrq->data->error = 0; |
113 | mrq->data->mrq = mrq; | 115 | mrq->data->mrq = mrq; |
@@ -1605,6 +1607,8 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
1605 | host->max_phys_segs = 1; | 1607 | host->max_phys_segs = 1; |
1606 | host->max_sectors = 1 << (PAGE_CACHE_SHIFT - 9); | 1608 | host->max_sectors = 1 << (PAGE_CACHE_SHIFT - 9); |
1607 | host->max_seg_size = PAGE_CACHE_SIZE; | 1609 | host->max_seg_size = PAGE_CACHE_SIZE; |
1610 | |||
1611 | host->max_blk_size = 512; | ||
1608 | } | 1612 | } |
1609 | 1613 | ||
1610 | return host; | 1614 | return host; |