Skip to content

Commit

Permalink
staging: usbip: fix up api changes that broke windows clients
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Thomas authored and Greg Kroah-Hartman committed Sep 19, 2011
1 parent 14739fe commit 7518b9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/usbip/usbip_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ extern struct device_attribute dev_attr_usbip_debug;
*
*/
#define USBIP_CMD_SUBMIT 0x0001
#define USBIP_RET_SUBMIT 0x0002
#define USBIP_CMD_UNLINK 0x0003
#define USBIP_CMD_UNLINK 0x0002
#define USBIP_RET_SUBMIT 0x0003
#define USBIP_RET_UNLINK 0x0004

#define USBIP_DIR_IN 0x00
#define USBIP_DIR_OUT 0x01
#define USBIP_DIR_OUT 0x00
#define USBIP_DIR_IN 0x01

/**
* struct usbip_header_basic - data pertinent to every request
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/usbip/usbip_protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ USBIP_CMD_SUBMIT: Submit an URB
-----------+--------+------------+---------------------------------------------------
8 | 4 | | devid
-----------+--------+------------+---------------------------------------------------
0xC | 4 | | direction: 0: USBIP_DIR_IN
| | | 1: USBIP_DIR_OUT
0xC | 4 | | direction: 0: USBIP_DIR_OUT
| | | 1: USBIP_DIR_IN
-----------+--------+------------+---------------------------------------------------
0x10 | 4 | | ep: endpoint number, possible values are: 0...15
-----------+--------+------------+---------------------------------------------------
Expand Down Expand Up @@ -285,14 +285,14 @@ USBIP_RET_SUBMIT: Reply for submitting an URB

Offset | Length | Value | Description
-----------+--------+------------+---------------------------------------------------
0 | 4 | 0x00000002 | command
0 | 4 | 0x00000003 | command
-----------+--------+------------+---------------------------------------------------
4 | 4 | | seqnum: URB sequence number
-----------+--------+------------+---------------------------------------------------
8 | 4 | | devid
-----------+--------+------------+---------------------------------------------------
0xC | 4 | | direction: 0: USBIP_DIR_IN
| | | 1: USBIP_DIR_OUT
0xC | 4 | | direction: 0: USBIP_DIR_OUT
| | | 1: USBIP_DIR_IN
-----------+--------+------------+---------------------------------------------------
0x10 | 4 | | ep: endpoint number
-----------+--------+------------+---------------------------------------------------
Expand All @@ -318,14 +318,14 @@ USBIP_CMD_UNLINK: Unlink an URB

Offset | Length | Value | Description
-----------+--------+------------+---------------------------------------------------
0 | 4 | 0x00000003 | command: URB unlink command
0 | 4 | 0x00000002 | command: URB unlink command
-----------+--------+------------+---------------------------------------------------
4 | 4 | | seqnum: URB sequence number to unlink: FIXME: is this so?
-----------+--------+------------+---------------------------------------------------
8 | 4 | | devid
-----------+--------+------------+---------------------------------------------------
0xC | 4 | | direction: 0: USBIP_DIR_IN
| | | 1: USBIP_DIR_OUT
0xC | 4 | | direction: 0: USBIP_DIR_OUT
| | | 1: USBIP_DIR_IN
-----------+--------+------------+---------------------------------------------------
0x10 | 4 | | ep: endpoint number: zero
-----------+--------+------------+---------------------------------------------------
Expand All @@ -345,8 +345,8 @@ USBIP_RET_UNLINK: Reply for URB unlink
-----------+--------+------------+---------------------------------------------------
8 | 4 | | devid
-----------+--------+------------+---------------------------------------------------
0xC | 4 | | direction: 0: USBIP_DIR_IN
| | | 1: USBIP_DIR_OUT
0xC | 4 | | direction: 0: USBIP_DIR_OUT
| | | 1: USBIP_DIR_IN
-----------+--------+------------+---------------------------------------------------
0x10 | 4 | | ep: endpoint number
-----------+--------+------------+---------------------------------------------------
Expand Down

0 comments on commit 7518b9b

Please sign in to comment.