linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: usb: usbip: Update README
@ 2016-12-13 19:52 Krzysztof Opasiak
  2016-12-14 16:08 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Opasiak @ 2016-12-13 19:52 UTC (permalink / raw)
  To: shuahkh, shuah
  Cc: valentina.manea.m, gregkh, linux-kernel, linux-usb, Krzysztof Opasiak

Update README file:
- remove outdated parts
- clarify terminology and general structure
- add some description of vUDC

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
---
 tools/usb/usbip/README | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/tools/usb/usbip/README b/tools/usb/usbip/README
index 831f49fea3ce..148d13814306 100644
--- a/tools/usb/usbip/README
+++ b/tools/usb/usbip/README
@@ -4,10 +4,32 @@
 # Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
 #               2005-2008 Takahiro Hirofuchi
 
+[Overview]
+USB/IP protocol allows to pass USB device from server to client over the
+network. The USB device may be either physical device connected to a server or
+software entity created on a server using USB gadget subsystem.
+Whole project consists of four parts:
+
+    - usbip-vhci
+        Kernel module which provides a virtual USB Host Controller and allows
+        to import a USB device from a remote machine. Used on a client side.
+
+    - usbip-host (stub driver)
+        Kernel module which provides a USB device driver which can be bound to
+        a physical USB device to make it exportable. Used on a server side.
+
+    - usbip-vudc
+        Kernel module which provides a virtual USB Device Controller and allows
+        to export a USB device created using USB Gadget Subsystem. Used on
+        a server side.
+
+    - usbip-utils
+        A set of userspace tools used to handle connection and management.
+        Used on both sides.
 
 [Requirements]
     - USB/IP device drivers
-	Found in the staging directory of the Linux kernel.
+        Found in the drivers/usb/usbip/ directory of the Linux kernel tree.
 
     - libudev >= 2.0
 	libudev library
@@ -36,6 +58,10 @@
 
 
 [Usage]
+On a server side there are two entities which can be shared.
+First of them is physical usb device connected to the machine.
+To make it available below steps should be executed:
+
     server:# (Physically attach your USB device.)
 
     server:# insmod usbip-core.ko
@@ -52,6 +78,30 @@
 	- The USB device 1-2 is now exportable to other hosts!
 	- Use `usbip unbind --busid 1-2' to stop exporting the device.
 
+Second of shareable entities is USB Gadget created using USB Gadget Subsystem
+on a server machine. To make it available below steps should be executed:
+
+    server:# (Create your USB gadget)
+        - Currently the most preferable way of creating a new USB gadget
+          is ConfigFS Composite Gadget. Please refer to its documentation
+          for details.
+        - See vudc_server_example.sh for a short example of USB gadget creation
+
+    server:# insmod usbip-core.ko
+    server:# insmod usbip-vudc.ko
+        - To create more than one instance of vudc use num module param
+
+    server:# (Bind gadget to one of available vudc)
+        - Assign your new gadget to USB/IP UDC
+        - Using ConfigFS interface you may do this simply by:
+            server:# cd /sys/kernel/config/usb_gadget/<gadget_name>
+            server:# echo "usbip-vudc.0" > UDC
+
+    server:# usbipd -D --device
+        - Start usbip daemon.
+
+To attach new device to client machine below commands should be used:
+
     client:# insmod usbip-core.ko
     client:# insmod vhci-hcd.ko
 
@@ -60,6 +110,8 @@
 
     client:# usbip attach --remote <host> --busid 1-2
 	- Connect the remote USB device.
+	- When using vudc on a server side busid is really vudc instance name.
+	  For example: usbip-vudc.0
 
     client:# usbip port
 	- Show virtual port status.
@@ -192,6 +244,8 @@ Detach the imported device:
 	- http://usbip.wiki.sourceforge.net/how-to-debug-usbip
     - usbip-host.ko must be bound to the target device.
 	- See /proc/bus/usb/devices and find "Driver=..." lines of the device.
+    - Target USB gadget must be bound to vudc
+      (using USB gadget susbsys, not usbip bind command)
     - Shutdown firewall.
 	- usbip now uses TCP port 3240.
     - Disable SELinux.
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools: usb: usbip: Update README
  2016-12-13 19:52 [PATCH] tools: usb: usbip: Update README Krzysztof Opasiak
@ 2016-12-14 16:08 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2016-12-14 16:08 UTC (permalink / raw)
  To: Krzysztof Opasiak, shuah
  Cc: valentina.manea.m, gregkh, linux-kernel, linux-usb, Shuah Khan,
	Shuah Khan

Hi Krzysztof,

Thanks for the patch.

On 12/13/2016 12:52 PM, Krzysztof Opasiak wrote:
> Update README file:
> - remove outdated parts
> - clarify terminology and general structure
> - add some description of vUDC
> 
> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
> ---
>  tools/usb/usbip/README | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 55 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/usb/usbip/README b/tools/usb/usbip/README
> index 831f49fea3ce..148d13814306 100644
> --- a/tools/usb/usbip/README
> +++ b/tools/usb/usbip/README
> @@ -4,10 +4,32 @@
>  # Copyright (C) 2011 matt mooney <mfm@muteddisk.com>
>  #               2005-2008 Takahiro Hirofuchi
>  
> +[Overview]
> +USB/IP protocol allows to pass USB device from server to client over the
> +network. The USB device may be either physical device connected to a server or
> +software entity created on a server using USB gadget subsystem.
> +Whole project consists of four parts:
> +

Please add definitions for client and server.

> +    - usbip-vhci
> +        Kernel module which provides a virtual USB Host Controller and allows
> +        to import a USB device from a remote machine. Used on a client side.

Could be rephrased as:

A client side Kernel module which provides a virtual USB Host Controller and allows
import of a USB device from a remote server machine.

> +
> +    - usbip-host (stub driver)
> +        Kernel module which provides a USB device driver which can be bound to
> +        a physical USB device to make it exportable. Used on a server side.
> +

A server side Kernel module which provides a USB device driver that exports
physical USB devices that are bound to it.

> +    - usbip-vudc
> +        Kernel module which provides a virtual USB Device Controller and allows
> +        to export a USB device created using USB Gadget Subsystem. Used on
> +        a server side.
> +

Similar changes as above.

> +    - usbip-utils
> +        A set of userspace tools used to handle connection and management.
> +        Used on both sides.
>  
>  [Requirements]
>      - USB/IP device drivers
> -	Found in the staging directory of the Linux kernel.
> +        Found in the drivers/usb/usbip/ directory of the Linux kernel tree.
>  
>      - libudev >= 2.0
>  	libudev library
> @@ -36,6 +58,10 @@
>  
>  
>  [Usage]
> +On a server side there are two entities which can be shared.
> +First of them is physical usb device connected to the machine.
> +To make it available below steps should be executed:
> +
>      server:# (Physically attach your USB device.)
>  
>      server:# insmod usbip-core.ko
> @@ -52,6 +78,30 @@
>  	- The USB device 1-2 is now exportable to other hosts!
>  	- Use `usbip unbind --busid 1-2' to stop exporting the device.
>  
> +Second of shareable entities is USB Gadget created using USB Gadget Subsystem
> +on a server machine. To make it available below steps should be executed:
> +
> +    server:# (Create your USB gadget)
> +        - Currently the most preferable way of creating a new USB gadget
> +          is ConfigFS Composite Gadget. Please refer to its documentation
> +          for details.
> +        - See vudc_server_example.sh for a short example of USB gadget creation
> +
> +    server:# insmod usbip-core.ko
> +    server:# insmod usbip-vudc.ko
> +        - To create more than one instance of vudc use num module param
> +
> +    server:# (Bind gadget to one of available vudc)
> +        - Assign your new gadget to USB/IP UDC
> +        - Using ConfigFS interface you may do this simply by:
> +            server:# cd /sys/kernel/config/usb_gadget/<gadget_name>
> +            server:# echo "usbip-vudc.0" > UDC
> +
> +    server:# usbipd -D --device
> +        - Start usbip daemon.
> +
> +To attach new device to client machine below commands should be used:
> +
>      client:# insmod usbip-core.ko
>      client:# insmod vhci-hcd.ko
>  
> @@ -60,6 +110,8 @@
>  
>      client:# usbip attach --remote <host> --busid 1-2
>  	- Connect the remote USB device.
> +	- When using vudc on a server side busid is really vudc instance name.
> +	  For example: usbip-vudc.0
>  
>      client:# usbip port
>  	- Show virtual port status.
> @@ -192,6 +244,8 @@ Detach the imported device:
>  	- http://usbip.wiki.sourceforge.net/how-to-debug-usbip
>      - usbip-host.ko must be bound to the target device.
>  	- See /proc/bus/usb/devices and find "Driver=..." lines of the device.
> +    - Target USB gadget must be bound to vudc
> +      (using USB gadget susbsys, not usbip bind command)
>      - Shutdown firewall.
>  	- usbip now uses TCP port 3240.
>      - Disable SELinux.
> 

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-14 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13 19:52 [PATCH] tools: usb: usbip: Update README Krzysztof Opasiak
2016-12-14 16:08 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).