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/wbsd.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/wbsd.c')
-rw-r--r-- | drivers/mmc/wbsd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 7a282672f8e9..5711beecb4e8 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -1354,6 +1354,12 @@ static int __devinit wbsd_alloc_mmc(struct device *dev) | |||
1354 | */ | 1354 | */ |
1355 | mmc->max_seg_size = mmc->max_sectors * 512; | 1355 | mmc->max_seg_size = mmc->max_sectors * 512; |
1356 | 1356 | ||
1357 | /* | ||
1358 | * Maximum block size. We have 12 bits (= 4095) but have to subtract | ||
1359 | * space for CRC. So the maximum is 4095 - 4*2 = 4087. | ||
1360 | */ | ||
1361 | mmc->max_blk_size = 4087; | ||
1362 | |||
1357 | dev_set_drvdata(dev, mmc); | 1363 | dev_set_drvdata(dev, mmc); |
1358 | 1364 | ||
1359 | return 0; | 1365 | return 0; |