From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] env_mmc: remove condition on call to mmc_switch_part
Date: Wed, 03 Sep 2014 09:46:25 -0600 [thread overview]
Message-ID: <540737D1.2040808@wwwdotorg.org> (raw)
In-Reply-To: <1409700683-25393-2-git-send-email-pab@pabigot.com>
On 09/02/2014 05:31 PM, Peter A. Bigot wrote:
> Though it might be expected to do so, mmc_switch_part() does not change
> the part_num field of the device on which the partition has been
> changed. As such, checking to see whether the partition is already the
> target partition will fail to correctly restore the original
> configuration in cases like env_mmc which rely on this behavior to
> avoid having to preserve the pre-switch partition number outside the
> device structure.
> diff --git a/common/env_mmc.c b/common/env_mmc.c
> - if (part != mmc->part_num) {
> - ret = mmc_switch_part(dev, part);
> - if (ret)
> - puts("MMC partition switch failed\n");
> - }
> + ret = mmc_switch_part(dev, part);
> + if (ret)
> + puts("MMC partition switch failed\n");
I'm not sure this is correct, but it might be.
I believe the if() is present to avoid any attempt to call
mmc_switch_part() on a device that doesn't have HW partitions (in which
case, both part and mmc->part_num should already be 0), since such an
attempt might print an error message. If you don't observe any error
message printed after this change, then perhaps this patch is fine.
next prev parent reply other threads:[~2014-09-03 15:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 23:31 [U-Boot] [PATCH 0/2] fix issue with mmc partition management Peter A. Bigot
2014-09-02 23:31 ` [U-Boot] [PATCH 1/2] env_mmc: remove condition on call to mmc_switch_part Peter A. Bigot
2014-09-03 15:46 ` Stephen Warren [this message]
2014-09-03 16:03 ` Peter A. Bigot
2014-09-03 16:32 ` [U-Boot] [PATCH v2] env_mmc: correct fini partition to match init partition Peter A. Bigot
2014-09-03 16:52 ` Stephen Warren
2014-09-03 17:30 ` Peter A. Bigot
2014-09-03 17:46 ` Stephen Warren
2014-09-03 17:55 ` Peter A. Bigot
2014-09-03 17:22 ` [U-Boot] [PATCH v3] " Peter A. Bigot
2014-09-09 15:25 ` Igor Grinberg
2014-09-14 13:21 ` Dmitry Lifshitz
2014-10-02 11:09 ` Pantelis Antoniou
2014-09-02 23:31 ` [U-Boot] [PATCH 2/2] mmc: restore capacity when switching to partition 0 Peter A. Bigot
2014-09-03 15:48 ` Stephen Warren
2014-09-03 15:59 ` Peter A. Bigot
2014-09-03 16:05 ` Stephen Warren
2014-09-03 16:36 ` Peter A. Bigot
2014-09-11 17:45 ` Tom Rini
2014-10-02 11:07 ` Pantelis Antoniou
2014-09-11 15:57 ` [U-Boot] [PATCH 0/2] fix issue with mmc partition management Tom Rini
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=540737D1.2040808@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/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