public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] fix issue with mmc partition management
@ 2014-09-02 23:31 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
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Peter A. Bigot @ 2014-09-02 23:31 UTC (permalink / raw)
  To: u-boot

This series aims at addressing an issue discovered with SPL mode when
the MMC device being used lacks an environment partition.
http://www.mail-archive.com/meta-ti at yoctoproject.org/msg04320.html
includes details on the original failure with this diagnosis:

  This is a bug in handling mmc_switch_part: what's happening is that
  the code reconfigures the mmc device to look at the partition on which
  the environment is to be found, but fails to restore it to reflect the
  state of the whole device. I.e., the mmc capacity and lba are zero in
  my case (I have no partition 2 on the uSD card), but mmc_switch_part()
  returns -ENODEV on the attempt to switch back in fini_mmc_for_env()
  without also resetting the capacity to what the rest of the system
  expects.

The first fixes a mistaken assumption about how mmc_switch_part()
behaves.  (Personally, I think mmc_switch_part() should have recorded
the new partition in the device structure, but that's an behavioral
change that I'm not going to introduce.)

The second fixes the underlying problem, which was the failure to
restore the capacity configuration to the whole device after interacting
with the environment.

FWIW: The second patch is relevant to 2014.07; the first is not.

Peter A. Bigot (2):
  env_mmc: remove condition on call to mmc_switch_part
  mmc: restore capacity when switching to partition 0

 common/env_mmc.c  | 11 ++++-------
 drivers/mmc/mmc.c | 11 ++++++++---
 2 files changed, 12 insertions(+), 10 deletions(-)

-- 
1.8.5.5

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-10-02 11:09 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox