Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64822
b: refs/heads/master
c: 49b4f90
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Sep 11, 2007
1 parent 46bc699 commit c81f96f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 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: 86833691c21efba661bd3512d2ebfa0b96c011c5
refs/heads/master: 49b4f902857c3d8d95b47ae5a8cecb34ae96a3ba
25 changes: 15 additions & 10 deletions trunk/drivers/usb/gadget/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,14 +1691,12 @@ static int gs_setup_class(struct usb_gadget *gadget,

switch (ctrl->bRequest) {
case USB_CDC_REQ_SET_LINE_CODING:
ret = min(wLength,
(u16)sizeof(struct usb_cdc_line_coding));
if (port) {
spin_lock(&port->port_lock);
memcpy(&port->port_line_coding, req->buf, ret);
spin_unlock(&port->port_lock);
}
ret = 0;
/* FIXME Submit req to read the data; have its completion
* handler copy that data to port->port_line_coding (iff
* it's valid) and maybe pass it on. Until then, fail.
*/
printk(KERN_WARNING "gs_setup: set_line_coding "
"unuspported\n");
break;

case USB_CDC_REQ_GET_LINE_CODING:
Expand All @@ -1713,11 +1711,18 @@ static int gs_setup_class(struct usb_gadget *gadget,
break;

case USB_CDC_REQ_SET_CONTROL_LINE_STATE:
ret = 0;
/* FIXME Submit req to read the data; have its completion
* handler use that to set the state (iff it's valid) and
* maybe pass it on. Until then, fail.
*/
printk(KERN_WARNING "gs_setup: set_control_line_state "
"unuspported\n");
break;

default:
printk(KERN_ERR "gs_setup: unknown class request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n",
printk(KERN_ERR "gs_setup: unknown class request, "
"type=%02x, request=%02x, value=%04x, "
"index=%04x, length=%d\n",
ctrl->bRequestType, ctrl->bRequest,
wValue, wIndex, wLength);
break;
Expand Down

0 comments on commit c81f96f

Please sign in to comment.