aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/usbip
AgeCommit message (Collapse)Author
2011-12-09staging: usbip: bugfix for deadlockBart Westgeest
commit 438957f8d4a84daa7fa5be6978ad5897a2e9e5e5 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-04Staging: usbip: vhci-hcd: Do not kill already dead RX/TX kthreadTobias Klauser
commit 8547d4cc2b616e4f1dafebe2c673fc986422b506 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07staging: usbip: bugfix prevent driver unbindArjan Mels
Implemented pre_reset and post_reset methods of the driver to prevent the driver from being unbound upon a device reset. Because of this also the asynchronous reset introduced to prevent a race condition is no longer necessary (and sometimes causes problems, because it comes later then expected). Signed-off-by: Arjan Mels <arjan.mels@gmx.net> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Max Vozeler <max@vozeler.com> Cc: usbip-devel <usbip-devel@lists.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-23Merge branch 'staging-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (970 commits) staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_ staging:iio: Trivial kconfig reorganization and uniformity improvements. staging:iio:documenation partial update. staging:iio: use pollfunc allocation helpers in remaining drivers. staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out. staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev. staging:iio:meter:ade7758: Use private data space from iio_allocate_device staging:iio:accel:lis3l02dq make write_reg_8 take value not a pointer to value. staging:iio: ring core cleanups + check if read_last available in lis3l02dq staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to handle creation of event interface name. staging:iio: poll func allocation clean up. staging:iio:ad7780 trivial unused header cleanup. staging:iio:adc: AD7780: Use private data space from iio_allocate_device + trivial fixes staging:iio:adc:AD7780: Convert to new channel registration method staging:iio:adc: AD7606: Drop dev_data in favour of iio_priv() staging:iio:adc: AD7606: Consitently use indio_dev staging:iio: Rip out helper for software rings. staging:iio:adc:AD7298: Use private data space from iio_allocate_device staging:iio: rationalization of different buffer implementation hooks. staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev. ... Fix up trivial conflicts in - drivers/staging/intel_sst/intelmid.c: patches applied in both branches - drivers/staging/rt2860/common/cmm_data_{pci,usb}.c: removed vs spelling - drivers/staging/usbip/vhci_sysfs.c: trivial header file inclusion
2011-05-19staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_matt mooney
This switches all of the usbip_u{dbg,err,info} and printk statements to dev_<level>, if possible, or pr_<level> macros. And removes a few unnecessary debug statements. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19staging: usbip: userspace: bind-driver.c: mark remote_host as unusedmatt mooney
Use __attribute__((unused)) to suppress error until it can be determined that remote_host is not needed. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19staging: usbip: userspace: stub_driver.c: update kernel module namematt mooney
Change kernel module name to usbip-host. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: modify project gcc flagsmatt mooney
Add -Werror, remove -Wstrict-prototypes, and change -W to -Wextra. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: move common cflags to configure.acmatt mooney
There are a standard set of cflags that are used in each makefile so let's set those in EXTRA_CFLAGS and enforce them for the entire project. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: remove gcc warningsmatt mooney
The warnings were for unused parameters, so __attribute__((unused)) has been added until it can be determined they are truly unneeded. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: remove revision $Id$matt mooney
This is git not CVS! Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: set libusbip version in configure.acmatt mooney
Move libusbip version setting to configure.ac so that version numbers can be found in a single location. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: cleanup makefilesmatt mooney
Remove unneeded comments; change deprecated flag INCLUDE to AM_CPPFLAGS and put -D option in *_CPPFLAGS; and use "simply expanded variables" in assignments. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: configure.ac: major overhaulmatt mooney
All parameters have been quoted; and autoscan was rerun so new headers, types, and functions were added. The deprecated macros AM_CONFIG_HEADER and AM_PROG_LIBTOOL were changed to AC_CONFIG_HEADERS and LT_INIT, respectively. The AS_HELP_STRING macro is used to avoid arbitrary spacing for proper help menu alignment, and AS_CASE to avoid quoting issues. And finally, the macros were realigned to allow mere mortals the ability to read them. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: update module name referencesmatt mooney
Change all references to the kernel modules to correspond with the new names. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: whitespace cleanupmatt mooney
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: remove unused filesmatt mooney
Remove ChangeLog and NEWS. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: rename source directoriesmatt mooney
Rename cmd/ to src/ and lib/ to libsrc/. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: userspace: move manpages to separate directorymatt mooney
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: add userspace codeTakahiro Hirofuchi
Add userspace code from svn trunk revision 175. Located at https://usbip.svn.sourceforge.net/svnroot/usbip/linux/trunk/src. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17staging: usbip: fix wrong endian conversionDavid Chang
Fix number_of_packets wrong endian conversion in function correct_endian_ret_submit() Signed-off-by: David Chang <dchang@novell.com> Acked-by: Arjan Mels <arjan.mels@gmx.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-12staging: usbip: edit Kconfig and rename CONFIG optionsmatt mooney
Change modules usbip_common_mod to usbip-core and usbip to usbip-host; edit configuration option help text; rename CONFIG options to use a USBIP prefix and change COMMON to CORE in both the Kconfig and Makefiles; edit the menu entries; and edit the driver descriptions. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-12staging: usbip: fix header includesmatt mooney
Modify header directives to include what is needed by each file and not already included in its own header. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11staging: usbip: vhci.h: reorganizematt mooney
Split function declarations by source file. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11staging: usbip: stub.h: reorganizematt mooney
Move a few functions around for better organization and add missing parameter names in function declarations. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11staging: usbip: use single version for all modulesmatt mooney
Having separate versions in this situation makes little sense, so USBIP_VERSION will be used by all modules. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11staging: usbip: change debug configuration optionmatt mooney
Change CONFIG_USB_IP_DEBUG_ENABLE to CONFIG_USB_IP_DEBUG, and move ccflags- to the head of the makefile. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: fixup MODULE_ macrosmatt mooney
Modify description and email address for usbip_common_mod; export module version number; and modify __init messages slightly. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: remove section dividersmatt mooney
Also, removes the one-line comments that were associated with some of the dividers because they provided no additional information. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: add break to default case in switch statementsmatt mooney
For consistency, a break statement is added to all default cases that do not jump to a label. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: vhci_tx.c: coding style cleanupmatt mooney
Fix a few alignment issues and remove extraneous lines. Use ternary operator for pdup->base.direction assignment. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: vhci_sysfs.c: coding style cleanupmatt mooney
Fix a few alignment issues and remove extraneous lines. Add braces to else clause. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: vhci_rx.c: coding style cleanupmatt mooney
Fix alignment for consistency and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: vhci_hcd.c: coding style cleanupmatt mooney
Fix alignment for consistency and remove extraneous lines. Move MODULE_ macros to the end of file. Make bit_desc[] an array of const pointers. Add KERN_ level to a couple of printks. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: vhci.h: coding style cleanupmatt mooney
Fix a few alignment issues and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: stub.h: coding style cleanupmatt mooney
Remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: usbip_event.c: coding style cleanupmatt mooney
Fix a few alignment issues and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: usbip_common.c: coding style cleanupmatt mooney
Fix alignment for consistency, checkpatch.pl warning of line over 80 characters, and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: usbip_common.h: coding style cleanupmatt mooney
Use the compiler macro __packed, fix a few alignment issues, and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: stub_tx.c: coding style cleanupmatt mooney
Fix alignment for consistency, checkpatch.pl warnings for lines over 80 characters, remove extraneous lines, and change conversion specifier within a format string to remove warning. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: stub_rx.c: coding style cleanupmatt mooney
Fix alignment for consistency and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: stub_main.c: coding style cleanupmatt mooney
Fix alignment for consistency and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-06staging: usbip: stub_dev.c: coding style cleanupmatt mooney
Fix alignment for consistency and remove extraneous lines. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-04Merge branch 'staging-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: staging: Remove a warning for drivers/staging/wlan-ng/cfg80211.c staging: intel_sst: intelmid needs delay.h staging: solo6x10: add select SND_PCM to fix build error staging: usbip: vhci: fix oops on subsequent attach staging: ft1000: Remove unnecessary EXPORT_SYMBOLs staging: rts_pstor: use #ifdef instead of #if staging: rts_pstor: Add <linux/vmalloc.h> staging: gma500: Depend on X86 staging: olpc: Add <linux/delay.h>
2011-05-02USB: fix regression in usbip by setting has_tt flagAlan Stern
This patch (as1460) fixes a regression in the usbip driver caused by the new check for Transaction Translators in USB-2 hubs. The root hub registered by vhci_hcd needs to have the has_tt flag set, because it can connect to low- and full-speed devices as well as high-speed devices. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-and-tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz> CC: <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: usbip: vhci: fix oops on subsequent attachMax Vozeler
vhci_rx/vhci_tx threads are created once but stopped each time the vdev is shut down. On subsequent attach wake_up_process() oopses trying to access the stopped threads. This patch does as before the kthread conversion which is to create the threads each time a device is attached and stop the threads when the device is shut down. Signed-off-by: Max Vozeler <max@hinterhof.net> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Arjan Mels <arjan.mels@gmx.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-07Merge branch 'staging-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (28 commits) staging: usbip: bugfix for isochronous packets and optimization staging: usbip: bugfix add number of packets for isochronous frames staging: usbip: bugfixes related to kthread conversion staging: usbip: fix shutdown problems. staging: hv: Fix GARP not sent after Quick Migration staging: IIO: IMU: ADIS16400: Avoid using printk facility directly staging: IIO: IMU: ADIS16400: Fix product ID check, skip embedded revision number staging: IIO: IMU: ADIS16400: Make sure only enabled scan_elements are pushed into the ring staging: IIO: IMU: ADIS16400: Fix addresses of GYRO and ACCEL calibration offset staging: IIO: IMU: ADIS16400: Add delay after self test staging: IIO: IMU: ADIS16400: Fix up SPI messages cs_change behavior staging/rtl81*: build as loadable modules only staging: brcm80211: removed 'is_amsdu causing toss' log spam staging: brcm80211: fix for 'Short CCK' log spam staging: brcm80211: fix for 'AC_BE txop..' logs spammed problem staging: memrar: remove driver from tree staging: sep: remove last memrar remnants staging: fix hv_mouse build, needs delay.h staging: fix olpc_dcon build errors staging: sm7xx: fixed defines ... Fix up trivial conflict in drivers/staging/memrar/memrar_handler.c (deleted vs trivial spelling fixes)
2011-04-06staging: usbip: bugfix for isochronous packets and optimizationArjan Mels
For isochronous packets the actual_length is the sum of the actual length of each of the packets, however between the packets might be padding, so it is not sufficient to just send the first actual_length bytes of the buffer. To fix this and simultanesouly optimize the bandwidth the content of the isochronous packets are send without the padding, the padding is restored on the receiving end. Signed-off-by: Arjan Mels <arjan.mels@gmx.net> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Max Vozeler <max@vozeler.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06staging: usbip: bugfix add number of packets for isochronous framesArjan Mels
The number_of_packets was not transmitted for RET_SUBMIT packets. The linux client used the stored number_of_packet from the submitted request. The windows userland client does not do this however and needs to know the number_of_packets to determine the size of the transmission. Signed-off-by: Arjan Mels <arjan.mels@gmx.net> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Max Vozeler <max@vozeler.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-06staging: usbip: bugfixes related to kthread conversionArjan Mels
When doing a usb port reset do a queued reset instead to prevent a deadlock: the reset will cause the driver to unbind, causing the usb_driver_lock_for_reset to stall. Signed-off-by: Arjan Mels <arjan.mels@gmx.net> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Max Vozeler <max@vozeler.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>