This patch contains usbip manual page updates. It's needed to reflect the implementation changes in following subsequent patches: - tools/usbip: add usb event monitor into libusbip - tools/usbip: export USB devices on a given bus persistently - tools/usbip: import USB devices on a given bus persistently Signed-off-by: Lars Gunnarsson <gunnarsson.lars@xxxxxxxxx> --- v1: New patch added in series. v2: Improve patch description tools/usb/usbip/doc/usbip.8 | 16 ++++++++++++---- tools/usb/usbip/doc/usbipd.8 | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/tools/usb/usbip/doc/usbip.8 b/tools/usb/usbip/doc/usbip.8 index 1f26e4a00638..6f2294cd5e5d 100644 --- a/tools/usb/usbip/doc/usbip.8 +++ b/tools/usb/usbip/doc/usbip.8 @@ -44,9 +44,13 @@ then exit. .PP .HP -\fBattach\fR \-\-remote=<\fIhost\fR> \-\-busid=<\fIbus_id\fR> +\fBattach\fR \-\-remote=<\fIhost\fR> \-\-busid=<\fIbus_id\fR> [\-\-persistent] .IP -Attach a remote USB device. +Attach a remote USB device. When flag --persistent is used, the commmand will +remain in the foreground to monitor the remote bus for a device to become +exported. When the remote usb device is unexported, it will start over and +monitor the bus again. Press Ctrl + C to exit. The device must then be manually +detached. .PP .HP @@ -63,9 +67,13 @@ Detach an imported USB device/gadget. .PP .HP -\fBbind\fR \-\-busid=<\fIbusid\fR> +\fBbind\fR \-\-busid=<\fIbusid\fR> [\-\-persistent] .IP -Make a device exportable. +Make a device exportable. When flag --persistent is used, the commmand will +remain in the foreground to monitor the bus for a device to become plugged in. +When the usb device is unplugged, it will start over and monitor the bus +again. Press Ctrl + C to exit. The device must then be manually unexported with +unbind. .PP .HP diff --git a/tools/usb/usbip/doc/usbipd.8 b/tools/usb/usbip/doc/usbipd.8 index d974394f86a1..021df6573aae 100644 --- a/tools/usb/usbip/doc/usbipd.8 +++ b/tools/usb/usbip/doc/usbipd.8 @@ -92,6 +92,27 @@ USB/IP client can connect and use exported devices. - A usb device 1-2 is now exportable to other hosts! - Use 'usbip unbind --busid=1-2' when you want to shutdown exporting and use the device locally. +The following example shows the usage of importing and exporting a device persistently. + + server:# modprobe usbip-host + + server:# usbipd -D + - Start usbip daemon. + + server:# usbip bind --busid=1-2 --persistent + - Bind usbip-host.ko to the device of busid 1-2, or wait until a device is plugged in. + - Usb device 1-2 is now exportable to other hosts! + - If device is unplugged, wait until device is plugged in and bind usbip-host.ko to the device. + - Usb device 1-2 is now exportable to other hosts again! + - Exit with Ctrl + C and use 'usbip unbind --busid=1-2' when you want to shutdown exporting and use the device locally. + + client:# modprobe vhci-hcd + + client:# usbip attach --remote=server --busid=1-2 --persistent + - Attach the remote usb device, or wait until it becomes exported on the remote end. + - If the remote device becomes unexported, wait until it becomes exported and attach the remote usb device again. + - Exit with Ctrl + C. The device must be manually detached. + The following example shows the usage of device mode server:# modprobe usbip-vudc -- 2.25.1