Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp385464pxb; Thu, 26 Aug 2021 05:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/yRsnXT0q3F2ulT5t36vcBTH3uExz/8OMM+GpUTp3JEmGBhV37rwoWmAju2hsrRYW5pjc X-Received: by 2002:a05:6638:419e:: with SMTP id az30mr3395910jab.14.1629981548608; Thu, 26 Aug 2021 05:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629981548; cv=none; d=google.com; s=arc-20160816; b=O289HORaAU/gpXZK/l/Nsc6BDkdeZjLuZAQBRJAuxbuYa5OOQR3ZfpiZnh8VDLczLp +MoS5WWCvCdcCRvuAiheUF9SDDf9OKFMMg9BFzJfpZ1LFwLcurFlGZHuEIQixxOmMVsL 55wI0paZB+IGAjr9to5JQ7rhW84J1jsC8aNewfaG/Bn8+JNUUUdd6VtNq3fTMXJfg2wH /pJfpRulig7pIfqAABJ4t5UlqdQwXhRm6J9H9Sct+uFprzYOSlh0r0LMjG+Gt7a06YX0 6+jsJ/vQXZJebpgYyblfSvwW98BkH6NNPv2/gk5rdXGBjLuMAiwxWJfVL4Og1s9wgaOn jPOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=kr+MnY6WWZjhMXduEXDacA8DlN3E7yY7WMNS2gQoetY=; b=enji64hs0dJvRDipBaf5NcdCz3Ep0fIYy5WTpZEexX7mfJUZ/rD5p5OYrs+V32hTRQ LYC2KCF731+G4UGn7MJCPnC7qx7DHkNEd6IZ1hVjxrmdZHcGUB6y9Se2s2eAtpTNWKw8 SUyrjBJsHNr523Y1FaQpGMfaK/We00tgoa4eHbKtsyFpt63NCWQWZz5Y+eLp4kj4Cwtd RDzaMpNyI43U69MuC9vhBpPIE8aJH+/bcaFuzocfSXsdOAqpnKYmSZ8PbKuvxuvvn6+2 NDy4zZSMLBc8Qv/WPJoDRv90YRwZXo38MzybX89ASdd6aMZ8+yU/SuHTByA6Ok9Xzuv4 z/SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=l4gVQquU; dkim=neutral (no key) header.i=@suse.de header.b=9MxZjeFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si2642632ilg.5.2021.08.26.05.38.56; Thu, 26 Aug 2021 05:39:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=l4gVQquU; dkim=neutral (no key) header.i=@suse.de header.b=9MxZjeFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242117AbhHZMij (ORCPT + 99 others); Thu, 26 Aug 2021 08:38:39 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:56544 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241261AbhHZMij (ORCPT ); Thu, 26 Aug 2021 08:38:39 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 4B4F5222ED; Thu, 26 Aug 2021 12:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1629981471; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kr+MnY6WWZjhMXduEXDacA8DlN3E7yY7WMNS2gQoetY=; b=l4gVQquU5+i/UjLtkIyNIZAw39izi2/yrPABFAwF+mLCXaUbB4Z07H3T9bvVviTvOkPHMo Cl18jOzAOGTwR/70FA57MV0DX9ZXbzTc5DgGjvD5GC8YmoQ0eELY2an8dfzzkpVlmUpdwz q0gXo+eJTCBmG2dkcrO2qAWS+LAXczE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1629981471; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kr+MnY6WWZjhMXduEXDacA8DlN3E7yY7WMNS2gQoetY=; b=9MxZjeFeLMC7lYUS6tiiiY2C/CrpMeYfyuygZeJqNeOJABhUUhnwcwa7OUy6ZBs6+alSIi VsVdyPv6LYxHwIBg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 3D48AA3B8D; Thu, 26 Aug 2021 12:37:51 +0000 (UTC) Date: Thu, 26 Aug 2021 14:37:51 +0200 Message-ID: From: Takashi Iwai To: Greg Kroah-Hartman Cc: Mathias Nyman , Moritz Fischer , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: renesas-xhci: Prefer firmware loading on unknown ROM state In-Reply-To: References: <20210819113427.1166-1-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Aug 2021 14:21:46 +0200, Greg Kroah-Hartman wrote: > > On Thu, Aug 26, 2021 at 01:55:54PM +0200, Takashi Iwai wrote: > > On Thu, 26 Aug 2021 13:50:13 +0200, > > Greg Kroah-Hartman wrote: > > > > > > On Thu, Aug 19, 2021 at 01:34:27PM +0200, Takashi Iwai wrote: > > > > The recent attempt to handle an unknown ROM state in the commit > > > > d143825baf15 ("usb: renesas-xhci: Fix handling of unknown ROM state") > > > > resulted in a regression and reverted later by the commit 44cf53602f5a > > > > ("Revert "usb: renesas-xhci: Fix handling of unknown ROM state""). > > > > The problem of the former fix was that it treated the failure of > > > > firmware loading as a fatal error. Since the firmware files aren't > > > > included in the standard linux-firmware tree, most users don't have > > > > them, hence they got the non-working system after that. The revert > > > > fixed the regression, but also it didn't make the firmware loading > > > > triggered even on the devices that do need it. So we need still a fix > > > > for them. > > > > > > > > This is another attempt to handle the unknown ROM state. Like the > > > > previous fix, this also tries to load the firmware when ROM shows > > > > unknown state. In this patch, however, the failure of a firmware > > > > loading (such as a missing firmware file) isn't handled as a fatal > > > > error any longer when ROM has been already detected, but it falls back > > > > to the ROM mode like before. The error is returned only when no ROM > > > > is detected and the firmware loading failed. > > > > > > > > Along with it, for simplifying the code flow, the detection and the > > > > check of ROM is factored out from renesas_fw_check_running() and done > > > > in the caller side, renesas_xhci_check_request_fw(). It avoids the > > > > redundant ROM checks. > > > > > > > > The patch was tested on Lenovo Thinkpad T14 gen (BIOS 1.34). Also it > > > > was confirmed that no regression is seen on another Thinkpad T14 > > > > machine that has worked without the patch, too. > > > > > > > > Fixes: 44cf53602f5a ("Revert "usb: renesas-xhci: Fix handling of unknown ROM state"") > > > > BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1189207 > > > > Signed-off-by: Takashi Iwai > > > > --- > > > > drivers/usb/host/xhci-pci-renesas.c | 35 +++++++++++++++++++---------- > > > > 1 file changed, 23 insertions(+), 12 deletions(-) > > > > > > This does not apply to my usb-linus branch, are you sure it is still > > > needed in Linus's tree right now? > > > > I guess we can postpone for 5.15. The patch was written for the code > > on linux-next, and I see there have been a few code clean up there. > > > > But the patch itself could be applied to Linus tree with a slight > > fuzz, so the stable backport should be fine. > > > > If it's still not cleanly applicable, let me know. I'll refresh the > > patch for whatever preferred branch. > > It was not cleanly applicable, 'git am' did not like it against my > usb-linus branch (which is 5.14-rc7 + a few other USB patches not in > this driver). > > So if you want to rebase it against that, I will be glad to take it for > 5.14-final to resolve this issue. OK, then let me resubmit. Wait for a minute... thanks, Takashi