From adb5daf0905a190375e46d59f1244b13c3cdc640 Mon Sep 17 00:00:00 2001 From: Roman Stratiienko Date: Wed, 27 Jan 2021 17:40:16 +0200 Subject: [PATCH] fastboot: reinit partition after storing GPT or MBR 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 --- 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 611074a3e4..50532acb84 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -504,6 +504,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; @@ -525,6 +526,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.39.5