From: Jaehoon Chung <jh80.chung@samsung.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Chris Ball <cjb@laptop.org>
Cc: Simon <horms@verge.net.au>, Magnus <magnus.damm@gmail.com>,
Linux-SH <linux-sh@vger.kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH 1/3] mmc: block: add block number limitation flag for lultiple block read
Date: Fri, 30 May 2014 20:00:17 +0900 [thread overview]
Message-ID: <538864C1.2040203@samsung.com> (raw)
In-Reply-To: <87oayfpn14.wl%kuninori.morimoto.gx@renesas.com>
Hi, Kuninori.
Subject has the typo. lultiple -> multiple?
I didn't know why you need this patch. Would you use the MMC_CAP2_NO_MULTI_READ?
And I think...it's not good that used the card's capability flags to fix your H/W bug.
Best Regards,
Jaehoon Chung
On 05/30/2014 07:40 PM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> In some controllers, when performing a multiple block read of
> one or two blocks, depending on the timing with which the
> response register is read, the response value may not
> be read properly.
> Use single block read for this HW bug
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> drivers/mmc/card/block.c | 19 +++++++++++++++++--
> include/linux/mmc/host.h | 3 +++
> 2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 452782b..f3cbe37 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1400,8 +1400,23 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
>
> /* Some controllers can't do multiblock reads due to hw bugs */
> if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ &&
> - rq_data_dir(req) == READ)
> - brq->data.blocks = 1;
> + rq_data_dir(req) == READ) {
> +
> + if (card->host->caps2 & MMC_CAP2_2BLKS_LIMIT) {
> + /*
> + * In some controllers, when performing a
> + * multiple block read of one or two blocks,
> + * depending on the timing with which the
> + * response register is read, the response
> + * value may not be read properly.
> + * Use single block read for this HW bug
> + */
> + if (brq->data.blocks == 2)
> + brq->data.blocks = 1;
> + } else {
> + brq->data.blocks = 1;
> + }
> + }
> }
>
> if (brq->data.blocks > 1 || do_rel_wr) {
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index cb61ea4..5429cd7 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -266,6 +266,9 @@ struct mmc_host {
> #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */
> #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */
> #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */
> +#define MMC_CAP2_2BLKS_LIMIT (1 << 4) /* 2 blocks limit for multi read */
> +#define MMC_CAP2_NO_2BLKS_READ (MMC_CAP2_NO_MULTI_READ | \
> + MMC_CAP2_2BLKS_LIMIT)
> #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */
> #define MMC_CAP2_HS200_1_2V_SDR (1 << 6) /* can support */
> #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \
>
WARNING: multiple messages have this Message-ID (diff)
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Chris Ball <cjb@laptop.org>
Cc: Simon <horms@verge.net.au>, Magnus <magnus.damm@gmail.com>,
Linux-SH <linux-sh@vger.kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH 1/3] mmc: block: add block number limitation flag for lultiple block read
Date: Fri, 30 May 2014 11:00:17 +0000 [thread overview]
Message-ID: <538864C1.2040203@samsung.com> (raw)
In-Reply-To: <87oayfpn14.wl%kuninori.morimoto.gx@renesas.com>
Hi, Kuninori.
Subject has the typo. lultiple -> multiple?
I didn't know why you need this patch. Would you use the MMC_CAP2_NO_MULTI_READ?
And I think...it's not good that used the card's capability flags to fix your H/W bug.
Best Regards,
Jaehoon Chung
On 05/30/2014 07:40 PM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> In some controllers, when performing a multiple block read of
> one or two blocks, depending on the timing with which the
> response register is read, the response value may not
> be read properly.
> Use single block read for this HW bug
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> drivers/mmc/card/block.c | 19 +++++++++++++++++--
> include/linux/mmc/host.h | 3 +++
> 2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 452782b..f3cbe37 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -1400,8 +1400,23 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
>
> /* Some controllers can't do multiblock reads due to hw bugs */
> if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ &&
> - rq_data_dir(req) = READ)
> - brq->data.blocks = 1;
> + rq_data_dir(req) = READ) {
> +
> + if (card->host->caps2 & MMC_CAP2_2BLKS_LIMIT) {
> + /*
> + * In some controllers, when performing a
> + * multiple block read of one or two blocks,
> + * depending on the timing with which the
> + * response register is read, the response
> + * value may not be read properly.
> + * Use single block read for this HW bug
> + */
> + if (brq->data.blocks = 2)
> + brq->data.blocks = 1;
> + } else {
> + brq->data.blocks = 1;
> + }
> + }
> }
>
> if (brq->data.blocks > 1 || do_rel_wr) {
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index cb61ea4..5429cd7 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -266,6 +266,9 @@ struct mmc_host {
> #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */
> #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */
> #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */
> +#define MMC_CAP2_2BLKS_LIMIT (1 << 4) /* 2 blocks limit for multi read */
> +#define MMC_CAP2_NO_2BLKS_READ (MMC_CAP2_NO_MULTI_READ | \
> + MMC_CAP2_2BLKS_LIMIT)
> #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */
> #define MMC_CAP2_HS200_1_2V_SDR (1 << 6) /* can support */
> #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \
>
next prev parent reply other threads:[~2014-05-30 11:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 10:40 [PATCH 0/3] mmc: Kuninori Morimoto
2014-05-30 10:40 ` Kuninori Morimoto
2014-05-30 10:40 ` [PATCH 1/3] mmc: block: add block number limitation flag for lultiple block read Kuninori Morimoto
2014-05-30 10:40 ` Kuninori Morimoto
2014-05-30 11:00 ` Jaehoon Chung [this message]
2014-05-30 11:00 ` Jaehoon Chung
2014-05-30 11:14 ` Kuninori Morimoto
2014-05-30 11:14 ` Kuninori Morimoto
2014-05-30 11:46 ` Ben Dooks
2014-05-30 11:46 ` Ben Dooks
2014-05-30 13:25 ` Sergei Shtylyov
2014-05-30 13:25 ` Sergei Shtylyov
2014-05-30 13:40 ` Kuninori Morimoto
2014-05-30 13:40 ` Kuninori Morimoto
2014-05-30 10:40 ` [PATCH 2/3] mmc: sdhi: tidyup mmc_data setting for R-Car SDHI Kuninori Morimoto
2014-05-30 10:40 ` Kuninori Morimoto
2014-05-30 10:40 ` [PATCH 3/3] mmc: tmio: care about DMA tx/rx addr offset Kuninori Morimoto
2014-05-30 10:40 ` Kuninori Morimoto
2014-05-30 10:56 ` Ben Dooks
2014-05-30 10:56 ` Ben Dooks
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=538864C1.2040203@samsung.com \
--to=jh80.chung@samsung.com \
--cc=cjb@laptop.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.