summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip
Commit message (Collapse)AuthorAgeFilesLines
* staging: usbip: userspace: usbip-utils 1.1.1matt mooney2011-07-081-2/+2
| | | | | | | Bump package revision number! Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: README: update example outputmatt mooney2011-07-081-25/+28
| | | | | | | | Change a missed reference to the `list' command, and update the output from `usbip bind ...' and `usbip list -r ...' Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip: modify `list' help messagematt mooney2011-07-082-2/+2
| | | | | | | | The remote devices listed are, technically, exportable and not necessarily exported. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_list.c: modify exportable device outputmatt mooney2011-07-081-4/+4
| | | | | | | Change spacing to provide better indentation for readability. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: fix header installation bugmatt mooney2011-07-083-7/+7
| | | | | | | | | | A bug that I created due to using simply expanding variables in the makefiles. Although only unexpanded paths are at issue here, I decided to use recursively expanding variables on all of the parameterized values. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: add new prefix for usbip network codematt mooney2011-07-085-89/+92
| | | | | | | | Change and add new usbip_net_ prefix to every function in the network code for easier identification. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbipd: major cleanup of daemonmatt mooney2011-07-081-347/+344
| | | | | | | | | Reorganize, rename [for clarity and to remove stub_driver references], modify output messages, and cleanup coding style; nevertheless, the actual implementation is pretty much untouched. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: fix usbip printk format warningRandy Dunlap2011-07-081-1/+1
| | | | | | | | | Fix usbip printk format warning for size_t: drivers/staging/usbip/stub_tx.c:236: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbipd.c: fix userspace build errorDavid Chang2011-07-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | When build userspace code, got the following error message: make[2]: Entering directory `/usr/src/staging-2.6/drivers/staging/usbip/userspace/src' CC usbip.o ... CCLD usbip CC usbipd.o usbipd.c:30:25: fatal error: stub_driver.h: No such file or directory compilation terminated. make[2]: *** [usbipd.o] Error 1 make[2]: Leaving directory `/usr/src/staging-2.6/drivers/staging/usbip/userspace/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/staging-2.6/drivers/staging/usbip/userspace' make: *** [all] Error 2 Due to commit 756d6726 and a16941ae, stub_driver had been changed into host_driver, so update header filename and functions name to fix these build errors Signed-off-by: David Chang <dchang@novell.com> CC: Joe Perches <joe@perches.com> Cc: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/staging/usbip: bugfix prevent driver unbind regression in linux-nextArjan Mels2011-07-051-1/+20
| | | | | | | | | Fix regression problem in linux-next: post_reset and pre_reset are no longer included in linux-next while they are in linux-3.0rc5. Signed-off-by: Arjan Mels <arjan.mels@gmx.net> Cc: usbip-devel <usbip-devel@lists.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: usbip: vhci-hcd: Do not kill already dead RX/TX kthreadTobias Klauser2011-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | When unbinding a device on the host which was still attached on the client, I got a NULL pointer dereference on the client. This turned out to be due to kthread_stop() being called on an already dead kthread. Here is how I was able to reproduce the problem: server:# usbip bind -b 1-2 client:# usbip attach -h server -b 1-2 server:# usbip unbind -b 1-2 This patch fixes the problem by checking the kthread before attempting to kill it, as it is done on the opposite side in stub_shutdown_connection(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: configure.ac: change package datamatt mooney2011-07-051-1/+1
| | | | | | | | Change package name to usbip-utils, email address to linux-usb, and bump minor version number. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_network.c: coding style cleanupmatt mooney2011-07-051-31/+42
| | | | | | | Change messges to debug, and fix a few coding style issues. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_host: update function and variable namesmatt mooney2011-07-052-172/+189
| | | | | | | | Officially change stub_driver to usbip_host_driver. And, reorganize usbip_host_driver.c while also cleaning up coding style. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: rename stub driver filesmatt mooney2011-07-054-2/+2
| | | | | | | Rename stub_driver.? to usbip_host_driver.? Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip list: move output headermatt mooney2011-07-051-6/+11
| | | | | | | | | Delay the printing of the output header until the list is received from the remote host. This allows notification that the host does not have any exportable devices. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip list: edit output messagesmatt mooney2011-07-051-24/+34
| | | | | | | | Edit dbg and normal output messages for consistency and better feedback. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_unbind.c: implement using libsysfsmatt mooney2011-07-051-16/+107
| | | | | | | | | Modify unbind to use libsysfs, and include a check to verify that the device is actually using usbip-host before proceeding. The output messages have been changed to be consistent with `usbip bind'. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_bind.c: major rewrite of the implementationmatt mooney2011-07-051-145/+158
| | | | | | | | | | | | Rewrite functions in terms of libsysfs, which eliminates a lot of helper functions simplifying the file layout. Now, the two processes taking place here, an unbind of the old driver and a bind of usbip-host, are single functions and have been renamed along with the controlling function. A check to see if the device is already bound to usbip-host is now included. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: utils.c: rewrite modify_match_busidmatt mooney2011-07-051-28/+40
| | | | | | | Rewrite the function to use libsysfs. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: utils: remove libsysfs circumventionmatt mooney2011-07-052-263/+18
| | | | | | | | | Removes all of the helper functions that used a lot of hard-coded values intead of libsysfs. Most of these functions were unused anyway. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip: modify command failurematt mooney2011-07-051-5/+8
| | | | | | | | When a bad option is given, display a message stating such and output usage. When a bad command is given, output command help. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: libsrc: change all output messages to debugmatt mooney2011-07-053-83/+80
| | | | | | | | | | | The library should not be displaying random messages intermixed with those from the programs that use them. So, instead, change all of the output from the library to debug only, and allow the programs to decide what to tell the user. This also changes the messages to use the same form, which makes understanding them easier. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: libsrc: remove usbip.hmatt mooney2011-07-058-35/+21
| | | | | | | | | Remove the library version of usbip.h because its sole purpose was to include other headers, which is bad practice. Also modify include guards for consistency. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip.c: add log optionmatt mooney2011-07-051-3/+10
| | | | | | | | Add option for logging with syslog, and default to use stderr for error and info messages. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: libsrc: set program name for loggingmatt mooney2011-07-053-0/+9
| | | | | | | | Set the program name to "libusbip" to identify that the message is from the library code. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_common.h: fixup header includesmatt mooney2011-07-053-10/+11
| | | | | | | | Remove unnecessary headers from the file, and add the now missing headers into the files that actually need them. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_common.h: move enumsmatt mooney2011-07-051-26/+24
| | | | | | | Relocate enums to follow logging macros. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: usbip_common.h: cleanup log macrosmatt mooney2011-07-051-45/+43
| | | | | | | | Provide better abstraction for easier modification, and align the macros for readability. Remove notice() because it is not used. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: update cleanup.shmatt mooney2011-07-051-4/+6
| | | | | | | | Modify $FILES to account for the new directory layout. Also, sort the list of files within the variable to make it human-readable. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: cleanup READMEmatt mooney2011-07-051-150/+133
| | | | | | | | Update examples to correspond with the new usbip-utils; edit grammar; and cleanup format for consistency. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: add name to AUTHORSmatt mooney2011-07-051-0/+1
| | | | | | | Add myself to the AUTHORS file. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: usbip: userspace: remove usb.ids filematt mooney2011-07-053-13230/+2
| | | | | | | | | Inclusion of the usb.ids file is redundant. USBIDS_DIR is set in configure.ac to a default of /usr/share/hwdata/. This can be overridden using `./configure --with-usbids-dir=<dir>'. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usbip: simplify port status savingMárton Németh2011-07-051-3/+2
| | | | | | | | Use memcpy() function to save port status instead of a handwritten for loop. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usbip: dump the port status differenceMárton Németh2011-07-051-8/+22
| | | | | | | | | | | | | | | At the beginning of vhci_hub_control() function the port status is saved to show what are the differences between the previous and the new status. Change the dump function to really show the differences in the status bit changes: put a '+' sign before the symbolic name of a bit where a bit was set, a '-' sign where the bit was cleared and a SPACE where the bit was not changed. This is similar to the way "diff -u" shows the changes and easy to understand. Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usbip: only dump valid port statusMárton Németh2011-07-051-2/+5
| | | | | | | | | | | The wIndex parameter of vhci_hub_control() is always zero when the request type is GetHubDescriptor, see drivers/usb/core/hub.c::get_hub_descriptor() and Universal Serial Bus Specification revision 2.0 (April 27, 2000) Section 11.24.2.5 "Get Hub Descriptor". This means the variable rhport will not contain any useful index. Only use valid rhport values. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: usbip: Fix out-of-tree build for userspaceTobias Klauser2011-07-051-1/+1
| | | | | | | | | | This fixes out-of-tree builds ($builddir != $srcdir). In such cases, libusbip.la cannot be found because it is generated in the build directory and not the source directory. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Fix recieve/receive typosJoe Perches2011-06-282-2/+2
| | | | | | | Just spelling fixes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge Linus's tree into staging-nextGreg Kroah-Hartman2011-06-0933-1847/+1657
|\ | | | | | | | | | | | | | | This was done to resolve the conflicts that were in a number of files due to changes done upstream with others done in the staging-next branch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USBIP: Remove unnecessary whitespace before newline characters.Akshay Joshi2011-06-071-4/+4
| | | | | | | | | | | | | | | | In this file, in certain places, newline characters in pr_debug() calls had whitespace before them. This patch removes this extraneous whitespace. Signed-off-by: Akshay Joshi <me@akshayjoshi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usbip: change dev_attr_group to constantMárton Németh2011-06-072-2/+2
| | | | | | | | | | | | | | | | | | | | The dev_attr_group variable is never changed and it is only passed to the second parameter of sysfs_create_group() and sysfs_remove_group() functions. These functions are defined in linux/sysfs.h: the second parameter is a pointer to const in both cases. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: stub_main.c: simplify busid_table initializationmatt mooney2011-06-071-6/+2
| | | | | | | | | | | | | | | | | | | | Set the whole structure to zero instead of individually setting each member, which simplifies the for loop. This was suggested by walter harms <wharms@bfs.de>. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: userspace: usbip_list.c: cleanup exported device functionsmatt mooney2011-06-071-48/+42
| | | | | | | | | | | | | | Rename functions and cleanup coding style. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: userspace: rename usbip device and interfacematt mooney2011-06-0710-41/+44
| | | | | | | | | | | | | | | | | | Add prefix of usbip_ to internal usb device and interface to avoid confusion with the kernel types. This also identifies the types as being part of the usbip library. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: userspace: usbip_list.c: refactor local USB device listingmatt mooney2011-06-071-97/+83
| | | | | | | | | | | | | | | | | | | | Combines the different list display types for local devices into one function. Removes dependence on utils.h, which only exists as a way to circumvent libsysfs and will be removed. The devices are now sorted as an added benefit of this refactor. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: change the busid sizematt mooney2011-06-074-14/+14
| | | | | | | | | | | | | | | | | | Change busid size to correspond with SYSFS_BUS_ID_SIZE, which was already being used in most cases. This eliminates the need to define BUS_ID_SIZE in the userspace code. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: userspace: move header includes out utils.hmatt mooney2011-06-073-23/+11
| | | | | | | | | | | | | | | | | | The includes have been moved out of utils.h to their respective source files where they are suppose to be. An include guard is also added to utils.h Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: usbip: userspace: use memset instead of bzeromatt mooney2011-06-076-14/+13
| | | | | | | | | | | | | | bzero is and has been deprecated since POSIX.1-2001. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usbip: remove extra whitespaceMárton Németh2011-06-071-1/+1
| | | | | | | | | | | | | | Only one whitespace is enough after "return". Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: usbip: vhci.h: remove FSF addressGreg Kroah-Hartman2011-06-071-9/+0
| | | | | | | | | | | | Remove the FSF address from the comment header. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>