Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4435337pxb; Mon, 21 Feb 2022 21:32:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMWVyfjHSQcRTGRnsKstzzevYkWa40bSs6UsgMAHFtlL9o7rP5ZhXHwEDpuqSUxoVWQDMl X-Received: by 2002:aa7:9f5b:0:b0:4cc:964c:99dd with SMTP id h27-20020aa79f5b000000b004cc964c99ddmr23402760pfr.42.1645507934057; Mon, 21 Feb 2022 21:32:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645507934; cv=none; d=google.com; s=arc-20160816; b=n0K2dT8owWSOgDDLaKiQr9OZVsL87qWYUWCv/NlnifCULdT1BvAdfeFVNAvV1ZIkgQ rFunxS5QF+Xz200/Au7grwFKcej0b6nQMt5mAS/krMF8s8Gow3l/KJuZLf+43tixhZnJ E5KlOxWCU3uOQxSSScFTS3MHZhi+RlUfy9OVmqO00nStAbgWJOd5QzSGEtpjo50Lz5Xc BuM2+CDWpYQxunO0jXLmFNpbtNJH1EgB2e4PApxFv4UQyTRv/4M/4ri0d0TPv2eaAvaI 6PLR4m/UFjUOlHmAMzcwvzog6pArDbLLVeIw7TeuL44XJYSgwLW8KNXIGrg0nW2pPzaC qDRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AX+R+wGZyREvCOx+dhlmAjvE9HvsRzdTg0SEbVaQlpY=; b=jiceqXZFMqrjCbwUDMPpjoCOvdN0Z8wHDGsVYqj8BO1qZWf4aBVTqFpCDB83gBy90F oAxmTay9Vw1z4Y85jIBdO05itVjJxkOW36TXarjyd9TyovxPJzsbeIvinGUlclz3JbRB FdNlju0CG4xJ6Bd4NgqKb10YNMrRC3LmCEZLat4Y4xf9HET5p8RI7xfpI76xGWYVnT2d LOPQR7TKLYmmQpiY4vtIpFzg3BnHawgP5FEKy/eOAaY/d3mg8MpiiL3fwM7dfTk0Yv0B lxL5NV4yDFGFZDJtcR6lU0DlIn24e2Wx07/tmE72aVLmcXsLfocHMN1SVwRXXI7kr54U UInw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nemIO3vD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b10si30936137plh.152.2022.02.21.21.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:32:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nemIO3vD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2204113DBD; Mon, 21 Feb 2022 21:00:30 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354399AbiBUJ62 (ORCPT + 99 others); Mon, 21 Feb 2022 04:58:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351632AbiBUJtz (ORCPT ); Mon, 21 Feb 2022 04:49:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F5AB34B8B; Mon, 21 Feb 2022 01:22:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C915160F3C; Mon, 21 Feb 2022 09:22:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC204C340EB; Mon, 21 Feb 2022 09:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435357; bh=4/IQDapPhOfUHZ8I/bXCAqRqXgprEmYdeOsY8JUFMrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nemIO3vDO6nbq3rN5HagG0zNwCMK9Cd3sJrcTn4GppDJ6DqNwHBaFySmBU6Swi9rF oi81m0RG2L5gHQ9ZMX39Kid+cjVW1AVYIV8/tSv76ruorQ9/ZGIumh6qrxjy/sW72W xmy0fQaazfpRW5XQxYbNbSCHkSz3fHQCQ5lhJU94= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.16 135/227] ALSA: usb-audio: Dont abort resume upon errors Date: Mon, 21 Feb 2022 09:49:14 +0100 Message-Id: <20220221084939.341918784@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 9a5adeb28b77416446658e75bdef3bbe5fb92a83 upstream. The default mixer resume code treats the errors at restoring the modified mixer items as a fatal error, and it returns back to the caller. This ends up in the resume failure, and the device will be come unavailable, although basically those errors are intermittent and can be safely ignored. The problem itself has been present from the beginning, but it didn't hit usually because the code tries to resume only the modified items. But now with the recent commit to forcibly initialize each item at the probe time, the problem surfaced more often, hence it appears as a regression. This patch fixes the regression simply by ignoring the errors at resume. Fixes: b96681bd5827 ("ALSA: usb-audio: Initialize every feature unit once at probe time") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215561 Link: https://lore.kernel.org/r/20220214125711.20531-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/mixer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -3678,17 +3678,14 @@ static int restore_mixer_value(struct us err = snd_usb_set_cur_mix_value(cval, c + 1, idx, cval->cache_val[idx]); if (err < 0) - return err; + break; } idx++; } } else { /* master */ - if (cval->cached) { - err = snd_usb_set_cur_mix_value(cval, 0, 0, *cval->cache_val); - if (err < 0) - return err; - } + if (cval->cached) + snd_usb_set_cur_mix_value(cval, 0, 0, *cval->cache_val); } return 0;