···55555656 The precise terms and conditions for copying, distribution and5757modification follow.5858-5858+5959 GNU GENERAL PUBLIC LICENSE6060 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION6161···110110 License. (Exception: if the Program itself is interactive but111111 does not normally print such an announcement, your work based on112112 the Program is not required to print an announcement.)113113-113113+114114These requirements apply to the modified work as a whole. If115115identifiable sections of that work are not derived from the Program,116116and can be reasonably considered independent and separate works in···168168access to copy the source code from the same place counts as169169distribution of the source code, even though third parties are not170170compelled to copy the source along with the object code.171171-171171+172172 4. You may not copy, modify, sublicense, or distribute the Program173173except as expressly provided under this License. Any attempt174174otherwise to copy, modify, sublicense or distribute the Program is···225225226226This section is intended to make thoroughly clear what is believed to227227be a consequence of the rest of this License.228228-228228+229229 8. If the distribution and/or use of the Program is restricted in230230certain countries either by patents or by copyrighted interfaces, the231231original copyright holder who places the Program under this License···278278POSSIBILITY OF SUCH DAMAGES.279279280280 END OF TERMS AND CONDITIONS281281-281281+282282 How to Apply These Terms to Your New Programs283283284284 If you develop a new program, and you want it to be of the greatest
+20-20
drivers/staging/usbip/userspace/README
···4848 - Bind usbip.ko to the device of busid 1-2.4949 - A usb device 1-2 is now exportable to other hosts!5050 - Use 'usbip_bind_driver --other 1-2' when you want to shutdown exporting5151- and use the device locally. 5151+ and use the device locally.525253535454 client:# insmod usbip_common_mod.ko···8787 List USB devices8888 - busid 3-3.2 (04bb:0206)8989 3-3.2:1.0 -> usb-storage9090-9090+9191 - busid 3-3.1 (08bb:2702)9292 3-3.1:1.0 -> snd-usb-audio9393 3-3.1:1.1 -> snd-usb-audio9494-9494+9595 - busid 3-3 (0409:0058)9696 3-3:1.0 -> hub9797-9797+9898 - busid 3-2 (0711:0902)9999 3-2:1.0 -> none100100-100100+101101 - busid 1-1 (05a9:a511)102102 1-1:1.0 -> ov511103103-103103+104104 - busid 4-1 (046d:08b2)105105 4-1:1.0 -> none106106 4-1:1.1 -> none107107 4-1:1.2 -> none108108-108108+109109 - busid 5-2 (058f:9254)110110 5-2:1.0 -> hub111111-111111+112112--------------------------------------------------------------------------------------------------------113113Mark the device of busid 3-3.2 as exportable.114114115115 trois:# usbip_bind_driver --usbip 3-3.2116116- ** (process:24621): DEBUG: 3-3.2:1.0 -> none 116116+ ** (process:24621): DEBUG: 3-3.2:1.0 -> none117117 ** (process:24621): DEBUG: write "add 3-3.2" to /sys/bus/usb/drivers/usbip/match_busid118118 ** Message: bind 3-3.2 to usbip, complete!119119-119119+120120 trois:# usbip_bind_driver --list121121 List USB devices122122 - busid 3-3.2 (04bb:0206)···141141 : /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-1142142 : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)143143 : 0 - Mass Storage / SCSI / Bulk (Zip) (08/06/50)144144-144144+145145 1-2.2.1: Apple Computer, Inc. : unknown product (05ac:0203)146146 : /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.2/1-2.2.1147147 : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)148148 : 0 - Human Interface Devices / Boot Interface Subclass / Keyboard (03/01/01)149149-149149+150150 1-2.2.3: OmniVision Technologies, Inc. : OV511+ WebCam (05a9:a511)151151 : /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2.2/1-2.2.3152152 : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)153153 : 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)154154-154154+155155 3-1: Logitech, Inc. : QuickCam Pro 4000 (046d:08b2)156156 : /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/usb3/3-1157157 : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)158158 : 0 - Data / unknown subclass / unknown protocol (0a/ff/00)159159 : 1 - Audio / Control Device / unknown protocol (01/01/00)160160 : 2 - Audio / Streaming / unknown protocol (01/02/00)161161-161161+162162 4-1: Logitech, Inc. : QuickCam Express (046d:0870)163163 : /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.1/usb4/4-1164164 : Vendor Specific Class / Vendor Specific Subclass / Vendor Specific Protocol (ff/ff/ff)165165 : 0 - Vendor Specific Class / Vendor Specific Subclass / Vendor Specific Protocol (ff/ff/ff)166166-166166+167167 4-2: Texas Instruments Japan : unknown product (08bb:2702)168168 : /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.1/usb4/4-2169169 : (Defined at Interface level) / unknown subclass / unknown protocol (00/00/00)170170 : 0 - Audio / Control Device / unknown protocol (01/01/00)171171 : 1 - Audio / Streaming / unknown protocol (01/02/00)172172-172172+173173--------------------------------------------------------------------------------------------------------174174Attach a remote usb device!175175176176 deux:# usbip --attach 10.0.0.3 1-1177177 port 0 attached178178-178178+179179--------------------------------------------------------------------------------------------------------180180Show what devices are attached to this client.181181···183183 Port 00: <Port in Use> at Full Speed(12Mbps)184184 Prolific Technology, Inc. : unknown product (067b:3507)185185 6-1 -> usbip://10.0.0.3:3240/1-1 (remote bus/dev 001/004)186186- 6-1:1.0 used by usb-storage 186186+ 6-1:1.0 used by usb-storage187187 /sys/class/scsi_device/0:0:0:0/device188188 /sys/class/scsi_host/host0/device189189 /sys/block/sda/device190190-190190+191191--------------------------------------------------------------------------------------------------------192192Detach the imported device.193193194194 deux:# usbip --detach 0195195 port 0 detached196196-196196+197197--------------------------------------------------------------------------------------------------------198198199199
+1-1
drivers/staging/usbip/userspace/configure.ac
···9393 *) AC_MSG_ERROR(bad value ${enableval} for --enable-usbids-install) ;;9494 esac])9595AM_CONDITIONAL(INSTALL_USBIDS, test x$usbids = xinstall)9696-9696+979798989999GLIB2_REQUIRED=2.6.0
···77[\fIoptions\fR]8899.SH DESCRIPTION1010-Driver bindings for USB devices can be changed using 1111-this program. It is used to export and unexport USB 1010+Driver bindings for USB devices can be changed using1111+this program. It is used to export and unexport USB1212devices over USB/IP.13131414.SH OPTIONS···3434 - Bind usbip.ko to the device of busid 1-2.3535 - A usb device 1-2 is now exportable to other hosts!36363737- server:# usbip_bind_driver --other 1-2 3737+ server:# usbip_bind_driver --other 1-23838 - Shutdown exporting and use the device locally.39394040.SH "SEE ALSO"
···8787 }88888989 if (retries == 0)9090- err("usbip_status not ready after %d retries", 9090+ err("usbip_status not ready after %d retries",9191 SYSFS_OPEN_RETRIES);9292 else if (retries < SYSFS_OPEN_RETRIES)9393 info("warning: usbip_status ready after %d retries",
+5-5
drivers/staging/usbip/userspace/src/bind-driver.c
···177177 return -1;178178 }179179180180- for (i = 0; i < ninterface; i++) {181181- char driver[PATH_MAX];180180+ for (i = 0; i < ninterface; i++) {181181+ char driver[PATH_MAX];182182 int ret;183183184184 bzero(&driver, sizeof(driver));185185186186- getdriver(busid, configvalue, i, driver, PATH_MAX-1);186186+ getdriver(busid, configvalue, i, driver, PATH_MAX-1);187187188188 g_debug(" %s:%d.%d -> %s ", busid, configvalue, i, driver);189189···226226 return -1;227227 }228228229229- for (i = 0; i < ninterface; i++) {229229+ for (i = 0; i < ninterface; i++) {230230 int ret;231231232232 ret = bind_interface(busid, configvalue, i, "usbip");···527527 }528528#endif529529 }530530-530530+531531 if (be_local == 0)532532 use_device_by_usbip(busid);533533 }
+3-3
drivers/staging/usbip/userspace/src/usbip.c
···619619 if (geteuid() != 0)620620 g_warning("running non-root?");621621622622- ret = usbip_names_init(USBIDS_FILE);623623- if (ret)624624- notice("failed to open %s", USBIDS_FILE);622622+ ret = usbip_names_init(USBIDS_FILE);623623+ if (ret)624624+ notice("failed to open %s", USBIDS_FILE);625625626626 for (;;) {627627 int c;
···9696} __attribute__((packed));97979898struct op_export_reply {9999- int returncode; 9999+ int returncode;100100} __attribute__((packed));101101102102···118118} __attribute__((packed));119119120120struct op_unexport_reply {121121- int returncode; 121121+ int returncode;122122} __attribute__((packed));123123124124#define PACK_OP_UNEXPORT_REQUEST(pack, request) do {\