mmc: meson-gx: set max block count
Subsystems (2)
PATCH v2 1/1 mmc: meson-gx: set max block count
So far max_blk_count isn't set what results in a default of value 8 to be used (PAGE_SIZE / block size).
---
v2:
- block length field has 9 bits, so set max_blk_count to 2^9-1 = 511
- in addition set max_req_size because max_blk_count is also limited by max_req_size / block_size
--- drivers/mmc/host/meson-gx-mmc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mmc/host/meson-gx-mmc.c +2 -0
@@ -810,6 +810,8 @@ static int meson_mmc_probe(struct platform_device *pdev) goto free_host; } + mmc->max_blk_count =CMD_CFG_LENGTH_MASK ; + mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size; mmc->ops = &meson_mmc_ops;mmc_add_host (mmc);
Signature · 1 line
2.11.0
Kevin Hilman
maintainerPATCH v2 1/1 mmc: meson-gx: set max block count
Quoted 2 lines · Heiner Kallweit
So far
max_blk_countisn't set what results in a default of value 8 to be used (PAGE_SIZE/ block size).
This describes the problem...
Quoted 6 lines
Signed-off-by Heiner Kallweit <[email protected]>---
v2:
- block length field has 9 bits, so setmax_blk_countto 2^9-1 = 511
- in addition setmax_req_sizebecausemax_blk_countis also limited bymax_req_size/block_size
... and this part describes the fix, so should also be in the changelog.
with an updated changelog, feel free to add:
Kevin
Quoted 16 lines
--- drivers/mmc/host/meson-gx-mmc.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mmc/host/meson-gx-mmc.c +2
-0@@ -810,6 +810,8 @@ static int meson_mmc_probe(struct platform_device *pdev) goto free_host; } + mmc->max_blk_count =CMD_CFG_LENGTH_MASK ; + mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size; mmc->ops = &meson_mmc_ops;mmc_add_host (mmc);