From: Takashi Iwai <tiwai@suse.de>
To: zhangfei gao <zhangfei.gao@gmail.com>
Cc: Philip Rakity <prakity@marvell.com>, Chris Ball <cjb@laptop.org>,
Aries Lee <arieslee@jmicron.com>, Qiming Wu <wuqm@marvell.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: Test bus-width for old MMC devices (v2)
Date: Wed, 22 Dec 2010 09:59:44 +0100 [thread overview]
Message-ID: <s5h62umnpxb.wl%tiwai@suse.de> (raw)
In-Reply-To: <AANLkTim6pQW0sDtZRNbXbgbvzuXKCdsju7z_ADBxvXPd@mail.gmail.com>
At Tue, 21 Dec 2010 22:56:32 -0500,
zhangfei gao wrote:
>
> On Tue, Dec 21, 2010 at 11:36 AM, Philip Rakity <prakity@marvell.com> wrote:
> >
> >
> > Can you please try this diff and see if it works for you.
> >
> > Will do formal patch after your testing. What card is failing ?
> >
> > Please let me know the manufacturing information so can add card to my test suite.
> >
> > Philip
> >
> > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> > index 1d8409f..77072c8 100644
> > --- a/drivers/mmc/core/mmc.c
> > +++ b/drivers/mmc/core/mmc.c
> > @@ -558,6 +558,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> > EXT_CSD_BUS_WIDTH,
> > ext_csd_bits[idx][0]);
> > if (!err) {
> > + mmc_set_bus_width_ddr(card->host,
> > + bus_width, MMC_SDR_MODE);
> Test OK,
> Curious why move here, then mmc_set_bus_width_ddr is called twice in
> fact when ddr=0 && (!(host->caps & MMC_CAP_BUS_WIDTH_TEST)), though
> not impact function.
> mmc_set_bus_width is mmc_set_bus_width_ddr(host, width, MMC_SDR_MODE).
Right. How about the patch below? This one just moves the call
before caps test, so it's simpler (and avoiding double calls).
thanks,
Takashi
===
From b66b9704f8d2fefa402741fb17949224b2766b4f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 22 Dec 2010 09:54:33 +0100
Subject: [PATCH] mmc: fix mmc_set_bus_width_ddr() call without bus-width-test cap
With the bus-width test patch, mmc_set_bus_width*() isn't called properly
when the driver doesn't set MMC_CAP_BUS_WIDTH and no DDR mode.
This patch fixes the regression by moving the call up before the cap test.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/mmc/core/mmc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 1d8409f..c86dd73 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -558,6 +558,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
EXT_CSD_BUS_WIDTH,
ext_csd_bits[idx][0]);
if (!err) {
+ mmc_set_bus_width_ddr(card->host,
+ bus_width, MMC_SDR_MODE);
/*
* If controller can't handle bus width test,
* use the highest bus width to maintain
@@ -565,8 +567,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
*/
if (!(host->caps & MMC_CAP_BUS_WIDTH_TEST))
break;
- mmc_set_bus_width_ddr(card->host,
- bus_width, MMC_SDR_MODE);
err = mmc_bus_test(card, bus_width);
if (!err)
break;
--
1.7.3.4
next prev parent reply other threads:[~2010-12-22 8:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 7:14 [PATCH] mmc: Test bus-width for old MMC devices (v2) Takashi Iwai
2010-12-15 13:17 ` [PATCH] mmc: Enable bus-width tests on SDHCI host Takashi Iwai
2010-12-15 19:40 ` Takashi Iwai
2010-12-16 16:54 ` [PATCH] mmc/sdhci: Enable bus-width test for JMicron controllers Takashi Iwai
2010-12-17 3:58 ` Chris Ball
2010-12-16 23:40 ` [PATCH] mmc: Test bus-width for old MMC devices (v2) Chris Ball
2010-12-17 2:33 ` Philip Rakity
2010-12-17 3:43 ` Chris Ball
2010-12-17 8:11 ` Takashi Iwai
2010-12-21 10:59 ` zhangfei gao
2010-12-21 16:36 ` Philip Rakity
2010-12-21 19:35 ` Philip Rakity
2010-12-22 3:56 ` zhangfei gao
2010-12-22 8:59 ` Takashi Iwai [this message]
2010-12-28 8:27 ` zhangfei gao
2011-01-02 19:52 ` Chris Ball
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=s5h62umnpxb.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arieslee@jmicron.com \
--cc=cjb@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=prakity@marvell.com \
--cc=wuqm@marvell.com \
--cc=zhangfei.gao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox