aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/usbip
AgeCommit message (Collapse)Author
2012-06-13staging: usbip: cleanup and fix of vhci_hub_statusBart Westgeest
Changed setting the status bits to a byte-oriented approach. Number of written status bits is now based on VHCI_NPORT, instead of casting status buffer to a long. This fixes a stack corruption bug on 64-bit based architectures, and potential byte order / endianness related issues. In addition updated function comments, and log statements. Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-11staging: usbip: Updated comment describing VHCI_NPORTSBart Westgeest
Updated out-of-date comment describing VHCI_NPORT Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-11staging: usbip: userspace: include headers in release tarballsNatanael Copa
The header files should be included in generated tarballs for archives. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: Fix typo in multiple filesMasanari Iida
Collect spelling typo in multiple files within staging directory. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: usbip: Fix typo in printed textChristopher Harvey
Signed-off-by: Christopher Harvey <charvey@matrox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: usbip: fix potential segfault because of unchecked return value of ↵Christopher Harvey
strchr. This doesn't happen with the usbip virtual hci module, but another module wanting to interface with this user space code could cause a seg-fault by sending data without newlines. Signed-off-by: Christopher Harvey <charvey@matrox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: usbip: fix the usage of kthread_stop()Oleg Nesterov
stub_shutdown_connection() and vhci_shutdown_connection() use task_is_dead() before kthread_stop(). This buys nothing and wrong. kthread_stop() is fine even if this thread is dead. However, if it is dead nothing protects this task_struct, we shouldn't touch this memory. Change the code to do the necessary get_task_struct/put_task_struct. This patch assumes that - xxx_shutdown_connection() is always called, so we can't leak the task_struct. - kthread_stop_put() can't be called twice on the same task. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Matt Mooney <mfm@muteddisk.com>, Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24Staging: usbip: Remove commented code.Santosh Nayak
Remove commented code of old style lock initilization Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10Merge tag 'staging-3.3-rc3' into staging-nextGreg Kroah-Hartman
This was done to resolve some merge issues with the following files that had changed in both branches: drivers/staging/rtl8712/rtl871x_sta_mgt.c drivers/staging/tidspbridge/rmgr/drv_interface.c drivers/staging/zcache/zcache-main.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: usbip: removed #if 0'd out codeBart Westgeest
Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: usbip: changed function return type to voidBart Westgeest
The function usbip_pad_iso never returns anything but 0 (success). Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: usbip: removed unused structure fieldBart Westgeest
Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08staging: usbip: fix to prevent potentially using uninitialized spinlockBart Westgeest
The stub_probe function can be called as soon as the stub_driver is registered. This can lead to the busid_table_lock being used before it is initialized. Moved calling the init_busid_table function (which initalizes this spinlock) to be called earlier in the init function to prevent this from happening. Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-12-22staging: usbip: removed unused definitions from headerBart Westgeest
Removed remnants of old function definitions which have since been removed in earlier cleanup work. Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22staging: usbip: removed dead code from receive functionBart Westgeest
The usbip_xmit function supported sending and receiving data, however the sending part of the function was never used/executed. Renamed the function to usbip_recv, and removed the unused code. Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26staging: usbip: bugfix for deadlockBart Westgeest
Interrupts must be disabled prior to calling usb_hcd_unlink_urb_from_ep. If interrupts are not disabled, it can potentially lead to a deadlock. The deadlock is readily reproduceable on a slower (ARM based) device such as the TI Pandaboard. Signed-off-by: Bart Westgeest <bart@elbrys.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-31staging: Add module.h to more drivers implicitly using it.Paul Gortmaker
This 2nd batch of implicit module.h users only appeared when we removed the unnecessary module.h from include/linux/miscdevice.h [The 1st batch is already present in Greg's staging tree.] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31staging: Add export.h for THIS_MODULE/EXPORT_SYMBOL to drivers/staging users.Paul Gortmaker
Lots of drivers have in the past expected the presence of basic things like THIS_MODULE and EXPORT_SYMBOL. With the header cleanup, they wont have these. Call out the include explicitly. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-19staging: usbip: fix up api changes that broke windows clientsAlexander Thomas
Revert changes in definitions that were submitted on May 11 2011 and committed on June 7 2011. No reason for the change in these values was given in the patch comment, it broke compatibility with older versions, and was difficult to detect by the simultaneous move of the lines of code. Signed-off-by: Alexander Thomas <alexander.thomas@esaturnus.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: Add module.h to drivers/staging usersPaul Gortmaker
Lots of people expect module.h to just "be there" without any #include effort. But we are crushing that. So fix those files in staging relying on implicit module.h presence. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/lwfinger/r8192E into ↵Greg Kroah-Hartman
staging-next * git://git.kernel.org/pub/scm/linux/kernel/git/lwfinger/r8192E: (61 commits) staging: rtl8192e: Fix compilation warnings staging: rtl8192e: Fix unload/reload problem staging: rtl8192e: Remove dead code associated with CONFIG_RTL_RFKILL staging: rtl8192e: Remove conditional code associated with EEPROM_OLD_FORMAT_SUPPORT staging: rtl8192e: Remove dead code associated with EFUSE_REPG_WORKAROUND staging: rtl8192e: Remove LOOP_TEST as parameter staging: rtl8192e: Remove dead code associated with CONFIG_FW_SETCHAN staging: rtl8192e: Remove dead code associated with CONFIG_RTLWIFI_DEBUGFS staging: rtl8192e: Remove dead code associated with _RTL8192_EXT_PATCH_ staging: rtl8192e: Remove ifdefs for CONFIG_RTLLIB_DEBUG staging: rtl8192e: Remove dead code associated with RTL819x_DEBUG staging: rtl8192e: Remove dead code associated with _ENABLE_SW_BEACON staging: rtl8192e: Remove dead code associated with CONFIG_CRYPTO_HMAC staging: rtl8192e: Remove dead code associated with CONFIG_BT_30 staging: rtl8192e: Remove dead code associated with ENABLE_NULL_PT_DEBUG staging: rtl8192e: Remove dead code associated with CONFIG_64BIT_DMA staging: rtl8192e: Remove dead code associated with CONFIG_RTLLIB_CRYPT_TKIP staging: rtl8192e: Remove dead code associated with IRQF_SHARED staging: rtl8192e: Remove dead code associated with CONFIG_CFG_80211 staging: rtl8192e: Remove dead code associated with BUILT_IN_CRYPTO ...
2011-08-23drivers/staging/usbip/userspace/libsrc/vhci_driver.c: test the ↵Julia Lawall
just-initialized value Test the just-initialized value rather than some other one. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier x,y,f!={PTR_ERR,ERR_PTR,ERR_CAST}; statement S; @@ x = f(...); ( if (\(x == NULL\|IS_ERR(x)\)) S | *if (\(y == NULL\|IS_ERR(y)\)) { ... when != x return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: David Chang <dchang@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: usbip: Add header guards to stub.h and vhci.hTobias Klauser
stub.h and vhci.h are missing proper #ifndef/#define header guards, so add them. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: usbip: add a usbip protocol documentMárton Németh
Initial version of USBIP protocol document. Signed-off-by: David Chang <dchang@suse.com> Acked-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: usbip: userspace: Check return value for mkdir()Tobias Klauser
mkdir() could fail, so we should check its return value. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23Staging: usbip: Fix braces and spaces to match coding style.Akshay Joshi
Fix brace positioning and spaces at the start of lines in order to comply with the kernel coding style. Signed-off-by: Akshay Joshi <me@akshayjoshi.com> Acked-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23Staging: usbip: Remove trailing spaces.Akshay Joshi
Remove trailing spaces to comply with the kernel coding style. Signed-off-by: Akshay Joshi <me@akshayjoshi.com> Acked-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-01Merge branch 'master' of ↵Larry Finger
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/staging/bcm/headers.h drivers/staging/brcm80211/brcmfmac/dhd_linux.c drivers/staging/brcm80211/brcmfmac/dhd_sdio.c drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h drivers/staging/et131x/et131x_netdev.c drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c drivers/staging/rtl8192e/r8192E.h drivers/staging/usbip/userspace/src/utils.h
2011-07-26Merge branch 'master' of ↵Larry Finger
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/staging/bcm/headers.h drivers/staging/brcm80211/brcmfmac/dhd_linux.c drivers/staging/brcm80211/brcmfmac/dhd_sdio.c drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h drivers/staging/brcm80211/brcmfmac/wl_iw.c drivers/staging/et131x/et131x_netdev.c drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c drivers/staging/rtl8192e/r8192E.h drivers/staging/usbip/userspace/src/utils.h
2011-07-08staging: usbip: userspace: usbip-utils 1.1.1matt mooney
Bump package revision number! Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08staging: usbip: userspace: README: update example outputmatt mooney
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>
2011-07-08staging: usbip: userspace: usbip: modify `list' help messagematt mooney
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>
2011-07-08staging: usbip: userspace: usbip_list.c: modify exportable device outputmatt mooney
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>
2011-07-08staging: usbip: userspace: fix header installation bugmatt mooney
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>
2011-07-08staging: usbip: userspace: add new prefix for usbip network codematt mooney
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>
2011-07-08staging: usbip: userspace: usbipd: major cleanup of daemonmatt mooney
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>
2011-07-08staging: fix usbip printk format warningRandy Dunlap
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>
2011-07-06staging: usbip: userspace: usbipd.c: fix userspace build errorDavid Chang
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>
2011-07-05drivers/staging/usbip: bugfix prevent driver unbind regression in linux-nextArjan Mels
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>
2011-07-05Staging: usbip: vhci-hcd: Do not kill already dead RX/TX kthreadTobias Klauser
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>
2011-07-05staging: usbip: userspace: configure.ac: change package datamatt mooney
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>
2011-07-05staging: usbip: userspace: usbip_network.c: coding style cleanupmatt mooney
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>
2011-07-05staging: usbip: userspace: usbip_host: update function and variable namesmatt mooney
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>
2011-07-05staging: usbip: userspace: rename stub driver filesmatt mooney
Rename stub_driver.? to usbip_host_driver.? Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05staging: usbip: userspace: usbip list: move output headermatt mooney
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>
2011-07-05staging: usbip: userspace: usbip list: edit output messagesmatt mooney
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>
2011-07-05staging: usbip: userspace: usbip_unbind.c: implement using libsysfsmatt mooney
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>
2011-07-05staging: usbip: userspace: usbip_bind.c: major rewrite of the implementationmatt mooney
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>
2011-07-05staging: usbip: userspace: utils.c: rewrite modify_match_busidmatt mooney
Rewrite the function to use libsysfs. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05staging: usbip: userspace: utils: remove libsysfs circumventionmatt mooney
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>