[PATCH v1] drivers: scsi: fix inaccurate block count reporting in scsi operations

Tom Rini trini at konsulko.com
Fri Aug 8 00:34:17 CEST 2025


On Mon, 28 Jul 2025 21:51:05 +0530, Balaji Selvanathan wrote:

> The 'blks' variable in scsi_read/write/erase functions is updated
> regardless of pass/fail of the scsi operation . If the scsi operation
> fails, 'blkcnt' is updated using an incorrect value of 'blks'. This
> wrong 'blkcnt' is returned to the caller and it assumes all blocks were
> processed correctly.
> 
> Fix this by updating the 'blks' variable only if the scsi operation
> succeeds.
> 
> [...]

Applied to u-boot/master, thanks!

[1/1] drivers: scsi: fix inaccurate block count reporting in scsi operations
      commit: b32dda34506b4f486bc803d0c7251f987edd2455
-- 
Tom




More information about the U-Boot mailing list