Skip to content

ALSA: firewire: Abort transactions on a bus reset

Suyuan Wang b4-sent linux-sound lkml 1 version Applied

Status from this message: Applied both patches now. Thanks.

Get series with b4
b4 am [email protected] change-id 20261122-firewire-busreset-733f85d4fb22

Versions newest first

  1. v2 Latest2 patches 2 repliesApplied

Changes in v2 from the cover letter

- Abort the transaction and return -EAGAIN on a bus reset instead of rearming it and resending (Takashi).
- Drop ERROR_DELAY_MS (and <linux/delay.h> in fcp.c), now unused.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2ALSA: firewire-lib: Abort the FCP transaction on a bus resetsound/firewire/fcp.c+2 -30 replies
2/2ALSA: fireworks: Abort the transaction on a bus resetsound/firewire/fireworks/fireworks_transaction.c+2 -20 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTakashi Sakamoto
SeriesR-b
1/2
2/2

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

Read the v2 thread

Cover letter [PATCH v2 0/2] ALSA: firewire: Abort transactions on a bus reset

fcp_avc_transaction() and snd_efw_transaction_run() resend their command after a bus reset but never move the transaction back to STATE_PENDING, so both loops keep resending without a retry limit until sending fails.

As Takashi suggested, v2 no longer resends: on a bus reset the transaction is ended and -EAGAIN is returned, following the AV/C general specification, which says that a target discards any transaction in progress on a bus reset.

Found with a static analysis tool and checked by hand. Compile tested only (x86_64, W=1); I don't have FireWire audio hardware.

Changes in v2:
- Abort the transaction and return -EAGAIN on a bus reset instead of rearming it and resending (Takashi).
- Drop ERROR_DELAY_MS (and <linux/delay.h> in fcp.c), now unused.

v1: https://lore.kernel.org/all/[email protected]/
---
Suyuan Wang (2):
ALSA: firewire-lib: Abort the FCP transaction on a bus reset
ALSA: fireworks: Abort the transaction on a bus reset

 sound/firewire/fcp.c                             | 5 ++---
 sound/firewire/fireworks/fireworks_transaction.c | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)