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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 8 Aug 2022 15:00:14 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Krishna Kurapati <quic_kriskura@...cinc.com>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Felipe Balbi <balbi@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Randy Dunlap <rdunlap@...radead.org>,
        linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: dwc3: qcom: Provide stubs for
 dwc3_qcom_read_usb2_speed function

On Mon, Aug 01, 2022 at 12:30:15PM +0530, Krishna Kurapati wrote:
> Dwc3 Qcom driver makes use of usb_hub_find_child API in its efforts
> to get speed of connected devices (HS/LS/FS) and enable interrupts
> accordingly. usb_hub_find_child API is a part of usb core compiled
> either into the kernel or as a module (CONFIG_USB= Y or M). In some
> builds (make randconfig for i386) CONFIG_USB is not enabled and the
> usb core is not compiled resulting in linking errors.
> 
> Provide stubs for dwc3_qcom_read_usb2_speed function to use
> usb_hub_find_child API only if CONFIG_USB is enabled. 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>
> ---
> v2: Updated commit text to include cases when CONFIG_USB=m as well.
> 
>  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

How is code for a USB host driver being built if CONFIG_USB is not
enabled?

Shouldn't this driver be split up cleaner to not be built at all if that
is not happening and this is a gadget-only configuration?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ