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]
Date:   Mon, 4 Nov 2019 11:04:10 +0100
From:   Thierry Reding <treding@...dia.com>
To:     Mao Wenan <maowenan@...wei.com>
CC:     <felipe.balbi@...ux.intel.com>, <gregkh@...uxfoundation.org>,
        <nkristam@...dia.com>, <arnd@...db.de>, <johan@...nel.org>,
        <krzk@...nel.org>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH -next] usb: gadget: Add dependency for USB_TEGRA_XUDC

On Mon, Nov 04, 2019 at 10:59:45AM +0800, Mao Wenan wrote:
> If CONFIG_USB_TEGRA_XUDC=y and CONFIG_USB_ROLE_SWITCH=m,
> below erros can be seen:
> drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_remove':
> tegra-xudc.c:(.text+0x6b0): undefined reference to `usb_role_switch_unregister'
> drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_probe':
> tegra-xudc.c:(.text+0x1b88): undefined reference to `usb_role_switch_register'
> drivers/usb/gadget/udc/tegra-xudc.o: In function `tegra_xudc_usb_role_sw_work':
> tegra-xudc.c:(.text+0x5ecc): undefined reference to `usb_role_switch_get_role'
> 
> This patch add dependency USB_ROLE_SWITCH for UDC driver.
> 
> Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
> Signed-off-by: Mao Wenan <maowenan@...wei.com>
> ---
>  drivers/usb/gadget/udc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
> index acaec3a..d103154 100644
> --- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -445,6 +445,7 @@ config USB_TEGRA_XUDC
>  	tristate "NVIDIA Tegra Superspeed USB 3.0 Device Controller"
>  	depends on ARCH_TEGRA || COMPILE_TEST
>  	depends on PHY_TEGRA_XUSB
> +	depends on USB_ROLE_SWITCH

It looks like most other drivers that use the USB role switch class do
"select" here. Now, that's suboptimal because USB_ROLE_SWITCH is a user-
visible symbol, which can lead to conflicts, so it should be avoided. I
think that in this case it might make sense to hide USB_ROLE_SWITCH and
then convert all "depends on USB_ROLE_SWITCH" occurrences to "select
USB_ROLE_SWITCH". The USB role switch class is, after all, not useful by
itself. It always needs a host and/or gadget driver to make use of it.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ