[PATCH] greybus: gb-beagleplay: Pass jiffies to serdev_device_wait_until_sent()

From: Tomasz Unger

Date: Wed Dec 02 2026 - 18:45:56 EST


cc1352_prepare() passes CC1352_BOOTLOADER_TIMEOUT (2000, meant as
milliseconds) directly to serdev_device_wait_until_sent(), which takes
the timeout in jiffies. With HZ=250, as on the BeaglePlay, it waits up
to 8 seconds instead of 2.

Convert it with msecs_to_jiffies(), as the other users of this constant
in the driver already do.

Fixes: 0cf7befa3ea2 ("greybus: gb-beagleplay: Add firmware upload API")
Signed-off-by: Tomasz Unger <tomasz.unger@xxxxxxxx>
---
Verified on a BeaglePlay (HZ=250) with a kprobe on tty_wait_until_sent()
while re-uploading the image already in the CC1352 (the driver skips
reflashing): the timeout passed from cc1352_prepare() is 2000 without
this patch and 500 with it. The arm64 object code differs only in that
constant (#0x7d0 -> #0x1f4).

An AI coding assistant (Claude) helped find the bug and draft the fix;
the change was tested as described above.
---
drivers/greybus/gb-beagleplay.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c
index 13cbd8c5e9d4..22bdfc8e5f4b 100644
--- a/drivers/greybus/gb-beagleplay.c
+++ b/drivers/greybus/gb-beagleplay.c
@@ -978,7 +978,8 @@ static enum fw_upload_err cc1352_prepare(struct fw_upload *fw_upload,
msleep(200);
flush_work(&bg->tx_work);

- serdev_device_wait_until_sent(bg->sd, CC1352_BOOTLOADER_TIMEOUT);
+ serdev_device_wait_until_sent(bg->sd,
+ msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));

WRITE_ONCE(bg->flashing_mode, true);


---
base-commit: 4f6f0ad4a3322d445ac6cc8bba32cc35b4372a4a
change-id: 20261203-gb-beagleplay-wait-until-sent-jiffies-c4fc8dc89a7d

Best regards,
--
Tomasz Unger <tomasz.unger@xxxxxxxx>