From fe4a3c7a20f14d86022a8132adbf6ddb98e7197c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 21 Nov 2006 17:54:23 +0100 Subject: 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 --- drivers/mmc/wbsd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/mmc/wbsd.c') diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 7a282672f8e..5711beecb4e 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c @@ -1354,6 +1354,12 @@ static int __devinit wbsd_alloc_mmc(struct device *dev) */ mmc->max_seg_size = mmc->max_sectors * 512; + /* + * Maximum block size. We have 12 bits (= 4095) but have to subtract + * space for CRC. So the maximum is 4095 - 4*2 = 4087. + */ + mmc->max_blk_size = 4087; + dev_set_drvdata(dev, mmc); return 0; -- cgit v1.2.3