lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6629cf9-e730-09b4-a01b-2761c42b4390@infradead.org>
Date:   Sat, 30 Jul 2022 22:08:39 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Krishna Kurapati <quic_kriskura@...cinc.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Philipp Zabel <p.zabel@...gutronix.de>
Cc:     linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3: qcom: Provide stubs for
 dwc3_qcom_read_usb2_speed function

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 <rdunlap@...radead.org>

Suggested-by: Randy Dunlap <rdunlap@...radead.org>

> Signed-off-by: Krishna Kurapati <quic_kriskura@...cinc.com>


Acked-by: Randy Dunlap <rdunlap@...radead.org>
Tested-by: Randy Dunlap <rdunlap@...radead.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ