From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: shyckless@gmail.com
Cc: tiwai@suse.com, linux-sound@vger.kernel.org, perex@perex.cz,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] ALSA: firewire: Don't loop forever after a bus reset
Date: Sun, 22 Nov 2026 22:17:51 +0900 [thread overview]
Message-ID: <20261122131751.GA503983@sakamocchi.jp> (raw)
In-Reply-To: <20261120-firewire-busreset-v1-0-8bb9079a2984@gmail.com>
Hi,
Thanks for the patch.
On Fri, Nov 20, 2026 at 05:38:04AM +0000, Suyuan Wang via B4 Relay wrote:
> fcp_avc_transaction() and snd_efw_transaction_run() resend their
> command after a bus reset but never move the transaction back to
> STATE_PENDING. The response to the resent command is then ignored and
> the wait returns immediately, so both loops keep resending the command
> after each ERROR_DELAY_MS pause, without a retry limit, until sending
> fails.
>
> Each patch sets the state back to STATE_PENDING before resending.
>
> Found with a static analysis tool and checked by hand. Compile tested
> only (x86_64, W=1); I don't have FireWire audio hardware.
>
> ---
> Suyuan Wang (2):
> ALSA: firewire-lib: Rearm the FCP transaction after a bus reset
> ALSA: fireworks: Rearm the transaction after a bus reset
>
> sound/firewire/fcp.c | 2 ++
> sound/firewire/fireworks/fireworks_transaction.c | 2 ++
> 2 files changed, 4 insertions(+)
I had a look at IEC 61883-1, but it does not specify any particular
requirements for handling bus resets during an FCP transaction.
However, I found the following statement in `AV/C Digital Interface
Command Set General Specification Version 4.2 (1394 Trading Association,
2004. Document number 200406)`:
* If the target detects a Serial Bus reset, it shall reset its state to
be able to accept AV/C command frames. In this case, any in progress
AV/C transactions shall be discarded without the return of a response
frame.
Although the function that issues fcp_avc_transaction() acts as a peer of
the target, I think it would be safer to abort any pending transactions
as well when a bus reset is detected. Since the bus reset would initialize
the part of device state, the initiator should also restart the entire
transaction sequence.
I would expect Echo Audio's Fireworks transactions to follow the behavior
described in the above specification, since Fireworks also supports some
AV/C commands
Could you revise the patch to abort any pending transactions when a bus
reset is detected? Returning -EAGAIN to the callers would be reasonable
in this case.
Thanks
Takashi Sakamoto
prev parent reply other threads:[~2026-11-22 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 5:38 Suyuan Wang via B4 Relay
2026-11-20 5:38 ` [PATCH 1/2] ALSA: firewire-lib: Rearm the FCP transaction " Suyuan Wang via B4 Relay
2026-11-20 5:38 ` [PATCH 2/2] ALSA: fireworks: Rearm the " Suyuan Wang via B4 Relay
2026-11-22 13:17 ` Takashi Sakamoto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261122131751.GA503983@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shyckless@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®