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=1796381420; b=GoAAz0wQRcMaE+Dk/Aj0lFoWYg6/8R66rqKL/8RC6UvjDCPNXwuoJ8/J9oJe+YZLWDYQ 7Bwmd71buJdBYxgshOCcF5xnYbkZQ95lmMlTwH1xaOvG+lr1LUUFHQSIoTwuN8u9EOFXt BSW69vE7VE0voJF9Klh1yG+38+Sn/C6kr6LaHaUW67FRzm9CNL7IsTZz//AfT4wEzlHOc yW2w8qTJaixP3yAt+qUaj1+1IV5bEJ0bfb5gFx4X7iTsjssl+egJ/0yInG4zD3TBnJFJe 2n2lac/q0Jny01T2Vua6ZmFSm9AcTp/gj3ThhFjSzRH3CR79LOIL88g7K36k1Dl8ERA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381420; 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=/nRZJONqedY3ZRAfXpKvYDtjHphoGqzl64CybI2oPEk=; b=RD/n8W4VVo+oGy198WJjON1aDMRjVmJAPRnL73XNZYixVMZ4M/Bd5wv2edIxkKP6ZiNR 6F90gH0nNukFb/n2Q4FwV3qunZmtMqnEK0X58cmoy/XQts0nGhg2jESd7A47QMLaxjRqA GhhMdeLa1EcSZIx5WODkJjB2yj/BRBbx8Mns5caFv5NPDerqh0BC8wGexexhpdhZkppVw lzgK35jrV926OOXX5JE3/908MCyapcLj4k6RAQ+ZqB73/NBkqdDst0+QWI+AW58B0Kd5c 4cGdg3lpUTOoh7LJViv3QLp7epzLUHqXPTSiY9WKa3YbDor93wZew/gFYMHfpO7UOOg== 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="BCAxN/bv"; 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 81D9E606A32C; Fri, 4 Dec 2026 10:50:20 +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=BCAxN/bv Received: by smtp.kernel.org (Postfix) with ESMTPSA id A97BE1F000CE; Fri, 4 Dec 2026 10:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381420; bh=/nRZJONqedY3ZRAfXpKvYDtjHphoGqzl64CybI2oPEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BCAxN/bv/ik5aQk7hdvlcajVASxNM+avDof7K+1o4JclqyUGslqg0penqc95PxE3Y ocapa2gzfgXF0yVnYfjtJNZNgHHZm53LnzuY8IoiHGlYxfFWBPaheMJUYuE6VOj2j1 DQ116A/xpqhWcXHYIXDm00o9Li5tkicxRu+mU5Xs= 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 7.3 695/742] ALSA: fireworks: Abort the transaction on a bus reset Date: Fri, 4 Dec 2026 19:09:19 +0900 Message-ID: <20261204100653.516531577@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@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 7.3-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;