[PATCH 2/2] efi_loader: fill media_id from block device descriptor

Simon Glass sjg at chromium.org
Sun Sep 25 16:15:36 CEST 2022


Hi,

On Fri, 23 Sept 2022 at 01:08, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> On Thu, 15 Sept 2022 at 23:02, Heinrich Schuchardt
> <heinrich.schuchardt at canonical.com> wrote:
> >
> > Fill the media ID in the block IO protocol from the block device descriptor
> > of the driver model.
> >
> > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> > ---
> >  lib/efi_loader/efi_disk.c | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
> > index 73745ccaa0..35790aa86d 100644
> > --- a/lib/efi_loader/efi_disk.c
> > +++ b/lib/efi_loader/efi_disk.c
> > @@ -476,11 +476,7 @@ static efi_status_t efi_disk_add_dev(
> >         /* Fill in EFI IO Media info (for read/write callbacks) */
> >         diskobj->media.removable_media = desc->removable;
> >         diskobj->media.media_present = 1;
> > -       /*
> > -        * MediaID is just an arbitrary counter.
> > -        * We have to change it if the medium is removed or changed.
> > -        */
> > -       diskobj->media.media_id = 1;
> > +       diskobj->media.media_id = desc->media_id;
> >         diskobj->media.block_size = desc->blksz;
> >         diskobj->media.io_align = desc->blksz;
> >         if (part)
> > --
> > 2.37.2
> >
>
> Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

Still a NAK from me as we should not add this to the desc thing.

Ilias, we talked about getting the next step going for integrating EFI
properly with driver model, which should sort this out.

Regards,
SImon


More information about the U-Boot mailing list