Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1390139 > unrolled thread

[PATCH] usbip: vudc: fix Kconfig dependencies

Started byArnd Bergmann <arnd@arndb.de>
First post2016-04-28 14:50 +0200
Last post2016-04-29 10:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] usbip: vudc: fix Kconfig dependencies Arnd Bergmann <arnd@arndb.de> - 2016-04-28 14:50 +0200
    Re: [PATCH] usbip: vudc: fix Kconfig dependencies Krzysztof Opasiak <k.opasiak@samsung.com> - 2016-04-29 10:30 +0200

#1390139 — [PATCH] usbip: vudc: fix Kconfig dependencies

FromArnd Bergmann <arnd@arndb.de>
Date2016-04-28 14:50 +0200
Subject[PATCH] usbip: vudc: fix Kconfig dependencies
Message-ID<rsTyi-3b7-31@gated-at.bofh.it>
With the addition of VUDC, the USBIP stack can now be used on
configurations without USB host support, but trying to build
it with USB gadget support disabled fails with

drivers/usb/built-in.o: In function `vep_dequeue':
vudc_main.c:(.text+0xa6ddc): undefined reference to `usb_gadget_giveback_request'
drivers/usb/built-in.o: In function `nuke':
vudc_main.c:(.text+0xa6ea8): undefined reference to `usb_gadget_giveback_request'
drivers/usb/built-in.o: In function `vudc_device_reset':
vudc_main.c:(.text+0xa720c): undefined reference to `usb_gadget_udc_reset'
drivers/usb/built-in.o: In function `vudc_probe':

This addresses both issues, by changing the dependency for USBIP_CORE
to USB_COMMON, and adding additional dependencies on USB or USB_GADGET
for the individual portions as needed.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9360575c5837 ("usbip: vudc: Add vudc to Kconfig")
---
 drivers/usb/usbip/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/usbip/Kconfig b/drivers/usb/usbip/Kconfig
index ebf4ff050890..17646b25343f 100644
--- a/drivers/usb/usbip/Kconfig
+++ b/drivers/usb/usbip/Kconfig
@@ -1,6 +1,6 @@
 config USBIP_CORE
 	tristate "USB/IP support"
-	depends on USB && NET
+	depends on USB_COMMON && NET
 	---help---
 	  This enables pushing USB packets over IP to allow remote
 	  machines direct access to USB devices. It provides the
@@ -16,7 +16,7 @@ config USBIP_CORE
 
 config USBIP_VHCI_HCD
 	tristate "VHCI hcd"
-	depends on USBIP_CORE
+	depends on USBIP_CORE && USB
 	---help---
 	  This enables the USB/IP virtual host controller driver,
 	  which is run on the remote machine.
@@ -26,7 +26,7 @@ config USBIP_VHCI_HCD
 
 config USBIP_HOST
 	tristate "Host driver"
-	depends on USBIP_CORE
+	depends on USBIP_CORE && USB
 	---help---
 	  This enables the USB/IP host driver, which is run on the
 	  machine that is sharing the USB devices.
@@ -36,7 +36,7 @@ config USBIP_HOST
 
 config USBIP_VUDC
 	tristate "VUDC driver"
-	depends on USBIP_CORE
+	depends on USBIP_CORE && USB_GADGET
 	---help---
 	  This enables the USB/IP virtual USB device controller
 	  driver, which is run on the host machine, allowing the
-- 
2.7.0

[toc] | [next] | [standalone]


#1390860

FromKrzysztof Opasiak <k.opasiak@samsung.com>
Date2016-04-29 10:30 +0200
Message-ID<rtbYd-2M2-1@gated-at.bofh.it>
In reply to#1390139
Hi,

On 04/28/2016 02:42 PM, Arnd Bergmann wrote:
> With the addition of VUDC, the USBIP stack can now be used on
> configurations without USB host support, but trying to build

Not exactly. This is the goal but unfortunately for now this will not
work... Most of USB_IP common functions operates on urbs for now because
what USB protocol is sending us is really an serialized URB.

That's why we are also using urbs so we need urb_alloc() and urb_free()
routines which are a part of USB host side support. You may disable all
host side controllers but host side support must remind enabled for now:(

I have a plan to refactor USBIP code and remove those but for now vudc
needs those functions.

> it with USB gadget support disabled fails with
> 
> drivers/usb/built-in.o: In function `vep_dequeue':
> vudc_main.c:(.text+0xa6ddc): undefined reference to `usb_gadget_giveback_request'
> drivers/usb/built-in.o: In function `nuke':
> vudc_main.c:(.text+0xa6ea8): undefined reference to `usb_gadget_giveback_request'
> drivers/usb/built-in.o: In function `vudc_device_reset':
> vudc_main.c:(.text+0xa720c): undefined reference to `usb_gadget_udc_reset'
> drivers/usb/built-in.o: In function `vudc_probe':
> 
> This addresses both issues, by changing the dependency for USBIP_CORE
> to USB_COMMON, and adding additional dependencies on USB or USB_GADGET
> for the individual portions as needed.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 9360575c5837 ("usbip: vudc: Add vudc to Kconfig")
> ---
>  drivers/usb/usbip/Kconfig | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/usbip/Kconfig b/drivers/usb/usbip/Kconfig
> index ebf4ff050890..17646b25343f 100644
> --- a/drivers/usb/usbip/Kconfig
> +++ b/drivers/usb/usbip/Kconfig
> @@ -1,6 +1,6 @@
>  config USBIP_CORE
>  	tristate "USB/IP support"
> -	depends on USB && NET
> +	depends on USB_COMMON && NET
>  	---help---
>  	  This enables pushing USB packets over IP to allow remote
>  	  machines direct access to USB devices. It provides the
> @@ -16,7 +16,7 @@ config USBIP_CORE
>  
>  config USBIP_VHCI_HCD
>  	tristate "VHCI hcd"
> -	depends on USBIP_CORE
> +	depends on USBIP_CORE && USB
>  	---help---
>  	  This enables the USB/IP virtual host controller driver,
>  	  which is run on the remote machine.
> @@ -26,7 +26,7 @@ config USBIP_VHCI_HCD
>  
>  config USBIP_HOST
>  	tristate "Host driver"
> -	depends on USBIP_CORE
> +	depends on USBIP_CORE && USB
>  	---help---
>  	  This enables the USB/IP host driver, which is run on the
>  	  machine that is sharing the USB devices.
> @@ -36,7 +36,7 @@ config USBIP_HOST
>  
>  config USBIP_VUDC
>  	tristate "VUDC driver"
> -	depends on USBIP_CORE
> +	depends on USBIP_CORE && USB_GADGET

So having in mind what I wrote you above about urs I would suggest
changing this line to:

	depends on USBIP_CORE && USB_GADGET && USB

And we can remove this in a future when we will refactor usbip code.

Best regards,
-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web