Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp240500pxj; Fri, 28 May 2021 02:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlKD1iILKp25f0NFi7z3EVPx4TKa7a+LqUmelUPUsYhrZadX6R0wCngHqdYYhhXCBrCUmW X-Received: by 2002:a05:6638:138e:: with SMTP id w14mr7947989jad.33.1622195643813; Fri, 28 May 2021 02:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622195643; cv=none; d=google.com; s=arc-20160816; b=rAToDjrCeWbMG3gyQtGagFwLdrYccODXIY1g8Meu7P9NKrkHqaxSeyG+/9AYG/hTgY hYeP+lzK8Ac41DKi7sgsbvisX9DBV/lkiWBY7vDjAprJy2TsZnZLjBYEYr0BFd3P4UXl TAVbVAgzn53WJCCdxWUT/1MdHfatOBw1PnVNTHoldoNwrTXWbUW8qydrkLhbw9d/ocPM LNELrNatFr8JzHHqqPa1WlvmNV59Lukfkis5+MoK/VORdbyaK9PUl3Fm0Pg5IF/YoJYP vchiPpYUHUGsM+K+9BBOWWTBvBpiA+SqVyx5fcLpEP2h6ZXaW4CBj3mC3qTQSeYWGTCe excQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lDH9OFE2OBSrOr2DPL2Lr0q1cmV5SBGO2n2dey8s+O4=; b=QYP/JthTKqIBarUoowuKE/HwCL5WYh+W8EZ57qUrxbpDzMTI0ohdpnhGjuU5qLIjfg 0vh3TLENcCz3M+kfPEejAQq529pzwG82uJ8mer65ABBQb3zQeKkJkuNH7cLnbKQkHcXc 2G3MqP2WeGp49aSEuUzlG8DZShiqxz4yv/g4NIVNonHqBBKGS5O5QCkq1gPlugxlcFb7 kPpBVXBHQvdc9G7ubPusp+vJeHEsoj7EsThyRTkGPlnHOYmY3NSjoSTILnggc9HdEa0t mwgqVmXBrwgXCWF+ajFZpp+991vOupOIUsdFQNPrWscEc82Av4W1pj7M1Vt7rRDmqPpK dgjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vM+/XWC7"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si4689823ilk.32.2021.05.28.02.53.49; Fri, 28 May 2021 02:54:03 -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=@linuxfoundation.org header.s=korg header.b="vM+/XWC7"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235964AbhE1JxN (ORCPT + 99 others); Fri, 28 May 2021 05:53:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:39392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234926AbhE1JxJ (ORCPT ); Fri, 28 May 2021 05:53:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E60C61002; Fri, 28 May 2021 09:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622195493; bh=XaB5AX18bByRqGZPzJ3+XBe9og2SQnswnlcy2VrCxyg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vM+/XWC7Q28YeFLh/B34kE4JKA0ZKuGxd7IKx1NpG0RPTweuUV4BGKriJj/jwVoPr XWpzgEW9ZTIWqf11xl0blqewjKVVjINazbZPGVSAW4oGKrD/yvYBJaA53+1TNPHE7F W55B3f6AXWmFFquKXg3eLnX+Xhbq+M3l07rba0EM= Date: Fri, 28 May 2021 11:51:31 +0200 From: Greg Kroah-Hartman To: Phil Elwell Cc: Minas Harutyunyan , Sasha Levin , Artur Petrosyan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] usb: dwc2: Fix build in periphal-only mode Message-ID: References: <20210528091349.2602410-1-phil@raspberrypi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 10:37:48AM +0100, Phil Elwell wrote: > Hi Greg, > > On 28/05/2021 10:23, Greg Kroah-Hartman wrote: > > On Fri, May 28, 2021 at 10:13:50AM +0100, Phil Elwell wrote: > > > The bus_suspended member of struct dwc2_hsotg is only present in builds > > > that support host-mode. > > > > > > Fixes: 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.") > > > Signed-off-by: Phil Elwell > > > --- > > > drivers/usb/dwc2/core_intr.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > v2: Correct commit hash used in the Fixes line. > > > > > > diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c > > > index a5ab03808da6..03d0c034cf57 100644 > > > --- a/drivers/usb/dwc2/core_intr.c > > > +++ b/drivers/usb/dwc2/core_intr.c > > > @@ -725,7 +725,11 @@ static inline void dwc_handle_gpwrdn_disc_det(struct dwc2_hsotg *hsotg, > > > dwc2_writel(hsotg, gpwrdn_tmp, GPWRDN); > > > hsotg->hibernated = 0; > > > + > > > +#if IS_ENABLED(CONFIG_USB_DWC2_HOST) || \ > > > + IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) > > > hsotg->bus_suspended = 0; > > > +#endif > > > if (gpwrdn & GPWRDN_IDSTS) { > > > hsotg->op_state = OTG_STATE_B_PERIPHERAL; > > > -- > > > 2.25.1 > > > > > > > I do not understand, the field in the structure is present for all, why > > is this crazy #if needed here? > > > > I see that the commit you reference here did add the new line to set > > bus_suspended, which seemed to be the point here. Why will the #if > > values matter here? > > Sorry to waste your brain cycles on this. There is a problem, but it only > exists in branches where the blamed commit (24d209dba5a3) has been > back-ported as a Fix, because it depends on commit 012466fc8ccc which isn't > a Fix and therefore > hasn't been back-ported. Sadly 012466fc8ccc doesn't back-port cleanly on its > own - either more cherry-picks or a temporary patch like mine will be > needed. So should we revert this commit from the stable releases where it showed up? Which ones specifically? If so, please let me and stable@vger.kernel.org know and we can take care of it there. thanks, greg k-h