Re: [PATCH] cmd: gpt: initialize partition table
Yes, You are right I observed the issue in MMC device, device required reboot after writing partitions. I have checked the fix is required for all the blk device's not just mmc device. I have updated the changes in v2. Thanks, Kishan From: Tom Rini Sent: Monday, April 22, 2024 11:14:47 PM To: Kishan Dudhatra Cc: u-boot@lists.denx.de Subject: Re: [PATCH] cmd: gpt: initialize partition table CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
[PATCH v2] cmd: gpt: initialize partition table
Change in v2: - Fix applies to all block devices, not just MMC. If partition init is not completed within the gpt write, the gpt partition list will not be updated. Signed-off-by: Kishan Dudhatra diff --git a/cmd/gpt.c b/cmd/gpt.c index d7e96529a6..7aaf1889a5 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -643,6 +643,10 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part) free(str_disk_guid); free(partitions); + /* initialize partition table */ + if (blk_enabled()) + part_init(blk_dev_desc); + return ret; } -- 2.34.1
[PATCH] cmd: gpt: initialize partition table
If partition init is not completed within the gpt write, the gpt partition list will not be updated. Signed-off-by: Kishan Dudhatra diff --git a/cmd/gpt.c b/cmd/gpt.c index d7e96529a6..2d652f480a 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -643,6 +643,10 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part) free(str_disk_guid); free(partitions); + /* initialize partition table */ + if ((blk_dev_desc)->uclass_id == UCLASS_MMC) + part_init(blk_dev_desc); + return ret; } -- 2.34.1