Hi Heinrich,

On Fri, 25 Oct 2019 at 04:15, Heinrich Schuchardt <xypron.g...@gmx.de> wrote:
>
> The ext4 file system requires log2blksz to be set. So when setting the
> block size on the block descriptor we should fill this field too.
>
> This fixes a problem with EFI block devices providing ext4 partitions, cf.
> https://lists.denx.de/pipermail/u-boot/2019-October/387702.html.
>
> Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
> ---
>  drivers/block/blk-uclass.c | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Simon Glass <s...@chromium.org>

But I wonder if blk_create_device() should change to take log2blksz as
its parameter and calculate blksz?


> diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
> index e8f58b3f5e..ca8978f0e1 100644
> --- a/drivers/block/blk-uclass.c
> +++ b/drivers/block/blk-uclass.c
> @@ -580,6 +580,7 @@ int blk_create_device(struct udevice *parent, const char 
> *drv_name,
>         desc = dev_get_uclass_platdata(dev);
>         desc->if_type = if_type;
>         desc->blksz = blksz;
> +       desc->log2blksz = LOG2(desc->blksz);
>         desc->lba = lba;
>         desc->part_type = PART_TYPE_UNKNOWN;
>         desc->bdev = dev;
> --
> 2.23.0
>

Regards,
Simon
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to