[U-Boot] [PATCH] blk: dm: make blk_create_device() take a number of block instead of a size
Simon Glass
sjg at chromium.org
Mon Jun 12 23:51:01 UTC 2017
On 9 June 2017 at 08:45, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
> There is an overflow problem when taking the size instead of the number
> of blocks in blk_create_device(). This results in a wrong device size: the
> device apparent size is its real size modulo 4GB.
> Using the number of blocks instead of the device size fixes the problem and
> is more coherent with the internals of the block layer.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
> ---
> common/scsi.c | 2 +-
> drivers/block/blk-uclass.c | 8 ++++----
> drivers/block/sandbox.c | 2 +-
> include/blk.h | 8 ++++----
> test/dm/blk.c | 6 +++---
> 5 files changed, 13 insertions(+), 13 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list