From: Chris Ball <cjb@laptop.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: linux-mmc@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH] mmc/sdio: remember new card RCA when redetecting card
Date: Wed, 02 Mar 2011 11:32:41 -0500 [thread overview]
Message-ID: <m3lj0xsct2.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <1298986864-25597-1-git-send-email-linus.walleij@stericsson.com> (Linus Walleij's message of "Tue, 1 Mar 2011 14:41:04 +0100")
Hi,
On Tue, Mar 01 2011, Linus Walleij wrote:
> From: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
>
> During redetection of a SDIO card, a request for a new card RCA
> was submitted to the card, but was then overwritten by the old RCA.
> This caused the card to be deselected instead of selected when using
> the incorrect RCA.
Nico, would you mind taking a look at this, please? Assigning to a
member of oldcard because we know it's later going to be copied into
card seems a little ugly to me (at least without a comment explaining
that); I'm wondering if you'd suggest something else here.
And, just to check we're all on the same page, this would be a
regression introduced back at 2.6.32 when the "oldcard" handling
was first merged, so it should be sent up with a stable tag.
(I'm not yet sure whether I want to send this to mainline during the
last week of a release and without any previous testing, given that
the bug is more than a year old already. Let's see what Nico says.)
Thanks.
> Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
> Reviewed-by: Ulf Hansson <ulf.hansson@stericsson.com>
> Reviewed-by: Pawel Wieczorkiewicz <pawel.wieczorkiewicz@stericsson.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/mmc/core/sdio.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
> index 617e9ad..30d065d 100644
> --- a/drivers/mmc/core/sdio.c
> +++ b/drivers/mmc/core/sdio.c
> @@ -395,6 +395,13 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
> if (err)
> goto remove;
>
> + /*
> + * Update oldcard with the new RCA received from the
> + * SDIO device.
> + */
> + if (oldcard)
> + oldcard->rca = card->rca;
> +
> mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
> }
--
Chris Ball <cjb@laptop.org>
One Laptop Per Child
next prev parent reply other threads:[~2011-03-02 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 13:41 [PATCH] mmc/sdio: remember new card RCA when redetecting card Linus Walleij
2011-03-02 16:04 ` Linus Walleij
2011-03-02 16:32 ` Chris Ball [this message]
2011-03-03 2:56 ` Nicolas Pitre
2011-03-03 3:15 ` 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=m3lj0xsct2.fsf@pullcord.laptop.org \
--to=cjb@laptop.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=stefan.xk.nilsson@stericsson.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