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: <ad5a2b81-3ecb-e1d8-9bcb-b5b3a8d0385e@kernel.org>
Date:   Thu, 26 Aug 2021 09:46:29 +0300
From:   Roger Quadros <rogerq@...nel.org>
To:     Matthias Kaehlcke <mka@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Felipe Balbi <balbi@...nel.org>
Cc:     devicetree@...r.kernel.org, Peter Chen <peter.chen@...nel.org>,
        linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        Bastien Nocera <hadess@...ess.net>,
        Ravi Chandra Sadineni <ravisadineni@...omium.org>,
        Michal Simek <michal.simek@...inx.com>,
        Douglas Anderson <dianders@...omium.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Andrew Lunn <andrew@...n.ch>,
        Aswath Govindraju <a-govindraju@...com>,
        Dmitry Osipenko <digetx@...il.com>,
        Fabio Estevam <festevam@...il.com>,
        Gregory Clement <gregory.clement@...tlin.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Pawel Laszczak <pawell@...ence.com>,
        Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        Tony Lindgren <tony@...mide.com>,
        linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH v16 5/7] usb: Specify dependencies on USB_XHCI_PLATFORM
 with 'depends on'



On 13/08/2021 22:52, Matthias Kaehlcke wrote:
> Some USB controller drivers that depend on the xhci-plat driver
> specify this dependency using 'select' in Kconfig. This is not
> recommended for symbols that have other dependencies as it may
> lead to invalid configurations. Use 'depends on' to specify the
> dependency instead of 'select'.
> 
> For dwc3 specify the dependency on USB_XHCI_PLATFORM in
> USB_DWC3_HOST and USB_DWC3_DUAL_ROLE. Also adjust the
> dependencies of USB_DWC3_CORE to make sure that at least one
> of USB_DWC3_HOST, USB_DWC3_GADGET or USB_DWC3_DUAL_ROLE can be
> selected.
> 
> Signed-off-by: Matthias Kaehlcke <mka@...omium.org>

Reviewed-by: Roger Quadros <rogerq@...nel.org>

cheers,
-roger

> ---
> 
> Changes in v16:
> - none
> 
> Changes in v15:
> - adjusted dependencies of USB_DWC3_CORE to make sure it can only
>   be enabled when at least one of USB_DWC3_HOST, USB_DWC3_GADGET
>   or USB_DWC3_DUAL_ROLE is selectable
> - updated commit message
> 
> Changes in v14:
> - none
> 
> Changes in v13:
> - patch added to the series
> 
>  drivers/usb/cdns3/Kconfig | 2 +-
>  drivers/usb/dwc3/Kconfig  | 5 +++--
>  drivers/usb/host/Kconfig  | 4 ++--
>  3 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/Kconfig b/drivers/usb/cdns3/Kconfig
> index b98ca0a1352a..07e12f786d48 100644
> --- a/drivers/usb/cdns3/Kconfig
> +++ b/drivers/usb/cdns3/Kconfig
> @@ -1,7 +1,7 @@
>  config USB_CDNS_SUPPORT
>  	tristate "Cadence USB Support"
>  	depends on USB_SUPPORT && (USB || USB_GADGET) && HAS_DMA
> -	select USB_XHCI_PLATFORM if USB_XHCI_HCD
> +	depends on !USB_XHCI_HCD || USB_XHCI_PLATFORM
>  	select USB_ROLE_SWITCH
>  	help
>  	  Say Y here if your system has a Cadence USBSS or USBSSP
> diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
> index 66b1454c4db2..870f2251350a 100644
> --- a/drivers/usb/dwc3/Kconfig
> +++ b/drivers/usb/dwc3/Kconfig
> @@ -2,8 +2,7 @@
>  
>  config USB_DWC3
>  	tristate "DesignWare USB3 DRD Core Support"
> -	depends on (USB || USB_GADGET) && HAS_DMA
> -	select USB_XHCI_PLATFORM if USB_XHCI_HCD
> +	depends on ((USB && USB_XHCI_PLATFORM) || USB_GADGET) && HAS_DMA
>  	select USB_ROLE_SWITCH if USB_DWC3_DUAL_ROLE
>  	help
>  	  Say Y or M here if your system has a Dual Role SuperSpeed
> @@ -30,6 +29,7 @@ choice
>  config USB_DWC3_HOST
>  	bool "Host only mode"
>  	depends on USB=y || USB=USB_DWC3
> +	depends on USB_XHCI_PLATFORM
>  	help
>  	  Select this when you want to use DWC3 in host mode only,
>  	  thereby the gadget feature will be regressed.
> @@ -44,6 +44,7 @@ config USB_DWC3_GADGET
>  config USB_DWC3_DUAL_ROLE
>  	bool "Dual Role mode"
>  	depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))
> +	depends on USB_XHCI_PLATFORM
>  	depends on (EXTCON=y || EXTCON=USB_DWC3)
>  	help
>  	  This is the default mode of working of DWC3 controller where
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index df9428f1dc5e..518c2312ef0c 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -80,7 +80,7 @@ config USB_XHCI_MTK
>  
>  config USB_XHCI_MVEBU
>  	tristate "xHCI support for Marvell Armada 375/38x/37xx"
> -	select USB_XHCI_PLATFORM
> +	depends on USB_XHCI_PLATFORM
>  	depends on HAS_IOMEM
>  	depends on ARCH_MVEBU || COMPILE_TEST
>  	help
> @@ -112,9 +112,9 @@ config USB_EHCI_BRCMSTB
>  config USB_BRCMSTB
>  	tristate "Broadcom STB USB support"
>  	depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST
> +	depends on !USB_XHCI_HCD || USB_XHCI_PLATFORM
>  	select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD
>  	select USB_EHCI_BRCMSTB if USB_EHCI_HCD
> -	select USB_XHCI_PLATFORM if USB_XHCI_HCD
>  	help
>  	  Enables support for XHCI, EHCI and OHCI host controllers
>  	  found in Broadcom STB SoC's.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ