On Sun, Jun 07, 2026 at 09:06:31PM +0530, Naveen Kumar Chaudhary wrote:
> The DM serial framework in __serial_getc() and __serial_putc() already
> retries when driver ops return -EAGAIN, calling schedule() between
> attempts to service the watchdog.
> 
> sifive_serial_getc() and sifive_serial_putc() spin internally on
> -EAGAIN, which prevents the framework from calling schedule(). This can
> lead to watchdog timeouts when waiting for RX data or TX FIFO space.
> 
> Remove the busy-loops and return -EAGAIN directly from the underlying
> helpers, letting the framework handle retries with proper watchdog
> servicing. This is consistent with how other DM serial drivers (pl01x,
> meson, cortina, etc.) implement their ops.
> 
> Signed-off-by: Naveen Kumar Chaudhary <[email protected]>
> ---
>  drivers/serial/serial_sifive.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)

Applied to u-boot-riscv/main, thanks.

Reviewed-by: Leo Yu-Chi Liang <[email protected]>

Best regards,
Leo

Reply via email to