All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] soundwire: Fixes for spurious and missing UNATTACH
@ 2022-09-14 16:02 ` Richard Fitzgerald
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Fitzgerald @ 2022-09-14 16:02 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale
  Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

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(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-09-20  5:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 16:02 [PATCH v4 0/5] soundwire: Fixes for spurious and missing UNATTACH Richard Fitzgerald
2022-09-14 16:02 ` Richard Fitzgerald
2022-09-14 16:02 ` [PATCH v4 1/5] soundwire: cadence: fix updating slave status when a bus has multiple peripherals Richard Fitzgerald
2022-09-14 16:02   ` Richard Fitzgerald
2022-09-14 16:02 ` [PATCH v4 2/5] soundwire: bus: Don't lose unattach notifications Richard Fitzgerald
2022-09-14 16:02   ` Richard Fitzgerald
2022-09-14 16:02 ` [PATCH v4 3/5] soundwire: bus: Don't re-enumerate before status is UNATTACHED Richard Fitzgerald
2022-09-14 16:02   ` Richard Fitzgerald
2022-09-14 16:02 ` [PATCH v4 4/5] soundwire: cadence: Fix lost ATTACHED interrupts when enumerating Richard Fitzgerald
2022-09-14 16:02   ` Richard Fitzgerald
2022-09-14 16:02 ` [PATCH v4 5/5] soundwire: bus: Don't exit early if no device IDs were programmed Richard Fitzgerald
2022-09-14 16:02   ` Richard Fitzgerald
2022-09-20  4:59 ` [PATCH v4 0/5] soundwire: Fixes for spurious and missing UNATTACH Vinod Koul
2022-09-20  4:59   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.