summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip
AgeCommit message (Collapse)Author
2014-06-03Merge tag 'usb-3.16-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb into next Pull USB driver updates from Greg KH: "Here is the big USB driver pull request for 3.16-rc1. Nothing huge here, but lots of little things in the USB core, and in lots of drivers. Hopefully the USB power management will be work better now that it has been reworked to do per-port power control dynamically. There's also a raft of gadget driver updates and fixes, CONFIG_USB_DEBUG is finally gone now that everything has been converted over to the dynamic debug inteface, the last hold-out drivers were cleaned up and the config option removed. There were also other minor things all through the drivers/usb/ tree, the shortlog shows this pretty well. All have been in linux-next, including the very last patch, which came from linux-next to fix a build issue on some platforms" * tag 'usb-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (314 commits) usb: hub_handle_remote_wakeup() only exists for CONFIG_PM=y USB: orinoco_usb: remove CONFIG_USB_DEBUG support USB: media: lirc: igorplugusb: remove CONFIG_USB_DEBUG support USB: media: streamzap: remove CONFIG_USB_DEBUG USB: media: redrat3: remove CONFIG_USB_DEBUG usage USB: media: redrat3: remove unneeded tracing macro usb: qcserial: add additional Sierra Wireless QMI devices usb: host: max3421-hcd: Use module_spi_driver usb: host: max3421-hcd: Allow platform-data to specify Vbus polarity usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue() usb: qcserial: add Netgear AirCard 341U Documentation: dt-bindings: update xhci-platform DT binding for R-Car H2 and M2 usb: host: xhci-plat: add xhci_plat_start() usb: host: max3421-hcd: Fix potential NULL urb dereference Revert "usb: gadget: net2280: Add support for PLX USB338X" USB: usbip: remove CONFIG_USB_DEBUG reference USB: remove CONFIG_USB_DEBUG from defconfig files usb: resume child device when port is powered on usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y ...
2014-05-28USB: usbip: remove CONFIG_USB_DEBUG referenceGreg Kroah-Hartman
As the config option is gone, it's a bit hard to enable it so remove the reference to it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: Convert __FUNCTION__ to __func__Joe Perches
Use the normal mechanism for emitting a function name. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: usbip: use kcalloc instead of kzalloc for array allocationsDjordje Zekovic
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. Signed-off-by: Djordje Zekovic <dj@zeko.me> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24staging: usbip: Fix bad fuction definitions in usbipPawel Lebioda
Fix bad function definitions in all files from drivers/staging/usbip directory Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24Staging: usbip: missing a blank lines after declarationsPawel Lebioda
Fix "Missing a blank line after declaration" style problems for all files in drivers/staging/usbip. Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15staging/usbip: fix store_attach() sscanf return value checkShuah Khan
sscanf() parses the input buffer for four input items. However, the return value check is incorrect, as it checks for one input item instead of four which is what it is expecting in the input buffer. As a result, sscanf() will always fail even when the input buffer is correct. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-15staging/usbip: userspace - fix usbipd SIGSEGV from refresh_exported_devices()Shuah Khan
refresh_exported_devices() doesn't check udev_device_new_from_syspath() return value and passed in null dev to udev_device_get_driver() resulting in a segmentation fault. Change it to check for null return value from both udev_device_new_from_syspath() and udev_device_get_driver(). Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-12Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs updates from Al Viro: "The first vfs pile, with deep apologies for being very late in this window. Assorted cleanups and fixes, plus a large preparatory part of iov_iter work. There's a lot more of that, but it'll probably go into the next merge window - it *does* shape up nicely, removes a lot of boilerplate, gets rid of locking inconsistencie between aio_write and splice_write and I hope to get Kent's direct-io rewrite merged into the same queue, but some of the stuff after this point is having (mostly trivial) conflicts with the things already merged into mainline and with some I want more testing. This one passes LTP and xfstests without regressions, in addition to usual beating. BTW, readahead02 in ltp syscalls testsuite has started giving failures since "mm/readahead.c: fix readahead failure for memoryless NUMA nodes and limit readahead pages" - might be a false positive, might be a real regression..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) missing bits of "splice: fix racy pipe->buffers uses" cifs: fix the race in cifs_writev() ceph_sync_{,direct_}write: fix an oops on ceph_osdc_new_request() failure kill generic_file_buffered_write() ocfs2_file_aio_write(): switch to generic_perform_write() ceph_aio_write(): switch to generic_perform_write() xfs_file_buffered_aio_write(): switch to generic_perform_write() export generic_perform_write(), start getting rid of generic_file_buffer_write() generic_file_direct_write(): get rid of ppos argument btrfs_file_aio_write(): get rid of ppos kill the 5th argument of generic_file_buffered_write() kill the 4th argument of __generic_file_aio_write() lustre: don't open-code kernel_recvmsg() ocfs2: don't open-code kernel_recvmsg() drbd: don't open-code kernel_recvmsg() constify blk_rq_map_user_iov() and friends lustre: switch to kernel_sendmsg() ocfs2: don't open-code kernel_sendmsg() take iov_iter stuff to mm/iov_iter.c process_vm_access: tidy up a bit ...
2014-04-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual rocket science -- mostly documentation and comment updates" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: sparse: fix comment doc: fix double words isdn: capi: fix "CAPI_VERSION" comment doc: DocBook: Fix typos in xml and template file Bluetooth: add module name for btwilink driver core: unexport static function create_syslog_header mmc: core: typo fix in printk specifier ARM: spear: clean up editing mistake net-sysfs: fix comment typo 'CONFIG_SYFS' doc: Insert MODULE_ in module-signing macros Documentation: update URL to hfsplus Technote 1150 gpio: update path to documentation ixgbe: Fix format string in ixgbe_fcoe. Kconfig: Remove useless "default N" lines user_namespace.c: Remove duplicated word in comment CREDITS: fix formatting treewide: Fix typo in Documentation/DocBook mm: Fix warning on make htmldocs caused by slab.c ata: ata-samsung_cf: cleanup in header file idr: remove unused prototype of idr_free()
2014-04-01usbip: don't open-code sockfd_lookup/sockfd_putAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-03-20staging: usbip: fix line over 80 charactersCédric Cabessa
Signed-off-by: Cédric Cabessa <ced@ryick.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-20staging: usbip: fix quoted string split across linesCédric Cabessa
Signed-off-by: Cédric Cabessa <ced@ryick.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: usbip: Fix quoted string split across lines.Keerthimai Janarthanan
Fix quoted string split across lines. Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-10usbcore: rename struct dev_state to struct usb_dev_stateValentina Manea
Since it is needed outside usbcore and exposed in include/linux/usb.h, it conflicts with enum dev_state in rt2x00 wireless driver. Mark it as usb specific to avoid conflicts in the future. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: add hwdata as optional dependency in READMEValentina Manea
This is an optional dependency since USB/IP can fully work without it. However, it is needed to display device information such as vendor. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: don't throw error when trying to read ↵Valentina Manea
configuration specific attributes When a device has just been bound to usbip-host but the client hasn't set a configuration on it, certain attributes will not exist. Don't treat this as an error. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: claim ports used by shared devicesValentina Manea
A device should not be able to be used concurrently both by the server and the client. Claiming the port used by the shared device ensures no interface drivers bind to it and that it is not usable from the server. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: trigger driver probing after unbinding from usbip-hostValentina Manea
A sysfs attribute is used to announce kernel space that a new driver probing session should be triggered for the just unbinded device. In order to have the address of struct device associated to this USB device, a new member has been added to struct bus_id_priv. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: let client choose device configurationValentina Manea
Since usbip-host is now a device driver and the client has full access to the shared device, it makes sense to let the client choose device configuration. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: increase version to 2.0Valentina Manea
Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: update dependencies in READMEValentina Manea
Add libudev as dependency and remove libsysfs. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: remove libsysfs flag and autoconf checkValentina Manea
libsysfs is now completely removed from USB/IP. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: migrate vhci_driver to libudevValentina Manea
This patch migrates vhci_driver to libudev. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: remove class device infrastructure in vhci_driverValentina Manea
The class device lists were used only when being initialized, being populated and being destroyed. They had no real meaning and thus the code was useless. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: migrate usbip_host_driver to libudevValentina Manea
This patch modifies usbip_host_driver to use libudev. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: move sysfs_utils to libsrcValentina Manea
Since it offers a API to both usbip tools and libusbip, it is more appropriate to be place in the library. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: add new list APIValentina Manea
Take the linked list implementation from the Linux Kernel and strip it down to what it is needed. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: re-add interface information listingValentina Manea
This was deleted in the driver conversion patch. It didn't need to be deleted; showing more information is ok. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: migrate usbip_list to libudevValentina Manea
This patch modifies usbip_list to use libudev. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: migrate usbip_unbind to libudevValentina Manea
This patch modifies usbip_unbind to use libudev. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: remove useless libsysfs includesValentina Manea
This patch removes useless libsysfs.h includes in various userspace files. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: usbip: userspace: migrate usbip_bind to libudevValentina Manea
This patch adds autoconf check for libudev and migrates usbip_bind to the new library. libsysfs will still be used until all userspace is modified. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06usbip:usbip_common.c: check return value of sscanfJohn de la Garza
Added code to check return value of sscanf. Signed-off-by: John de la Garza <john@jjdev.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06staging: usbip: vhci_sysfs.c: check return value of sscanfJohn de la Garza
Added code to check return value of sscanf. Signed-off-by: John de la Garza <john@jjdev.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-04staging/usbip: change usbip userspace to include new uapi usbip.hShuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. A new uapi usbip.h now defines the usbip device status for kernel and userspace to use. Change usbip userspace to include uapi usbip.h for usbip device status. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-04staging/usbip: change usbip to include new uapi usbip.hShuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. A new uapi usbip.h now defines the usbip device status for kernel and userspace to use. Change usbip kernel space to include uapi usbip.h for usbip device status. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-04staging/usbip: add uapi header to export usbip kernel interfacesShuah Khan
usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. Adding an usbip uapi header file will define the kernel - userspace interface for this device status. This new uapi file is added under usbip/uapi to keep the staging tree code self-contained. When usbip moves to mainline drivers, this file should be moved under uapi/linux Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28staging: usbip: userspace: Memory leak in usbip_exported_device_newHeinrich Schuchardt
Memory was leaked and a device not closed if we ran out of memory on the system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27staging: usbip: Fix format string mismatch in usbip_vhci_attach_device2Masanari Iida
Argument type of sockfd is set as int, but format string is set as unsigned int. Fix the mismatch. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27Staging: usbip: Fix the warning of unchecked sscanf return value.Elena Oat
The return value of sscanf in stub_dev.c is not checked. This patch adds the checking of the return value. Signed-off-by: Elena Oat <oat.elena@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-20Merge branch 'master' into for-nextJiri Kosina
2014-02-20Kconfig: Remove useless "default N" linesPaul Bolle
A number of Kconfig entries default to (uppercase) "N". It was clearly intended to use "default n". But since (lowercase) "n" is the default anyway, these lines might as well be removed. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-14staging: usbip: prevent possible buffer overflow reading port recordsMark Asselstine
To avoid buffer overflow while reading a corrupted or possibly modified port file we validate the length of each part of the port record to ensure it doesn't exceed the length of the destination buffer. https://bugzilla.kernel.org/show_bug.cgi?id=69931 Signed-off-by: Mark Asselstine <asselsm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-08Merge branch 'staging-linus' into staging-workGreg Kroah-Hartman
This is to pull in the lustre fixes so that others can continue to work on updating the lustre codebase, as well as resolve some merge issues with the ion and ocproto drivers to keep linux-next happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07usbip/userspace/libsrc/names.c: memory leakHeinrich Schuchardt
revised patch p is freed if NULL. p is leaked if second calloc fails. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging/usbip: userspace to use linux header for usb_device_speed enum, ↵Shuah Khan
missing speeds to speed_strings array Remove usb_device_speed enum define from usbip_common.h and change it to include linux/usb/ch9.h instead. Add speed strings for usb wireless and 3.0 to speed_strings array. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging/usbip: simplify usbip_dump_usb_device() udev->speed handlingShuah Khan
Change usbip_dump_usb_device() to use usb_speed_string() and remove the code that does switch on udev->speed and builds custom speed strings. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging: usbip: convert usbip-host driver to usb_device_driverValentina Manea
This driver was previously an interface driver. Since USB/IP exports a whole device, not just an interface, it would make sense to be a device driver. This patch also modifies the way userspace sees and uses a shared device: * the usbip_status file is no longer created for interface 0, but for the whole device (such as /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/usbip_status). * per interface information, such as interface class or protocol, is no longer sent/received; only device specific information is transmitted. * since the driver was moved one level below in the USB architecture, there is no need to bind/unbind each interface, just the device as a whole. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging/usbip: Change vhci_hcd store_attach() device information message to ↵Shuah Khan
include speed string Change vhci_hcd store_attach() routine to include speed string in its device information message. The current call to dev_info() prints out speed number which is the enum number. Change to call usb_speed_string() to print speed string in addition to the number. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>