Sugar Zhang d2c81f797c dmaengine: rockchip-dma: Fix overflow in get_bytes_xfered calculation
The transferred bytes are calculated by subtracting first_lli.base from
current position (cur_pos). However, cur_pos remains 0 until the first
burst transfer completes, which could result in a negative value.
This leads to incorrect byte count reporting.

Fix the overflow by clamping the calculated bytes to 0 when negative,
ensuring the reported transfer position matches hardware state before
the first burst completion.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie9d14f514d2ebfe068b535b2f9892b319cb8a41b
2025-04-30 09:36:37 +08:00
2025-01-25 10:26:37 +08:00
2025-01-10 17:48:57 +08:00
2025-01-10 17:48:57 +08:00
2025-01-25 10:26:37 +08:00
2025-01-10 17:48:57 +08:00
2024-11-17 15:07:22 +01:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%