mbox series

[0/6] staging: vchiq_core: bulk xfer killable() completions

Message ID 20240918163100.870596-1-umang.jain@ideasonboard.com (mailing list archive)
Headers show
Series staging: vchiq_core: bulk xfer killable() completions | expand

Message

Umang Jain Sept. 18, 2024, 4:30 p.m. UTC
This series intends to fix the variations of events completions
on bulk transfers and message queuing code paths.

Patch 1/6 explains in details how we ended up having
wait_for_completion_interruptible() in vchiq_core.
A high level sequence of commit changes is explained in the
commit message. Each commit/link mentioned is referenced in
the commit message, to provide adequate context to the reviewer.

Patch 2/6 makes sure we acknowledge and return all errors on
queue_message(), instead of just -EAGAIN.

Patch 3/6 and 4/6 align the return values on interruption,
according to what kernel's mutex_killable() and
wait_for_completion_killable() would return (i.e. -EINTR)

Patch 5/6 and 6/6 drops the retry loop on -EINTR.

Testing:
- Tested audio playback with bcm2835-audio (uses vchiq_queue_kernel_message())
- vchiq_test -p (ping test)
- vchiq_test -f 10 (functional test)
- vchiq_test -b <size> (bulk test)

No regressions observed.

Umang Jain (6):
  staging: vchiq_core: Use killable wait completions for bulk transfers
  staging: vchiq_core: Return on all errors from queue_message()
  staging: vchiq_core: Return -EINTR in queue_message() on interrupt
  staging: vchiq_core: Return -EINTR when bulk transfers are interrupted
  staging: vchiq_arm: Do not retry bulk transfers on -EINTR
  staging: vchiq_core: Drop retry loop on -EINTR

 .../interface/vchiq_arm/vchiq_arm.c           |  81 +++++---------
 .../interface/vchiq_arm/vchiq_core.c          | 105 ++++++++----------
 .../interface/vchiq_arm/vchiq_core.h          |  18 +--
 .../interface/vchiq_arm/vchiq_dev.c           |  14 +--
 4 files changed, 89 insertions(+), 129 deletions(-)