Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4195582pxv; Mon, 19 Jul 2021 20:03:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiPA2JbQc8J4zvU29yHASF3o7vJfEkXJP9srrmCC4tZslbs+N/bL/3/RwsqAJo6IKNgGyt X-Received: by 2002:a05:6402:3096:: with SMTP id de22mr38275165edb.91.1626750236261; Mon, 19 Jul 2021 20:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626750236; cv=none; d=google.com; s=arc-20160816; b=RcJUa6mfv7VNUnNfiKHtXU8ytl3eXKOW4SXuSwVpfnE38hh20nD3+C0WwlkOKMAkZS pnVNA3ZbW8NiM4WqpZ63l/eJzwp6N2GQbz8evxI5TjW64YVEe7AeM5cJnLzzZPoPfPZR 013sav2ODZ3tow2MWQRXP4v+tYvB1WrAAUdZxUKiw1DRp2j4feT261QzaiMG2ut89rep D35iXXsUBhoPRF5HDuO4bCYdWTmR8iYbXcW6c/PmwVWcJhCzMYzoIEw0nWnJjU8/sT5W GuHfZATWFaaVVn/FRaUq+horHea44jGCUSRXAEJyxcPaPSdctso9s3q8L51GuzD9dEM/ hP3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ARkIuYATvHijD8XSWeM3n42afJoDm+rNzi1meXbXw5I=; b=RQBV/DUvRqH7DtVUOY3s2gwXuAWASXwqJFo92Zr3m1UqVPYst9xgMV8vWhfAgbQq6u NqiG50SAnv08ZAS20AgT6nBKiyd6TSv696hu3/5OCXSUx6+7TMpEk4oNrcJthor2os/z WMTKRFyY8LpuzVeND45KQoQ3Izr96j6MvsyF1mbJtx+4VR6qZonfNQN2jIwlUmsv/z8z GCQpu2Ky/t+sOH7VSAxtpV8bSdrAw8cac98aDY+FwC4yj5PsgfpWehBNTPJ5oyj0xc0x 2Egq7nModQ/S05N+5shWFeaIEfOVi37QvukyQ8239mapIaQf1XOImtPvvPLaE9yLITUI cwjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxtx.org header.s=google header.b=QL5FkO5N; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj26si19110261ejb.678.2021.07.19.20.03.29; Mon, 19 Jul 2021 20:03:56 -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=@linuxtx.org header.s=google header.b=QL5FkO5N; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbhGTCRJ (ORCPT + 99 others); Mon, 19 Jul 2021 22:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235860AbhGTCQe (ORCPT ); Mon, 19 Jul 2021 22:16:34 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88FC8C0613DD for ; Mon, 19 Jul 2021 19:57:12 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id dj21so26771416edb.0 for ; Mon, 19 Jul 2021 19:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxtx.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ARkIuYATvHijD8XSWeM3n42afJoDm+rNzi1meXbXw5I=; b=QL5FkO5N2icD8kCtOXcxxZ0Rqthk681wn1TgMqBfRKJUo0qUVbtLQXtPNA8G4sU0Ao 419DXq9TFx8RMxB+OCjTER5zC1tzWGSXirca7Jymsol+oeU0XtKu0XhLCH8qVT+sFgO0 MRpyYDucCxlRgfy/y5xusAG/6blF4Sze2o4s0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ARkIuYATvHijD8XSWeM3n42afJoDm+rNzi1meXbXw5I=; b=eEvBZWIgcZDxtiwjeekh+Z1sNzaTQfcn30AaSD+1ilVcp3uJnsNm13a5apth8ygfqw wSD6nBE/VxrLAfYXNQ6vMPd4nbKIKApmh4/Me/LRKQtEC0zaMgTM0RO6ACxbLZX06gb5 MgMYjQkPSkwZukqN9Z4xbtgWkiXdJJ1HxZ+9/dE+xRA3JQjGU97wNcKddLn4LEzH+gFm rnDU81ej2hd0lyyM1fecmPMuua1gcESwugquKoeVytF85fJLJVqPJT3aLVreJxwiQWTh leuIo2pJP+vacX6RhmnnHXeHtw9d3C2g723w7H/Tq3uRmHv+l+cYJPMGdCvjEJVdmWRT Q07g== X-Gm-Message-State: AOAM531ES5du7vpY0OBcLrdOPmaRyGd9nnwB/6SySt3EeJVOdLfqo/xc DYnLfAXFAWc2xaGVlH68MOWHnVosN+pBaCotrwIYF/N4tGwykQ== X-Received: by 2002:a05:6402:c13:: with SMTP id co19mr37911017edb.64.1626749831079; Mon, 19 Jul 2021 19:57:11 -0700 (PDT) MIME-Version: 1.0 References: <20210712060912.995381202@linuxfoundation.org> <20210712060916.499546891@linuxfoundation.org> In-Reply-To: From: Justin Forbes Date: Mon, 19 Jul 2021 21:57:00 -0500 Message-ID: Subject: Re: [PATCH 5.13 024/800] usb: renesas-xhci: Fix handling of unknown ROM state To: Moritz Fischer Cc: Greg Kroah-Hartman , LKML , Stable , Mathias Nyman , Vinod Koul Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 19, 2021 at 10:33 AM Justin Forbes wrote: > > On Sat, Jul 17, 2021 at 5:33 PM Moritz Fischer wrote: > > > > Justin, > > > > On Sat, Jul 17, 2021 at 08:39:19AM -0500, Justin Forbes wrote: > > > On Mon, Jul 12, 2021 at 2:31 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > From: Moritz Fischer > > > > > > > > commit d143825baf15f204dac60acdf95e428182aa3374 upstream. > > > > > > > > The ROM load sometimes seems to return an unknown status > > > > (RENESAS_ROM_STATUS_NO_RESULT) instead of success / fail. > > > > > > > > If the ROM load indeed failed this leads to failures when trying to > > > > communicate with the controller later on. > > > > > > > > Attempt to load firmware using RAM load in those cases. > > > > > > > > Fixes: 2478be82de44 ("usb: renesas-xhci: Add ROM loader for uPD720201") > > > > Cc: stable@vger.kernel.org > > > > Cc: Mathias Nyman > > > > Cc: Greg Kroah-Hartman > > > > Cc: Vinod Koul > > > > Tested-by: Vinod Koul > > > > Reviewed-by: Vinod Koul > > > > Signed-off-by: Moritz Fischer > > > > Link: https://lore.kernel.org/r/20210615153758.253572-1-mdf@kernel.org > > > > Signed-off-by: Greg Kroah-Hartman > > > > > > > > > > After sending out 5.12.17 for testing, we had a user complain that all > > > of their USB devices disappeared with the error: > > > > > > Jul 15 23:18:53 kernel: xhci_hcd 0000:04:00.0: Direct firmware load > > > for renesas_usb_fw.mem failed with error -2 > > > Jul 15 23:18:53 kernel: xhci_hcd 0000:04:00.0: request_firmware failed: -2 > > > Jul 15 23:18:53 kernel: xhci_hcd: probe of 0000:04:00.0 failed with error -2 > > > > This looks like it fails finding the actual firmware file (ENOENT). Any > > chance you could give this a whirl on top of the original patch? > > > > Sure. test kernel building now, will let you know when the user reports back. The original user reports success with this patch on top of the original patch. Justin > > Justin > > > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c > > index 18c2bbddf080..cde8f6f1ec5d 100644 > > --- a/drivers/usb/host/xhci-pci.c > > +++ b/drivers/usb/host/xhci-pci.c > > @@ -379,7 +379,11 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) > > driver_data = (struct xhci_driver_data *)id->driver_data; > > if (driver_data && driver_data->quirks & XHCI_RENESAS_FW_QUIRK) { > > retval = renesas_xhci_check_request_fw(dev, id); > > - if (retval) > > + /* > > + * If firmware wasn't found there's still a chance this might work without > > + * loading firmware on some systems, so let's try at least. > > + */ > > + if (retval && retval != -ENOENT) > > return retval; > > } > > > > > > Thanks, > > Moritz