Apparently this gadget doesn't support setting usb_cdc_line_coding. But the code pretends that it supports, and queues a zero length request for the DATA phase. That will cause overflow for udc in processing the DATA transaction. The patch make it return -EOPNOTSUPP and stall cleanly.
Signed-off-by: Li Yang <[EMAIL PROTECTED]> --- diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index e552668..0911bc4 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -1692,14 +1692,7 @@ 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: We don't support set line coding */ break; case USB_CDC_REQ_GET_LINE_CODING: ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel