]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
greybus: gb-beagleplay: propagate hdlc_tx_frames() errors to callers
authorWeigang He <geoffreyhe2@gmail.com>
Mon, 30 Mar 2026 12:08:01 +0000 (12:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 13:55:05 +0000 (15:55 +0200)
commit58fa2357f5b5eb3a394571dd2fee6c6a1db242c3
tree882f4e6ec696b3b6014282daad145ae89c218970
parent6b526dca0966f2370835765019a54319b78fca8d
greybus: gb-beagleplay: propagate hdlc_tx_frames() errors to callers

Now that hdlc_tx_frames() can drop frames when the circular buffer is
full, make the failure visible to callers:

 - Change hdlc_tx_frames() return type from void to int (-EAGAIN on
   buffer full).
 - Change gb_beagleplay_start_svc() / gb_beagleplay_stop_svc() to
   return int so probe and firmware-upload paths can detect failures.
 - gb_message_send(): propagate the error so the greybus core can
   handle the transport failure.
 - hdlc_tx_s_frame_ack(): log with dev_warn_ratelimited on failure
   (ACK loss is recoverable by HDLC retransmission).
 - Probe path: propagate start_svc failure via new free_greybus label.
 - Firmware upload paths: return FW_UPLOAD_ERR_RW_ERROR when SVC
   restart fails instead of silently continuing.
 - Remove path: best-effort stop_svc, ignore failure.

Cc: Ayush Singh <ayushdevel1325@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Weigang He <geoffreyhe2@gmail.com>
Link: https://patch.msgid.link/20260330120801.981506-2-geoffreyhe2@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/greybus/gb-beagleplay.c