From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbcD2IYV (ORCPT ); Fri, 29 Apr 2016 04:24:21 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:46841 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719AbcD2IYQ (ORCPT ); Fri, 29 Apr 2016 04:24:16 -0400 X-AuditID: cbfec7f5-f792a6d000001302-43-57231a2c19ef Subject: Re: [PATCH] usbip: vudc: fix Kconfig dependencies To: Arnd Bergmann , Greg Kroah-Hartman References: <1461847388-1463701-1-git-send-email-arnd@arndb.de> Cc: Valentina Manea , Shuah Khan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Krzysztof Opasiak Message-id: <57231A2B.4090001@samsung.com> Date: Fri, 29 Apr 2016 10:24:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-version: 1.0 In-reply-to: <1461847388-1463701-1-git-send-email-arnd@arndb.de> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xK7o6UsrhBk/fqVn8nXSM3aJ58Xo2 i8u75rBZLFrWymzx5TOXxbtLc9kd2Dx+/5rE6LFz1l12j/1z17B79G1ZxejxeZNcAGsUl01K ak5mWWqRvl0CV0bHdY+C3RIVC4/uZWlgPCfcxcjJISFgInH843JGCFtM4sK99WwgtpDAUkaJ tWttuxi5gOznjBL///wGKuLgEBawkuh7wwJiigiESOw/pAJRbi/R0HWeBaScWWAio8SDw81s IDVsAvoS83aJgtTwCmhJ7OxfwQxiswioSiy5s50JxBYViJA4dfYtG0SNoMSPyfdYQGxOAQeJ t63bwbYyC+hJ3L+oBRJmFpCX2LzmLfMERoFZSDpmIVTNQlK1gJF5FaNoamlyQXFSeq6RXnFi bnFpXrpecn7uJkZIOH/dwbj0mNUhRgEORiUe3hn3lMKFWBPLiitzDzFKcDArifAmSSiHC/Gm JFZWpRblxxeV5qQWH2KU5mBREueduet9iJBAemJJanZqakFqEUyWiYNTqoHxdHYTd8CzG58b zrrzGN/YKGlvbxJxW5d7pvmVNOHdd1PVvPX2On4JYTzi1O+zUOaYYavqljLByY8+sEm6XpG1 7Htorjonb4nBl66M2X43+419Px5ZNVlC1TTWZ8YWrVzmxKvZXhO/OyyolzY98FRPeR+3rU39 o7Y1BmZPv06yWX4kdd9XDQslluKMREMt5qLiRABNxc6QYwIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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