Skip to content

soundwire: Fixes for spurious and missing UNATTACH

Richard Fitzgerald alsa-devel lkml 4 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 1 replyApplied
  2. v35 patches 4 repliesSuperseded
  3. v25 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches8 repliesSuperseded

Changes in v4 from the cover letter

Fixed minor comment typo in patch #4.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5soundwire: cadence: fix updating slave status when a bus has multiple peripheralsdrivers/soundwire/cadence_master.c+25 -320 replies
2/5soundwire: bus: Don't lose unattach notificationsdrivers/soundwire/bus.c+5 -00 replies
3/5soundwire: bus: Don't re-enumerate before status is UNATTACHEDdrivers/soundwire/bus.c+10 -00 replies
4/5soundwire: cadence: Fix lost ATTACHED interrupts when enumeratingdrivers/soundwire/cadence_master.c+19 -40 replies
5/5soundwire: bus: Don't exit early if no device IDs were programmeddrivers/soundwire/bus.c+21 -80 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchPierre-Louis Bossart
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] soundwire: Fixes for spurious and missing UNATTACH

The bus and cadence code has several bugs that cause UNATTACH notifications to either be sent spuriously or to be missed.

These can be seen occasionally with a single peripheral on the bus, but are much more frequent with multiple peripherals, where several peripherals could change state and report in consecutive PINGs.

The root of all of these bugs seems to be a code design flaw that assumed every PING status change would be handled separately. However, PINGs are handled by a workqueue function and there is no guarantee when that function will be scheduled to run or how much CPU time it will receive. PINGs will continue while the work function is handling a snapshot of a previous PING so the code must take account that (a) status could change during the work function and (b) there can be a backlog of changes before the IRQ work function runs again.

Tested with 4 peripherals on 1 bus, and 8 peripherals on 2 buses.

CHANGES SINCE V3:
Fixed minor comment typo in patch #4.

Richard Fitzgerald (4):
soundwire: bus: Don't lose unattach notifications
soundwire: bus: Don't re-enumerate before status is UNATTACHED
soundwire: cadence: Fix lost ATTACHED interrupts when enumerating
soundwire: bus: Don't exit early if no device IDs were programmed

Simon Trimmer (1):
soundwire: cadence: fix updating slave status when a bus has multiple
peripherals

 drivers/soundwire/bus.c            | 44 +++++++++++++---
 drivers/soundwire/cadence_master.c | 80 ++++++++++++++++--------------
 2 files changed, 80 insertions(+), 44 deletions(-)
Signature · 1 line
2.30.2