From: Roman Stratiienko Date: Wed, 27 Jan 2021 17:40:16 +0200 Subject: [PATCH] fastboot: reinit partition after storing GPT or MBR Message-ID: <20210127154016.321810-1-r.stratiienko@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In case MMC has MBR system and fastboot writes GPT, MMC is still recognized as MBR. Invoke part_init() to purge cached data and update information about partition table type. Signed-off-by: Roman Stratiienko --- CC: Lukasz Majewski , CC: Patrick Delaunay , CC: Fabien Parent , CC: Filip Brozovic , CC: Lokesh Vutla , CC: Marek Szyprowski , CC: Mingming lee , CC: Roman Kovalivskyi , CC: Sam Protsenko , CC: Simon Glass , --- drivers/fastboot/fb_mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 4e26cef9417..0ad11600ef6 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -493,6 +493,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer, response); return; } + part_init(dev_desc); printf("........ success\n"); fastboot_okay(NULL, response); return; @@ -514,6 +515,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer, response); return; } + part_init(dev_desc); printf("........ success\n"); fastboot_okay(NULL, response); return; -- 2.27.0