diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-10-25 12:15:31 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-10-30 17:49:40 +0100 |
commit | ee5041451e467711b9a4b0e679ba9cc18d93400e (patch) | |
tree | 72a66323f3cef3bf634d35d5cfc3089dd402ff81 /drivers/block | |
parent | ffc379b42c85466e1dd4c8fee8268801f26d2ab8 (diff) | |
download | u-boot-ee5041451e467711b9a4b0e679ba9cc18d93400e.zip u-boot-ee5041451e467711b9a4b0e679ba9cc18d93400e.tar.gz u-boot-ee5041451e467711b9a4b0e679ba9cc18d93400e.tar.bz2 |
blk: set log2blksz in blk_create_device()
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.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/blk-uclass.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index e8f58b3..ca8978f 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; |