From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97287C25B08 for ; Sat, 6 Aug 2022 16:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231987AbiHFQEB (ORCPT ); Sat, 6 Aug 2022 12:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbiHFQD6 (ORCPT ); Sat, 6 Aug 2022 12:03:58 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50F2BF59E; Sat, 6 Aug 2022 09:03:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B7E89CE0500; Sat, 6 Aug 2022 16:03:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04E22C433C1; Sat, 6 Aug 2022 16:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659801834; bh=0FhFSv7kHhoYs7UjOraPhD9LcguU++M9oaYQUuckXaU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=APAQltLs/zGFtGnxW4e275Ion5OLd/IWWWkiePgHolJNiwDBXxz+wXf/WU1h7UvWK IwCncvXLbyJoPq6lxxULtA8BFWKLFY+2yj5Ez3TZd1FtHxQk6P2+Dd1JNSMBqL2uup C+Xx7kD0q4lQdwMBkNTJoVeKYnFDAk6OQ3kbt8Q4JbEKX3OPypEmE3OY0loN+GyZZA Qg/0DGk6lL242aa1jPQD3zMAMud4JMOZq2Y6TPvwsFN1VpjQF8fzf22HeeVA35YNbx qWv1sI+YWjtntnVBUMNkIJ0cwOKnonF9vOrL3KBsTQPemlbe2TXQsRFJ9ras52hVM+ T4Sxro0+esv3g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oKMHl-0003HP-6D; Sat, 06 Aug 2022 18:04:21 +0200 Date: Sat, 6 Aug 2022 18:04:21 +0200 From: Johan Hovold To: Manivannan Sadhasivam Cc: Johan Hovold , Greg Kroah-Hartman , Felipe Balbi , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Krishna Kurapati , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , Pavankumar Kondeti , quic_ppratap@quicinc.com, quic_vpulyala@quicinc.com, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap Subject: Re: [PATCH v2 3/9] usb: dwc3: qcom: fix gadget-only builds Message-ID: References: <20220804151001.23612-1-johan+linaro@kernel.org> <20220804151001.23612-4-johan+linaro@kernel.org> <20220806141536.GD14384@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220806141536.GD14384@thinkpad> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 06, 2022 at 07:45:36PM +0530, Manivannan Sadhasivam wrote: > On Thu, Aug 04, 2022 at 05:09:55PM +0200, Johan Hovold wrote: > > A recent change added a dependency to the USB host stack and broke > > gadget-only builds of the driver. > > > > Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend") > > Reported-by: Randy Dunlap > > Signed-off-by: Johan Hovold > > --`- > > > > Changes in v2 > > - new patch > > > > drivers/usb/dwc3/dwc3-qcom.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > > index be2e3dd36440..e9364141661b 100644 > > --- a/drivers/usb/dwc3/dwc3-qcom.c > > +++ b/drivers/usb/dwc3/dwc3-qcom.c > > @@ -310,8 +310,11 @@ static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > > * currently supports only 1 port per controller. So > > * this is sufficient. > > */ > > +#ifdef CONFIG_USB > > udev = usb_hub_find_child(hcd->self.root_hub, 1); > > - > > +#else > > + udev = NULL; > > +#endif > > Perhaps the check should be moved to the caller instead? This function still > references "usb_hcd" struct and I don't think that's intended for gadget only > mode. That wouldn't help with the build failure, which is what this patch is addressing. > > if (!udev) > > return USB_SPEED_UNKNOWN; > > > > -- > > 2.35.1 Johan