From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384184; b=CCyoLstPbiAGdgWhCdkZnSXxQJdTDmbCjJuxHP+qJgtM6a/Zoa8yHKpw2o7ngVvjbowJ gPpdv0WtvfKTZ/pFwRmNkrWbq7sA1pBfdVu5FDbrgzReeAK6kWBBe8Y7G/Oe6H+66/6Iw 0/qboFQX47AQdYXnxlg5U0OfAhX7IebhaF8Z2EboWOKyR+GFbJcCvCgZRiYbR2FUPoSQF 0ZgZdyrGajY2S2fPVYk/fOMBYkKonueft829XZY6BCBSKAxP+EBKaP+W5ZZiDGGBeX01a YS43cIGNy0wN6ZAgQ/PZraWq0/Uhk2JfRkoMaet9+MJW68ucRZAVuFqa2X044aUuBgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384184; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=RyDikVJUaxN/K9DH7sBjg7oDQ4faufRVtMKeJCglnjU=; b=dmHuFahtisatCoEIln7k7brBEkBC4TjmSnlWs2HtP4xlT3lcJai21JjJ2MKfk5iaYQYH t8gE5TarIm147KcseLoouXpvUWpj3JSK6cthBkosub44wlyHDKZOkdLNudU01onweG9Ak X2xxHlxZns5uO3dFHwlw+ws+uJgxngNgKq9IPijirCXtnVvY4cA3WY3L4JifJDBTv6KDH tYTOSPce93b6a/hKloEIWpndKlPYJAgG3T7T3aDdVVlhwWvfrFB0JjPXPa732kSh44VEi NGTMzVBqZZXedwgBfZNASxudFKEju7GplONkNGRxJuIji42bEk3/wqKAGWZTCXZuBAA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=sstdbZAt; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FF86606A322; Fri, 4 Dec 2026 11:36:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=sstdbZAt Received: by smtp.kernel.org (Postfix) with ESMTPSA id 878811F000CE; Fri, 4 Dec 2026 11:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384184; bh=RyDikVJUaxN/K9DH7sBjg7oDQ4faufRVtMKeJCglnjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sstdbZAtgPVFObfHI6tWakyv0k7QpFAfiw1nelzwy1EVl17GBztsiOocxyarQHQx5 SoN+1P4nNF/u1hfPoH6JtHaXx8ZzoaAiqAmF2s3cTe52qNnIn6Dr0VGn3+juq3Zdqi h9wI0M6I82AmPW8f9uonZRCEDMhwxNxkZJXdYgl8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Takashi Sakamoto , Kaixuan Li , Suyuan Wang , Takashi Iwai Subject: [PATCH 6.12 531/555] ALSA: fireworks: Abort the transaction on a bus reset Date: Fri, 4 Dec 2026 19:09:34 +0900 Message-ID: <20261204100628.928259880@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Suyuan Wang commit 890eff85e8a01012e1d3b6c54cba787416331381 upstream. When snd_efw_transaction_bus_reset() marks a transaction as STATE_BUS_RESET, snd_efw_transaction_run() sleeps and resends the command, but leaves the state as it is. The response to the resent command is then ignored, and the next wait returns at once, so the loop keeps resending the command without a retry limit until sending fails. Fireworks devices also accept AV/C commands, and the AV/C general specification says that a bus reset discards any transaction in progress. Do the same as for FCP: end the transaction on a bus reset and return -EAGAIN. ERROR_DELAY_MS has no users left, so drop it. Found with a static analysis tool and checked by hand. Suggested-by: Takashi Sakamoto Fixes: bde8a8f23bbe ("ALSA: fireworks: Add transaction and some commands") Cc: stable@vger.kernel.org Co-developed-by: Kaixuan Li Signed-off-by: Kaixuan Li Signed-off-by: Suyuan Wang Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261122-firewire-busreset-v2-2-e104d785c8a1@gmail.com Signed-off-by: Greg Kroah-Hartman --- sound/firewire/fireworks/fireworks_transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/firewire/fireworks/fireworks_transaction.c +++ b/sound/firewire/fireworks/fireworks_transaction.c @@ -34,7 +34,6 @@ #define MEMORY_SPACE_EFW_RESPONSE 0xecc080000000ULL #define ERROR_RETRIES 3 -#define ERROR_DELAY_MS 5 #define EFC_TIMEOUT_MS 125 static DEFINE_SPINLOCK(instances_lock); @@ -99,7 +98,8 @@ int snd_efw_transaction_run(struct fw_un ret = t.size; break; } else if (t.state == STATE_BUS_RESET) { - msleep(ERROR_DELAY_MS); + ret = -EAGAIN; + break; } else if (++tries >= ERROR_RETRIES) { dev_err(&t.unit->device, "EFW transaction timed out\n"); ret = -EIO;