Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303715
b: refs/heads/master
c: 3244560
h: refs/heads/master
i:
  303713: 6271086
  303711: 955bda0
v: v3
  • Loading branch information
Preston Fick authored and Greg Kroah-Hartman committed May 2, 2012
1 parent a8e63c1 commit 2cbf28b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aadd6472d904c374e31c952fbf634e21e28807e0
refs/heads/master: 32445605fc2ff967326c14156f199e620ed81c10
12 changes: 7 additions & 5 deletions trunk/drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ static struct usb_serial_driver * const serial_drivers[] = {
};

/* Config request types */
#define REQTYPE_HOST_TO_DEVICE 0x41
#define REQTYPE_DEVICE_TO_HOST 0xc1
#define REQTYPE_HOST_TO_INTERFACE 0x41
#define REQTYPE_INTERFACE_TO_HOST 0xc1
#define REQTYPE_HOST_TO_DEVICE 0x40
#define REQTYPE_DEVICE_TO_HOST 0xc0

/* Config request codes */
#define CP210X_IFC_ENABLE 0x00
Expand Down Expand Up @@ -286,7 +288,7 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,

/* Issue the request, attempting to read 'size' bytes */
result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
request, REQTYPE_DEVICE_TO_HOST, 0x0000,
request, REQTYPE_INTERFACE_TO_HOST, 0x0000,
port_priv->bInterfaceNumber, buf, size,
USB_CTRL_GET_TIMEOUT);

Expand Down Expand Up @@ -340,13 +342,13 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
if (size > 2) {
result = usb_control_msg(serial->dev,
usb_sndctrlpipe(serial->dev, 0),
request, REQTYPE_HOST_TO_DEVICE, 0x0000,
request, REQTYPE_HOST_TO_INTERFACE, 0x0000,
port_priv->bInterfaceNumber, buf, size,
USB_CTRL_SET_TIMEOUT);
} else {
result = usb_control_msg(serial->dev,
usb_sndctrlpipe(serial->dev, 0),
request, REQTYPE_HOST_TO_DEVICE, data[0],
request, REQTYPE_HOST_TO_INTERFACE, data[0],
port_priv->bInterfaceNumber, NULL, 0,
USB_CTRL_SET_TIMEOUT);
}
Expand Down

0 comments on commit 2cbf28b

Please sign in to comment.