Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1243532imn; Sat, 30 Jul 2022 22:16:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/QIN3Get9G5rImdPJ/yePHhhw3hUFkCYGY9wr8tL+VJI6/qKO6IW6eNYfSTBDcS898Vdj X-Received: by 2002:a17:907:6d99:b0:72f:4633:65 with SMTP id sb25-20020a1709076d9900b0072f46330065mr8247224ejc.320.1659244610651; Sat, 30 Jul 2022 22:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659244610; cv=none; d=google.com; s=arc-20160816; b=I5xAOy0PXCmBOaUVYZyR8zGjrrCqE1fqy+LmJcxTQH5iZTbatw8c8QImTH2Ivug9Dm O4GUPy2TWLLUpgLVJTt9VLp3twDA/L5OJVZv70TbhcoClE0ASUqa+ul0TLdIP78SqbtJ XumJ9hsLB5wCv4SW0T9VSeoDEyjskNhwOnltUL0FWk6TczC/xJKDZ2tC5//Re7dJcU8w KOOuKcrD0FGG1kJ8d1zCjP/DJcLOa8b8WBJVy4yC+d57nBOHKunzG+FMNpxsxSZIUa1T BX8FekQK16GA/ym0PpCx5EeRuYdzcwIIJpJk9bUmcFZmQey4SRLAHxJMUuTqFrFh4HHg 0bbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=VG/803tZkOvbYBCreVllSk19EdouWSWxaMRIYBi8YEo=; b=yT1V34sr5X7hfVyKQozkS4Wx9pI3gKLAYt2VYJYb5Qpxr25ql0s03IH8dv6WQdJ6Vj ykaiYjSQvrZ4hxSoCskmvjDn5l2bYgR8TTPXFmcGmuIJk50qUfs7BwvHhU3gXxJQkq+X 2P67iHs+r43/+/7X3lkJ7jM4avA1V4xVPG7zEYo25AhqXGzYiupk6bixFWqr1aef9cIh gmacmDVIxvTDN1et8QzfQl/VbbgrnZ9IvgZI693dFSoFJ/9Gif9DwhbaxCRTq3lHQdHV 6wLzkJ1I0Vv3n0kHEmuvGnQJfvDj46FuusK5S87RFVX9y2WZNvh8ZKX2QGIZPlLj4UEO VuUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=jLaGxuNK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xa11-20020a170906fd8b00b00722e1f93942si6237684ejb.333.2022.07.30.22.16.25; Sat, 30 Jul 2022 22:16:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=jLaGxuNK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232003AbiGaFI4 (ORCPT + 99 others); Sun, 31 Jul 2022 01:08:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230492AbiGaFIz (ORCPT ); Sun, 31 Jul 2022 01:08:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D31013DE4; Sat, 30 Jul 2022 22:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=VG/803tZkOvbYBCreVllSk19EdouWSWxaMRIYBi8YEo=; b=jLaGxuNKz2MbuMNtM7zNBVpdFi g6SYc7/SlNOeUWiAuxjY3hmc5XjJU4/4gLxRT1+7iVMIPThy2zJTzGJhY4STEdUcBLWWBV/PnfaWr e2T+AF+XXRv8k32Dh5KgVBtuaRecnVl/w6t33PppNSHM1DZn5jZlTFYToI4C28kxV+fbQeXj6x1Rb avMgyXUfLxvI6x9Dczotu0A5JWm3tq1yUizBvQlRjH65u2IjTkzMHKs2Naj71KwMkzVkpOIxbwLLp U7MTpjkkkym04hP+ObqWsCicBDNNtXIoaD++yxOxiZLbH1/kR3SyOVjVGn6rIeZemBWkXBtwHcVpX LhVLymlQ==; Received: from [2601:1c0:6280:3f0::a6b3] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oI1Bx-008GAd-Cf; Sun, 31 Jul 2022 05:08:41 +0000 Message-ID: Date: Sat, 30 Jul 2022 22:08:39 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] usb: dwc3: qcom: Provide stubs for dwc3_qcom_read_usb2_speed function Content-Language: en-US To: Krishna Kurapati , Andy Gross , Bjorn Andersson , Konrad Dybcio , Felipe Balbi , Greg Kroah-Hartman , Philipp Zabel Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <1659237530-436-1-git-send-email-quic_kriskura@quicinc.com> From: Randy Dunlap In-Reply-To: <1659237530-436-1-git-send-email-quic_kriskura@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi-- On 7/30/22 20:18, Krishna Kurapati wrote: > This patch intends to fix a build issue that is occurring due to > dwc3_qcom_read_usb2_speed function which uses usb_hub_find_child API > in its effors to get the speed of devices (HS/FS/LS) connected. > > usb_hub_find_child API is a part of usb core compiled into the kernel > when CONFIG_USB=y. In some builds (make randconfig for i386) > CONFIG_USB is not set and the usb core is not compiled into the > kernel causing linking errors. > > Provide stubs for dwc3_qcom_read_usb2_speed function to use > usb_hub_find_child API only if CONFIG_USB is set. Else return > USB_SPEED_UNKNOWN. > > Fixes: 6895ea55c385 (usb: dwc3: qcom: Configure wakeup interrupts during suspend) > Reported-by: Randy Dunlap Suggested-by: Randy Dunlap > Signed-off-by: Krishna Kurapati Acked-by: Randy Dunlap Tested-by: Randy Dunlap Thanks. > --- > drivers/usb/dwc3/dwc3-qcom.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index c5e482f..bd8dc5a 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > @@ -299,6 +299,7 @@ static void dwc3_qcom_interconnect_exit(struct dwc3_qcom *qcom) > icc_put(qcom->icc_path_apps); > } > > +#ifdef CONFIG_USB > static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > { > struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); > @@ -318,6 +319,12 @@ static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > > return udev->speed; > } > +#else > +static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom) > +{ > + return USB_SPEED_UNKNOWN; > +} > +#endif > > static void dwc3_qcom_enable_wakeup_irq(int irq, unsigned int polarity) > { -- ~Randy