Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4742961pxj; Wed, 9 Jun 2021 00:18:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYQe/bNSnjIgiFvdZpenHJI6K69z/Uj+lRA4ZsaIXwuc/uiFq8Br/vf3oIXqY3i2U1bhrt X-Received: by 2002:a05:6402:311c:: with SMTP id dc28mr29664631edb.291.1623223119179; Wed, 09 Jun 2021 00:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623223119; cv=none; d=google.com; s=arc-20160816; b=JWTOegYSkdJeHCCebN6I7FZjAFUqZNy6pR6SRRm5V/E9gz7ALRVyNsQ+dLm3SJwJN2 2HAD/Yp3WVq8X9Vs44m7k0y5BQH7YnlF076cvJzq/En8RvgdG6q70U1ocpbcN4sLEKfA fITlKwjXW+p3jrMTzeCescaVGEaJyCehFcRunckXsM0Dv1nSiKmgnuKhYNs+oKVbs2eP pfp7cdVwyfDuDeRQmXjmhgJkAzUuun6gS6t6C8nYB17SbEW4qSMy+vC3Ws0Ctic6bY7g 5dZydiKRjVTEsDJU00Air1Ff2WfcXheFFX0gCqIURq6P2icYw/PJFKjNkp30LfMcmg9E 9RFA== 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=ltc4L6Vlv4OsnwwO9iMFagj3H9/je5SzBM0Hpxkr9tg=; b=XiT2DGixewo7LKGRVeGHO4xc+h4vU46QHZcs8nqwaTBTEATrHPKgtn86r5iispyzit 9e43PzjGKTlUGvam6L8hRtdJEydore/FEE0FwGjtKrT8+Wg/zAdQT3i75+xyipcuJpwC RgJk9iWAnXwAdg1K77Oy5YYWw9vzSOO1j0eH04jTJGYmvBdSiQFpZCQC1zg0hKpQgxyc z9cwh3qHDEqRqdcnPXgCJT9Rdx9U6SbBAlhGBA2MpLuNlPvqxMLJC+fDKxUAf1bDJ7lR hZdvskoAR16Qpewjdyi+t9t+OiL2xvAG268RdN03xe4jhcwsVXYi7A7GX5X2tcJdkgGD Vp1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zH45wYWF; 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 gn42si2164943ejc.47.2021.06.09.00.18.16; Wed, 09 Jun 2021 00:18:39 -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=zH45wYWF; 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 S235354AbhFHSvA (ORCPT + 99 others); Tue, 8 Jun 2021 14:51:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:44790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235289AbhFHSqA (ORCPT ); Tue, 8 Jun 2021 14:46:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C6DF2613B6; Tue, 8 Jun 2021 18:37:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177440; bh=w2jsVu/cA/GWirc37MdF4OvML5NxXnBavGp42HLZVHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zH45wYWFI3tvPQ7Ro/vA2P3cc3wpd0MKBs0fBf200V1pwTrJGkKFezpW9CnSS1d0Q KALUMy0jSVt/6QVkvsOJ1Z/BT0ykjsenYEQab+jaFL9lhTq3yCwMWi4U9aPtD6OkH+ mBSOd90RxrWQ9eGnUeCTny8OyN4dDTHMKWpvlyCE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Phil Elwell Subject: [PATCH 5.4 52/78] usb: dwc2: Fix build in periphal-only mode Date: Tue, 8 Jun 2021 20:27:21 +0200 Message-Id: <20210608175937.036827542@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175935.254388043@linuxfoundation.org> References: <20210608175935.254388043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Phil Elwell In branches to which 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.") has been back-ported, the bus_suspended member of struct dwc2_hsotg is only present in builds that support host-mode. To avoid having to pull in several more non-Fix commits in order to get it to compile, wrap the usage of the member in a macro conditional. Fixes: 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.") Signed-off-by: Phil Elwell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc2/core_intr.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -712,7 +712,11 @@ static inline void dwc_handle_gpwrdn_dis 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;