mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
dba4accab1
commit
fe4a3c7a20
12 changed files with 44 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue