* [PATCH] staging: vc04_services: preserve bcm2835_audio_write errors
@ 2026-08-03 4:09 Lucas Jeffrey
2026-09-01 9:40 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Lucas Jeffrey @ 2026-08-03 4:09 UTC (permalink / raw)
To: gregkh
Cc: florian.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
linux-staging, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
Lucas Jeffrey
When sending audio data in multiple packets, a successful later packet
could overwrite an earlier failure in status. This caused the function
to report success even if one packet was not queued.
Stop sending packets after the first failure to preserve the error.
Signed-off-by: Lucas Jeffrey <luquijeffrey@gmail.com>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
index 3156cb8392f4..5ac23cfa7983 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
@@ -365,6 +365,9 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
status = vchiq_queue_kernel_message(vchiq_instance,
instance->service_handle, src, bytes);
+ if (status)
+ break;
+
src += bytes;
count -= bytes;
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: vc04_services: preserve bcm2835_audio_write errors
2026-08-03 4:09 [PATCH] staging: vc04_services: preserve bcm2835_audio_write errors Lucas Jeffrey
@ 2026-09-01 9:40 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2026-09-01 9:40 UTC (permalink / raw)
To: Lucas Jeffrey
Cc: florian.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
linux-staging, linux-rpi-kernel, linux-arm-kernel, linux-kernel
On Mon, Aug 03, 2026 at 01:09:28AM -0300, Lucas Jeffrey wrote:
> When sending audio data in multiple packets, a successful later packet
> could overwrite an earlier failure in status. This caused the function
> to report success even if one packet was not queued.
>
> Stop sending packets after the first failure to preserve the error.
>
> Signed-off-by: Lucas Jeffrey <luquijeffrey@gmail.com>
> ---
> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> index 3156cb8392f4..5ac23cfa7983 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> @@ -365,6 +365,9 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
>
> status = vchiq_queue_kernel_message(vchiq_instance,
> instance->service_handle, src, bytes);
> + if (status)
> + break;
> +
> src += bytes;
> count -= bytes;
> }
> --
> 2.43.0
>
>
Was this tested on the real hardware?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-01 9:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 4:09 [PATCH] staging: vc04_services: preserve bcm2835_audio_write errors Lucas Jeffrey
2026-09-01 9:40 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®