]> git.baikalelectronics.ru Git - uboot.git/commit
ide: Correct LBA setting
authorSimon Glass <sjg@chromium.org>
Tue, 25 Apr 2023 16:54:51 +0000 (10:54 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 27 Apr 2023 17:51:07 +0000 (13:51 -0400)
commit2dc6048be7622517e448cd4c39b18c005be20c09
tree0954975e55a10550a7e4cec41e53f9d53d1acced
parent773ede4f4513e25c7f3d001c2c0d46f6646eadfa
ide: Correct LBA setting

Fix a longstanding bug where the LBA is calculated as the size of the
media instead of the number of blocks. This was perhaps not noticed
earlier since it prints the correct value first, before setting the wrong
value.

Drop the unnecessary blksz variable while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 925530b1a04 ("block: ide: Fix block read/write with driver model")
drivers/block/ide.c