mmc: emmc and hw partitions partition table id bugfix.
PATCH 1/1 mmc: emmc and hw partitions partition table id bugfix.
On bootup the emmc's hw partition is always set to 0 and the partition table is read from it. When switching to another hw partition the partition table's id is not updated but instead the old one from hw partition 0 is used. If there is no partition table on hw partition 0 then the code will terminate and return error even if the desired hw partition contains a perfectly fine partition table. This fix updates the partition table struct to correspond to the specified hw partition before testing if the partition table is valid or not.
--- disk/part.c | 8 ++++++++ 1 file changed, 8 insertions(+)
disk/part.c +8 -0
@@ -493,6 +493,14 @@ int get_device(const char *ifname, const char *dev_hwpart_str, goto cleanup; } +/* +* Updates the partition table for the specified hw partition. +* Does not need to be done for hwpart 0 since it is default and +* already loaded. +*/ +if (hwpart !=0 ) +init_part (*dev_desc); + cleanup:free (dup_str);return dev;
Signature · 1 line
2.5.0
PATCH 1/1 mmc: emmc and hw partitions partition table id bugfix.
Quoted 10 lines · Erik Tideman
On bootup the emmc's hw partition is always set to 0 and the partition table is read from it. When switching to another hw partition the partition table's id is not updated but instead the old one from hw partition 0 is used. If there is no partition table on hw partition 0 then the code will terminate and return error even if the desired hw partition contains a perfectly fine partition table. This fix updates the partition table struct to correspond to the specified hw partition before testing if the partition table is valid or not.
Signed-off-by Erik Tideman <[email protected]>
But can you please post a v2 with whitespace that matches the rest of the file? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160114/1427016e/attachment.sig>