Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
Hi Igor, On mar., févr. 13, 2024 at 12:19, Igor Opaniuk wrote: > Hi Mattijs, > > On Tue, Feb 13, 2024 at 9:13 AM Mattijs Korpershoek > wrote: >> >> Hi Igor, >> >> On lun., févr. 12, 2024 at 09:05, Igor Opaniuk >> wrote: >> >> > Hi Dan, >> > >> > On Mon, Feb 12, 2024 at 8:05 AM Dan Carpenter >> > wrote: >> >> >> >> On Fri, Feb 09, 2024 at 08:20:39PM +0100, Igor Opaniuk wrote: >> >> > From: Igor Opaniuk >> >> > >> >> > mmc_switch_part() is used for switching between hw partitions >> >> > on eMMC (boot0, boot1, user, rpmb). >> >> > There is no need to do that for SD card. >> >> > >> >> >> >> Is this a clean up or a bugfix? What are the visible effects for the >> >> user? >> > avb cmd fails for SD cards, as mmc_switch_part() fails after trying to >> > access >> > EXT_CSD register, which obviously is not available. >> >> Does this means that we only need this patch to fix AVB commands when >> booting from SD cards? >> >> If yes, I propose adding the following note to the commit message: >> >> "This fixes the avb command usage on on SD cards." >> >> If you agree, I can do this while applying. > Yes, could you please add to the commit message so I don't > send v3 for that (if there are no any additional objections/comments) There are no additional objections, comments on my end. I will add this to the commit message when applying. > > Thanks >> >> If not, we can keep the message as is. >> >> >> >> >> regards, >> >> dan carpenter >> >> >> > >> > >> > -- >> > Best regards - Atentamente - Meilleures salutations >> > >> > Igor Opaniuk >> > >> > mailto: igor.opan...@gmail.com >> > skype: igor.opanyuk >> > http://ua.linkedin.com/in/iopaniuk > > > > -- > Best regards - Atentamente - Meilleures salutations > > Igor Opaniuk > > mailto: igor.opan...@gmail.com > skype: igor.opanyuk > http://ua.linkedin.com/in/iopaniuk
Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
Hi Mattijs, On Tue, Feb 13, 2024 at 9:13 AM Mattijs Korpershoek wrote: > > Hi Igor, > > On lun., févr. 12, 2024 at 09:05, Igor Opaniuk wrote: > > > Hi Dan, > > > > On Mon, Feb 12, 2024 at 8:05 AM Dan Carpenter > > wrote: > >> > >> On Fri, Feb 09, 2024 at 08:20:39PM +0100, Igor Opaniuk wrote: > >> > From: Igor Opaniuk > >> > > >> > mmc_switch_part() is used for switching between hw partitions > >> > on eMMC (boot0, boot1, user, rpmb). > >> > There is no need to do that for SD card. > >> > > >> > >> Is this a clean up or a bugfix? What are the visible effects for the > >> user? > > avb cmd fails for SD cards, as mmc_switch_part() fails after trying to > > access > > EXT_CSD register, which obviously is not available. > > Does this means that we only need this patch to fix AVB commands when > booting from SD cards? > > If yes, I propose adding the following note to the commit message: > > "This fixes the avb command usage on on SD cards." > > If you agree, I can do this while applying. Yes, could you please add to the commit message so I don't send v3 for that (if there are no any additional objections/comments) Thanks > > If not, we can keep the message as is. > > >> > >> regards, > >> dan carpenter > >> > > > > > > -- > > Best regards - Atentamente - Meilleures salutations > > > > Igor Opaniuk > > > > mailto: igor.opan...@gmail.com > > skype: igor.opanyuk > > http://ua.linkedin.com/in/iopaniuk -- Best regards - Atentamente - Meilleures salutations Igor Opaniuk mailto: igor.opan...@gmail.com skype: igor.opanyuk http://ua.linkedin.com/in/iopaniuk
Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
Hi Igor, On lun., févr. 12, 2024 at 09:05, Igor Opaniuk wrote: > Hi Dan, > > On Mon, Feb 12, 2024 at 8:05 AM Dan Carpenter > wrote: >> >> On Fri, Feb 09, 2024 at 08:20:39PM +0100, Igor Opaniuk wrote: >> > From: Igor Opaniuk >> > >> > mmc_switch_part() is used for switching between hw partitions >> > on eMMC (boot0, boot1, user, rpmb). >> > There is no need to do that for SD card. >> > >> >> Is this a clean up or a bugfix? What are the visible effects for the >> user? > avb cmd fails for SD cards, as mmc_switch_part() fails after trying to access > EXT_CSD register, which obviously is not available. Does this means that we only need this patch to fix AVB commands when booting from SD cards? If yes, I propose adding the following note to the commit message: "This fixes the avb command usage on on SD cards." If you agree, I can do this while applying. If not, we can keep the message as is. >> >> regards, >> dan carpenter >> > > > -- > Best regards - Atentamente - Meilleures salutations > > Igor Opaniuk > > mailto: igor.opan...@gmail.com > skype: igor.opanyuk > http://ua.linkedin.com/in/iopaniuk
Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
Hi Dan, On Mon, Feb 12, 2024 at 8:05 AM Dan Carpenter wrote: > > On Fri, Feb 09, 2024 at 08:20:39PM +0100, Igor Opaniuk wrote: > > From: Igor Opaniuk > > > > mmc_switch_part() is used for switching between hw partitions > > on eMMC (boot0, boot1, user, rpmb). > > There is no need to do that for SD card. > > > > Is this a clean up or a bugfix? What are the visible effects for the > user? avb cmd fails for SD cards, as mmc_switch_part() fails after trying to access EXT_CSD register, which obviously is not available. > > regards, > dan carpenter > -- Best regards - Atentamente - Meilleures salutations Igor Opaniuk mailto: igor.opan...@gmail.com skype: igor.opanyuk http://ua.linkedin.com/in/iopaniuk
Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
On Fri, Feb 09, 2024 at 08:20:39PM +0100, Igor Opaniuk wrote: > From: Igor Opaniuk > > mmc_switch_part() is used for switching between hw partitions > on eMMC (boot0, boot1, user, rpmb). > There is no need to do that for SD card. > Is this a clean up or a bugfix? What are the visible effects for the user? regards, dan carpenter
Re: [PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
On 2024-02-09 20:20, Igor Opaniuk wrote: From: Igor Opaniuk mmc_switch_part() is used for switching between hw partitions on eMMC (boot0, boot1, user, rpmb). There is no need to do that for SD card. Reviewed-by: Mattijs Korpershoek Signed-off-by: Igor Opaniuk Looking good to me. Reviewed-by: Dragan Simic --- Changes in v2: - Mattijs Korpershoek R-b tag applied common/avb_verify.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index 48ba8db51e5..59f2c25e0de 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -358,9 +358,11 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition) goto err; } - ret = mmc_switch_part(part->mmc, part_num); - if (ret) - goto err; + if (IS_MMC(part->mmc)) { + ret = mmc_switch_part(part->mmc, part_num); + if (ret) + goto err; + } mmc_blk = mmc_get_blk_desc(part->mmc); if (!mmc_blk) {
[PATCH v2 1/7] common: avb_verify: don't call mmc_switch_part for SD
From: Igor Opaniuk mmc_switch_part() is used for switching between hw partitions on eMMC (boot0, boot1, user, rpmb). There is no need to do that for SD card. Reviewed-by: Mattijs Korpershoek Signed-off-by: Igor Opaniuk --- Changes in v2: - Mattijs Korpershoek R-b tag applied common/avb_verify.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index 48ba8db51e5..59f2c25e0de 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -358,9 +358,11 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition) goto err; } - ret = mmc_switch_part(part->mmc, part_num); - if (ret) - goto err; + if (IS_MMC(part->mmc)) { + ret = mmc_switch_part(part->mmc, part_num); + if (ret) + goto err; + } mmc_blk = mmc_get_blk_desc(part->mmc); if (!mmc_blk) { -- 2.34.1