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

Tony Dinh mibodhi at gmail.com
Mon Dec 22 07:38:00 CET 2025


Hi Balaji,

On Sun, Dec 21, 2025 at 8:31 PM Balaji Selvanathan
<balaji.selvanathan at oss.qualcomm.com> wrote:
>
>
> On 12/20/2025 2:47 AM, Tony Dinh wrote:
> > Hi Balaji,
> >
> > On Fri, Dec 19, 2025 at 8:29 AM Tom Rini <trini at konsulko.com> wrote:
> >> On Fri, Dec 19, 2025 at 11:04:07AM +0530, Balaji Selvanathan wrote:
> >>> Hi Tom,
> >>>
> >>> Apologies for late reply. Somehow missed the mail.
> >>>
> >>> Upon analysis, it seems the most likely root cause is Tony's 238GB disk
> >>> triggers the CONFIG_SYS_64BIT_LBA code path in scsi_read function. Any read
> >>> beyond block 268,435,455 blocks enters this path.
> >>>
> >>> 'blks' is decremented both inside the 64-bit LBA block AND after successful
> >>> scsi_exec(), causing incorrect block count tracking and (most likely) the
> >>> data abort observed.
> >>>
> >>> The fix is to remove 'blks -= blocks;' from inside the CONFIG_SYS_64BIT_LBA
> >>> block in scsi_read() function.
> >>>
> >>> Hi Tony, can you please check with this change?
> >>>
> >>> Tom, shall I raise a new patch for this now?
> >> Thanks for looking in to this now. Yes, please post a proper patch for
> >> it so Tony can test and add a Tested-by if it works, that'll make
> >> pulling to master before release easiest.
> > FYI, I will be traveling a week from now. So it would be best if you
> > can send the patch in the next couple days. Otherwise, someone else
> > needs to do the test in time for the Jan 05 release.
>
> Hi Tony,
>
> Have posted patch for this:
> https://lore.kernel.org/u-boot/20251222042533.2024310-1-balaji.selvanathan@oss.qualcomm.com/
>
> Request you to add Tested-by acknowledgement.

Could you also send this patch to my email so I can reply and add Tested-by?

All the best,
Tony

>
> Regards,
>
> Balaji
>
> >
> > All the best,
> > Tony
> >
> >> --
> >> Tom


More information about the U-Boot mailing list