From: hkallweit1@gmail.com (Heiner Kallweit)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] mmc: meson-gx: set max block count
Date: Sat, 28 Jan 2017 09:25:35 +0100 [thread overview]
Message-ID: <0309625d-e24b-13e1-bba7-ada6b5a202c1@gmail.com> (raw)
So far max_blk_count isn't set what results in a default of value 8
to be used (PAGE_SIZE / block size).
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
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(+)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 83361f1f..d4d174ed 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -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);
--
2.11.0
next reply other threads:[~2017-01-28 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-28 8:25 Heiner Kallweit [this message]
2017-01-30 16:58 ` [PATCH v2] mmc: meson-gx: set max block count Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0309625d-e24b-13e1-bba7-ada6b5a202c1@gmail.com \
--to=hkallweit1@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).