From nobody Tue Apr 7 21:27:35 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1773257853; cv=none; d=zohomail.com; s=zohoarc; b=GCfKKGbs+BCFjVq3R7Y6yHCsRwWe3oQXsneMj+AVr5jPDZ+/o86j888psgyxV5bixTug1cGVQ7GKatz5HrK+TD0imJfn225tYYxZv4oqRKmMvEUnPa+mM13aOceWp/JqioBiBX6N1BLVZDEdY2DlgLPPTVrvs9AdfOquR8qm2WA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773257853; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gxdeLysaVZWDaxLrL28BbjR7fKALuOVm92/S3JsCzcE=; b=bCGhMpqqu+4RCki2Z7VTkBhXLVqEO83HDlx2V0IwT12awDM+m5W19WI+JjImPzn3+uYAk8cdme3wEHBrktnGw27b/MkiA+j3LKfSJf3hcD629zLd/ZaKDUfiAdM9P3NUAqG/8OPhQzxKvc9Cn1DdwghjD7/8AkqcYXQyvHIGGFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773257853824650.8090100427784; Wed, 11 Mar 2026 12:37:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w0PLy-0000UL-Sh; Wed, 11 Mar 2026 15:36:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0PLw-0000Mn-Me; Wed, 11 Mar 2026 15:36:20 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0PLu-0000Cx-Bo; Wed, 11 Mar 2026 15:36:20 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 6D22F1920F9; Wed, 11 Mar 2026 22:34:27 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id AFF5737C45E; Wed, 11 Mar 2026 22:35:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773257667; bh=CP+lTb6QIOJ90ijqeHOLJxYZwKH3HY6JpSgt3R7n9Vs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TMrnyNWEToPWeWJmaDuUVpQmxcLUwY/8MSnPr2WBAB4yX50Q2dfWW0ynFYLmpIN1A 5I0Yh3UAnuDEYhJ45rmaUe5+JE7RBb3tKF9dCAkzNPjGDjaOpGBMN12EfGUJ/bYvaz CVjzXphZrU77/aoEIBTu+VmvRrR3QWrntZDdSj+1tjCwPShq17mH4y/781MukPYEo3 7hidjfn7/Y3XAJrGINgnzZH55YJmOdf+BcW3aH1RBECpHdRxN2ODKmXbq8yjlTAD+V ZbC3Bojc9fqEYb4T92YLid8C4a6DPYeLgAhnJtjc27hfiMv6M+6rVCQLBRpggTw5yR 2zOo8jzu3YSVQ== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Manos Pitsidianakis , "Michael S. Tsirkin" , Michael Tokarev Subject: [Stable-10.2.2 17/53] virtio-snd: remove TODO comments Date: Wed, 11 Mar 2026 22:34:10 +0300 Message-ID: <20260311193449.1096110-17-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1773257855468154100 Content-Type: text/plain; charset="utf-8" From: Manos Pitsidianakis Replying with a VIRTIO_SND_S_BAD_MSG error does not warrant a device reset. Instead, a device reset happens when the driver requests it from the transport. Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Message-Id: <20260220-virtio-snd-series-v1-2-207c4f7200a2@linaro.org> (cherry picked from commit 34238f078a04f24b91199249b83846ab082b4e05) (Mjt: pick this one up so the next commit applies cleanly) Signed-off-by: Michael Tokarev diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 9101560f38..fd03efc120 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -168,9 +168,6 @@ static void virtio_snd_handle_pcm_info(VirtIOSound *s, sizeof(virtio_snd_query_info)); =20 if (msg_sz !=3D sizeof(virtio_snd_query_info)) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ qemu_log_mask(LOG_GUEST_ERROR, "%s: virtio-snd command size incorrect %zu vs \ %zu\n", __func__, msg_sz, sizeof(virtio_snd_query_info)); @@ -184,9 +181,6 @@ static void virtio_snd_handle_pcm_info(VirtIOSound *s, =20 if (iov_size(cmd->elem->in_sg, cmd->elem->in_num) < sizeof(virtio_snd_hdr) + size * count) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ error_report("pcm info: buffer too small, got: %zu, needed: %zu", iov_size(cmd->elem->in_sg, cmd->elem->in_num), sizeof(virtio_snd_pcm_info)); @@ -244,9 +238,6 @@ uint32_t virtio_snd_set_pcm_params(VirtIOSound *s, virtio_snd_pcm_set_params *st_params; =20 if (stream_id >=3D s->snd_conf.streams || s->pcm->pcm_params =3D=3D NU= LL) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ virtio_error(VIRTIO_DEVICE(s), "Streams have not been initialized.= \n"); return cpu_to_le32(VIRTIO_SND_S_BAD_MSG); } @@ -297,9 +288,6 @@ static void virtio_snd_handle_pcm_set_params(VirtIOSoun= d *s, sizeof(virtio_snd_pcm_set_params)); =20 if (msg_sz !=3D sizeof(virtio_snd_pcm_set_params)) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ qemu_log_mask(LOG_GUEST_ERROR, "%s: virtio-snd command size incorrect %zu vs \ %zu\n", __func__, msg_sz, sizeof(virtio_snd_pcm_set_params= )); @@ -609,9 +597,6 @@ static void virtio_snd_handle_pcm_release(VirtIOSound *= s, sizeof(stream_id)); =20 if (msg_sz !=3D sizeof(stream_id)) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ qemu_log_mask(LOG_GUEST_ERROR, "%s: virtio-snd command size incorrect %zu vs \ %zu\n", __func__, msg_sz, sizeof(stream_id)); @@ -623,9 +608,6 @@ static void virtio_snd_handle_pcm_release(VirtIOSound *= s, trace_virtio_snd_handle_pcm_release(stream_id); stream =3D virtio_snd_pcm_get_stream(s, stream_id); if (stream =3D=3D NULL) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ error_report("already released stream %"PRIu32, stream_id); virtio_error(VIRTIO_DEVICE(s), "already released stream %"PRIu32, @@ -668,9 +650,6 @@ process_cmd(VirtIOSound *s, virtio_snd_ctrl_command *cm= d) sizeof(virtio_snd_hdr)); =20 if (msg_sz !=3D sizeof(virtio_snd_hdr)) { - /* - * TODO: do we need to set DEVICE_NEEDS_RESET? - */ qemu_log_mask(LOG_GUEST_ERROR, "%s: virtio-snd command size incorrect %zu vs \ %zu\n", __func__, msg_sz, sizeof(virtio_snd_hdr)); --=20 2.47.3