Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4774719pxj; Wed, 9 Jun 2021 01:17:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCAstFW/YWUN5lSFKP+nTKXESNFRUuFNqpXYE04ROz9FKVbdYmYgkMgJO22dtNGoQHamdK X-Received: by 2002:a17:906:27d6:: with SMTP id k22mr28035309ejc.323.1623226622062; Wed, 09 Jun 2021 01:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623226622; cv=none; d=google.com; s=arc-20160816; b=z09ieoIUhdHc7trnhVScVzEd47n8L3342DOvZhPXBJZk4e3HQ/rcFGqvkxMRwAW20I Q9c9VsOEfFk3MgWOyfFYSDC7kjViiFyJe768szVD1Jgq+GQNQRuQjVLZo81vJmAbuWoD eGYxK2Pm1OfY0VRpki9VdiXPh0K2xf3CdAmKx9d+4dSyHzdjNRd7HWMdGHsmvVDlcUIV /xGOR/JY8degzlplZ4yVlI8v+rFObEspw5JOLowC6cpdavzyyE9SehMRDCP0Vz7+A9M3 kryrWhszxqpfDeUsmwdZTEGEyuoa+Q/Yocnls8W5kPzwXYie51uLL+/WjTB/jypuHOir hQ+Q== 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=W86uw21YfKPYdpRi+4gnnVMhnvJhlXIJ/vpymcHnmJE=; b=Ma4EOUsBRAoxlx/fEU3p2RzI5i3eQ3CaKABTBkKyJj7HzpAw0DwQQ+z0sglCK5vBYH O4Aktgj1v+7bScyUQv1jQRZOECo7SWlPk5D5b4hSYITKPST3iFAr8ksXO4KR9uGj/NRy icVpn4aj28+XnYIWAaWhqemkePW2m66TZx4QXzbJHDaFoyNj6Ja5d0rToPmHrdjiWrQ6 bqV4jbkEu/2XBRoa44mAeDcJ1wX8UZlHfvdNfA2QQYk+/F5vw1NYW/fe1Y1fo5pPVcND H6cLtvkz5h1lMogq//YFj3vF/gpl4gTUhmvoUJn6PbQE9XsKcXDYtGhB1D6a6XiCtqD9 jY5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PY21N1A7; 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 c2si1879600edr.331.2021.06.09.01.16.27; Wed, 09 Jun 2021 01:17:02 -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=PY21N1A7; 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 S234654AbhFHTbu (ORCPT + 99 others); Tue, 8 Jun 2021 15:31:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:40046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236109AbhFHTQV (ORCPT ); Tue, 8 Jun 2021 15:16:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D80186146D; Tue, 8 Jun 2021 18:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623178266; bh=hWSw338vaib2nmKg/NfWfYy527GoRmuHGQh+8qKetFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PY21N1A7XuZ4ZcB4XPkCOYfX/MIH3EN87sK0eqzxPIsNch4yoF1ICV0F82E+zm6Fh pOq1MHZvnZZH0YsX5ZZyVIxJX4/0yMV+kM1fjxeAh3F6QDvc5pxMqf8uqvKpnEdeCo 4Bqv9M3yCk9ONcghOF6nZxeqaGW8upFm3UE0eBA0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Phil Elwell Subject: [PATCH 5.12 121/161] usb: dwc2: Fix build in periphal-only mode Date: Tue, 8 Jun 2021 20:27:31 +0200 Message-Id: <20210608175949.534254310@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175945.476074951@linuxfoundation.org> References: <20210608175945.476074951@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 @@ -707,7 +707,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;