dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

230 Commits

Author SHA1 Message Date
matt mooney 2435ab147b staging: usbip: userspace: usbip: modify `list' help message
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-08 14:01:17 -07:00
matt mooney fcedd169be staging: usbip: userspace: usbip_list.c: modify exportable device output
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-08 14:01:16 -07:00
matt mooney dffb9649d3 staging: usbip: userspace: fix header installation bug
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-08 14:01:16 -07:00
matt mooney 3c6e9e8f35 staging: usbip: userspace: add new prefix for usbip network code
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-08 14:01:15 -07:00
matt mooney e2ec6b4e39 staging: usbip: userspace: usbipd: major cleanup of daemon
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-08 14:01:15 -07:00
Randy Dunlap 6394c5a037 staging: fix usbip printk format warning
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-08 13:59:55 -07:00
David Chang 7104b5df5b staging: usbip: userspace: usbipd.c: fix userspace build error
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-06 08:22:48 -07:00
Arjan Mels 1aee199cad drivers/staging/usbip: bugfix prevent driver unbind regression in linux-next
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-05 20:14:10 -07:00
Tobias Klauser 8547d4cc2b Staging: usbip: vhci-hcd: Do not kill already dead RX/TX kthread
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-05 20:14:10 -07:00
matt mooney c88f9906c3 staging: usbip: userspace: configure.ac: change package data
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-05 20:12:17 -07:00
matt mooney fb5ca8131c staging: usbip: userspace: usbip_network.c: coding style cleanup
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-05 20:12:12 -07:00
matt mooney 756d6726f8 staging: usbip: userspace: usbip_host: update function and variable names
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-05 20:11:35 -07:00
matt mooney a16941aef1 staging: usbip: userspace: rename stub driver files
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-05 20:11:35 -07:00
matt mooney b9d65b1dd3 staging: usbip: userspace: usbip list: move output header
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-05 20:11:35 -07:00
matt mooney 622dde8105 staging: usbip: userspace: usbip list: edit output messages
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-05 20:11:34 -07:00
matt mooney 9cda570411 staging: usbip: userspace: usbip_unbind.c: implement using libsysfs
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-05 20:11:34 -07:00
matt mooney 06c465f5d2 staging: usbip: userspace: usbip_bind.c: major rewrite of the implementation
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-05 20:11:34 -07:00
matt mooney 30f0554659 staging: usbip: userspace: utils.c: rewrite modify_match_busid
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-05 20:11:34 -07:00
matt mooney 42685d577f staging: usbip: userspace: utils: remove libsysfs circumvention
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>
2011-07-05 20:11:34 -07:00
matt mooney 4737d7e332 staging: usbip: userspace: usbip: modify command failure
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>
2011-07-05 20:11:34 -07:00
matt mooney 25567a3979 staging: usbip: userspace: libsrc: change all output messages to debug
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>
2011-07-05 20:11:33 -07:00
matt mooney 099f79fa5a staging: usbip: userspace: libsrc: remove usbip.h
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>
2011-07-05 20:11:33 -07:00
matt mooney c93be5b178 staging: usbip: userspace: usbip.c: add log option
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>
2011-07-05 20:11:33 -07:00
matt mooney f2fb62b371 staging: usbip: userspace: libsrc: set program name for logging
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>
2011-07-05 20:11:33 -07:00
matt mooney 4fd83e84d5 staging: usbip: userspace: usbip_common.h: fixup header includes
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>
2011-07-05 20:11:33 -07:00
matt mooney 93e18e0ece staging: usbip: userspace: usbip_common.h: move enums
Relocate enums to follow logging macros.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 20:11:33 -07:00
matt mooney 213fd4adce staging: usbip: userspace: usbip_common.h: cleanup log macros
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>
2011-07-05 20:11:32 -07:00
matt mooney 9a20542fd2 staging: usbip: userspace: update cleanup.sh
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>
2011-07-05 20:11:32 -07:00
matt mooney 89415218ad staging: usbip: userspace: cleanup README
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>
2011-07-05 19:59:48 -07:00
matt mooney e8323b834d staging: usbip: userspace: add name to AUTHORS
Add myself to the AUTHORS file.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 19:59:47 -07:00
matt mooney 7ddf1a0c48 staging: usbip: userspace: remove usb.ids file
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>
2011-07-05 19:59:47 -07:00
Márton Németh 6f480bf9c3 usbip: simplify port status saving
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>
2011-07-05 19:59:19 -07:00
Márton Németh 4a3ca2bebe usbip: dump the port status difference
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>
2011-07-05 19:59:19 -07:00
Márton Németh bfb4ce2070 usbip: only dump valid port status
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>
2011-07-05 19:59:18 -07:00
Tobias Klauser 981aabb148 Staging: usbip: Fix out-of-tree build for userspace
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>
2011-07-05 10:22:50 -07:00
Joe Perches ceeb6fec70 staging: Fix recieve/receive typos
Just spelling fixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28 14:54:17 -07:00
Vitaliy Ivanov e44ba033c5 treewide: remove duplicate includes
Many stupid corrections of duplicated includes based on the output of
scripts/checkincludes.pl.

Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-20 16:08:19 +02:00
Greg Kroah-Hartman dc5a18941b Merge Linus's tree into staging-next
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>
2011-06-09 13:49:02 -07:00
Akshay Joshi 5ad7b85b90 USBIP: Remove unnecessary whitespace before newline characters.
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>
2011-06-07 14:34:31 -07:00
Márton Németh cf77acfca3 usbip: change dev_attr_group to constant
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>
2011-06-07 14:29:56 -07:00
matt mooney 0a186be359 staging: usbip: stub_main.c: simplify busid_table initialization
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>
2011-06-07 14:29:16 -07:00
matt mooney 1109566469 staging: usbip: userspace: usbip_list.c: cleanup exported device functions
Rename functions and cleanup coding style.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 14:26:19 -07:00
matt mooney 35dd0c2da6 staging: usbip: userspace: rename usbip device and interface
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>
2011-06-07 14:26:18 -07:00
matt mooney 74ce259c67 staging: usbip: userspace: usbip_list.c: refactor local USB device listing
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>
2011-06-07 14:26:17 -07:00
matt mooney 3e4fda9f95 staging: usbip: change the busid size
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>
2011-06-07 14:26:17 -07:00
matt mooney 4cbab52d18 staging: usbip: userspace: move header includes out utils.h
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>
2011-06-07 14:26:17 -07:00
matt mooney 950a4cd8fc staging: usbip: userspace: use memset instead of bzero
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>
2011-06-07 14:26:16 -07:00
Márton Németh a6d81814a5 usbip: remove extra whitespace
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>
2011-06-07 14:08:52 -07:00
Greg Kroah-Hartman acf51ab8ce Staging: usbip: vhci.h: remove FSF address
Remove the FSF address from the comment header.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 14:08:52 -07:00
Greg Kroah-Hartman 69c685c7f5 staging: usbip: README: we need to document the protocol
Document the protocol.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 14:08:51 -07:00
matt mooney 1e35d87d63 staging: usbip: userspace: usbip_network: rename and cleanup function
Rename tcp_connection to usbip_net_tcp_connection, which alludes to a
usbip network library that will eventually follow. The implementation
of this function has also been cleaned up.

Headers had to be adjusted due to the elimination of the old usbip.h.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:56:13 -07:00
matt mooney d2c15e2580 staging: usbip: userspace: usbipd.c: add header into source file
The old usbip.h header that was only used to masked what each source
file needed has been changed. So some headers this file needed had to
be added.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:56:12 -07:00
matt mooney e9837bbb3e staging: usbip: userspace tools v1.0.0
The new and improved (well somewhat, with a ways to go) userspace utility.

    mfm:pts/8[~/tmp/userspace]
    May26 05:18:31 % ./src/usbip help
    usage: usbip [--debug] [version]
                 [help] <command> <args>

      attach     Attach a remote USB device
      detach     Detach a remote USB device
      list       List exported or local USB devices
      bind       Bind device to usbip-host.ko
      unbind     Unbind device from usbip-host.ko

This first commit of the userspace `usbip' utility uses to same
implementation as the old tools, `usbip' and  `usbip_bind_driver'.
Nothing significant has changed so compatibility with windows has
_not_ been broken. However, the tools remain broken in many ways
due to the old implementation.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:56:12 -07:00
matt mooney 58058422f8 staging: usbip: userspace: vhci_driver: parameterize path names
Define a macro for the bus type and use libsysfs for class path.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:56:12 -07:00
matt mooney 7e485ee7f5 staging: usbip: userspace: change struct class_device to usbip_class_device
Rename class_device struct to avoid confusion and change member names.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:56:11 -07:00
matt mooney 5a285cf523 staging: usbip: userspace: set kernel module names in one place
Move kernel module name setting to usbip_common.h so that macros can
be used instead of hard coding the names in multiple places.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:56:11 -07:00
Márton Németh 988e752081 usbip: remove check for negative values for an unsigned value
The parameter rhport is unsigned so there is no need checking for
negative values.

This will remove the following warning message when compiling with "make W=1 ...":
  drivers/staging/usbip/vhci_sysfs.c: In function ‘valid_args’:
  drivers/staging/usbip/vhci_sysfs.c:138: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:54:19 -07:00
Márton Németh 9ba422b346 usbip: simplify lock handling in valid_request()
The function calls spin_lock() and spin_unlock() should be in pair. This patch makes
this pairing more clear for the reader of the code.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:53:24 -07:00
matt mooney 0392bbb6f6 staging: usbip: vhci_hcd.c: rename init and exit functions
Change the prefix of the __init and __exit functions to vhci_hcd_ to
correspond with the modules name. And change the suffix of the __exit
function to exit instead of cleanup.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:26 -07:00
matt mooney 3028d0ae6c staging: usbip: usbip_common.c: rename init and exit functions
Change the prefix of the __init and __exit functions to usbip_core_ to
correspond with the modules name.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:26 -07:00
matt mooney 4b93bb37bb staging: usbip: userspace: bind_driver.c: update kernel module name
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-06-07 13:51:26 -07:00
matt mooney d012c2a5ac staging: usbip: stub_dev.c: move stub_driver definition and update driver name
Move the stub_driver definition to the end of file and, therefore,
remove foward declarations. Update driver name to usbip-host.

A few comments were slightly edited too.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:25 -07:00
matt mooney b7d27eadf8 staging: usbip: usbip_common.h: reorganize and document request headers
Document the request header structures; move #defines out of the
structures; organize function declarations by source file; and move
inline functions to the end of file.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:25 -07:00
matt mooney 2282e1fb6b staging: usbip: usbip_common.c: fix misspelled function name
Change pakcet to packet in usbip_iso_packet_correct_endian().

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:25 -07:00
matt mooney 7d4de89f19 staging: usbip: stub_main.c: use KMEM_CACHE macro
Change kmem_cache_create() to the KMEM_CACHE() macro.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:24 -07:00
matt mooney 27ed5da0b6 staging: usbip: stub_main.c: rename init and exit functions
Change the prefix of the __init and __exit functions to usbip_host_ to
correspond with the modules name.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:23 -07:00
matt mooney 41e02f0116 staging: usbip: stub_main.c: code cleanup
Remove match_find() and replace with get_busid_idx(); change
get_busid_priv(), add_match_busid(), and del_match_busid() to use
get_busid_idx(); and cleanup code in the other functions.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:23 -07:00
matt mooney efad25e9a3 staging: usbip: stub_main.c: reorder functions
Reorder functions so sysfs_ops, show() and store(), are adjacent, and
init_busid_table() is at the beginning of the file.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:22 -07:00
matt mooney 8735276017 staging: usbip: remove unnecessary lines and extra return statements
Also, fix a few alignment issues that were originally missed.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:51:22 -07:00
Arjan Mels d3ac077880 staging: usbip: bugfix prevent driver unbind
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-06-07 12:28:41 -07:00
Linus Torvalds 1f3a8e093f Merge branch 'staging-next' of 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-23 12:49:28 -07:00
matt mooney 1a4b6f6628 staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_
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-19 16:57:30 -07:00
matt mooney 3fadc1212a staging: usbip: userspace: bind-driver.c: mark remote_host as unused
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-19 15:34:10 -07:00
matt mooney 2006d35d61 staging: usbip: userspace: stub_driver.c: update kernel module name
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-19 15:34:09 -07:00
matt mooney 1c6e79d992 staging: usbip: userspace: modify project gcc flags
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-17 13:26:29 -07:00
matt mooney be0d54ae39 staging: usbip: userspace: move common cflags to configure.ac
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-17 13:26:29 -07:00
matt mooney 968c6595e7 staging: usbip: userspace: remove gcc warnings
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-17 13:26:28 -07:00
matt mooney 88d6f40839 staging: usbip: userspace: remove revision $Id$
This is git not CVS!

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 13:26:28 -07:00
matt mooney d762f5e10c staging: usbip: userspace: set libusbip version in configure.ac
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-17 13:26:27 -07:00
matt mooney cd62e07e87 staging: usbip: userspace: cleanup makefiles
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-17 13:26:27 -07:00
matt mooney af8bab0639 staging: usbip: userspace: configure.ac: major overhaul
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-17 13:26:27 -07:00
matt mooney 220973dd23 staging: usbip: userspace: update module name references
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-17 13:26:26 -07:00
matt mooney 9abec45232 staging: usbip: userspace: whitespace cleanup
Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 13:26:26 -07:00
matt mooney 33df2286f7 staging: usbip: userspace: remove unused files
Remove ChangeLog and NEWS.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 13:26:25 -07:00
matt mooney f9b90071e0 staging: usbip: userspace: rename source directories
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-17 13:26:25 -07:00
matt mooney 7f27b19911 staging: usbip: userspace: move manpages to separate directory
Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-17 13:26:24 -07:00
Takahiro Hirofuchi 0945b4fe3f staging: usbip: add userspace code
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-17 13:23:42 -07:00
David Chang cacd18a847 staging: usbip: fix wrong endian conversion
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-17 11:37:13 -07:00
matt mooney 64e62426f4 staging: usbip: edit Kconfig and rename CONFIG options
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-12 09:17:57 -07:00
matt mooney 7aaacb43ed staging: usbip: fix header includes
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-12 09:17:56 -07:00
matt mooney fc184a35d9 staging: usbip: vhci.h: reorganize
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-11 14:11:14 -07:00
matt mooney 499aaae000 staging: usbip: stub.h: reorganize
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-11 14:11:14 -07:00
matt mooney 6973c6f24e staging: usbip: use single version for all modules
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-11 14:06:52 -07:00
matt mooney 981f30cc9b staging: usbip: change debug configuration option
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-11 14:06:51 -07:00
matt mooney 4ce0a41f10 staging: usbip: fixup MODULE_ macros
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-06 14:26:16 -07:00
matt mooney 6a298401fc staging: usbip: remove section dividers
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-06 14:26:15 -07:00
matt mooney 49aecefcde staging: usbip: add break to default case in switch statements
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-06 14:26:15 -07:00
matt mooney 5c6499d8bf staging: usbip: vhci_tx.c: coding style cleanup
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-06 14:26:15 -07:00
matt mooney bd608f6ceb staging: usbip: vhci_sysfs.c: coding style cleanup
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-06 14:26:14 -07:00
matt mooney 5ef6aceb12 staging: usbip: vhci_rx.c: coding style cleanup
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-06 14:26:14 -07:00