From a261a5c7c813a14a95d6ac5f2176323869f3ea96 Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Mon, 7 Mar 2011 16:35:15 -0600 Subject: added mtcdp-embedded machine type --- .../mtcdp-embedded/linux-2.6.32.3-option.patch | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-option.patch (limited to 'recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-option.patch') diff --git a/recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-option.patch b/recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-option.patch new file mode 100644 index 0000000000..c778e53334 --- /dev/null +++ b/recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-option.patch @@ -0,0 +1,71 @@ +diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/drivers/usb/serial/option.c linux-2.6.32.3/drivers/usb/serial/option.c +--- linux-2.6.32.3-vanilla/drivers/usb/serial/option.c 2010-01-06 17:07:45.000000000 -0600 ++++ linux-2.6.32.3/drivers/usb/serial/option.c 2010-09-02 13:24:59.000000000 -0500 +@@ -913,33 +913,46 @@ static void option_indat_callback(struct + dbg("%s: %p", __func__, urb); + + endpoint = usb_pipeendpoint(urb->pipe); +- port = urb->context; ++ port = urb->context; + +- if (status) { ++ switch (status) { ++ case 0: ++ /* success */ ++ break; ++ case -ECONNRESET: ++ case -ENOENT: ++ case -ESHUTDOWN: ++ /* this urb is terminated, clean up */ ++ dbg("%s: urb shutting down with status: %d on endpoint %02x.", ++ __func__, status, endpoint); ++ return; ++ default: + dbg("%s: nonzero status: %d on endpoint %02x.", +- __func__, status, endpoint); +- } else { ++ __func__, status, endpoint); ++ goto exit; ++ } ++ ++ usb_serial_debug_data(debug, &port->dev, __func__, ++ urb->actual_length, data); ++ ++ if (urb->actual_length) { + tty = tty_port_tty_get(&port->port); +- if (urb->actual_length) { +- tty_buffer_request_room(tty, urb->actual_length); +- tty_insert_flip_string(tty, data, urb->actual_length); +- tty_flip_buffer_push(tty); +- } else +- dbg("%s: empty read urb received", __func__); +- tty_kref_put(tty); + +- /* Resubmit urb so we continue receiving */ +- if (port->port.count && status != -ESHUTDOWN) { +- err = usb_submit_urb(urb, GFP_ATOMIC); +- if (err) +- printk(KERN_ERR "%s: resubmit read urb failed. " +- "(%d)", __func__, err); +- else +- usb_mark_last_busy(port->serial->dev); +- } ++ tty_buffer_request_room(tty, urb->actual_length); ++ tty_insert_flip_string(tty, data, urb->actual_length); ++ tty_flip_buffer_push(tty); + ++ tty_kref_put(tty); + } +- return; ++ ++exit: ++ /* Resubmit urb so we continue receiving */ ++ err = usb_submit_urb(urb, GFP_ATOMIC); ++ if (err && err != -EPERM) ++ printk(KERN_ERR "%s: resubmit read urb failed. " ++ "(%d)", __func__, err); ++ else ++ usb_mark_last_busy(port->serial->dev); + } + + static void option_outdat_callback(struct urb *urb) -- cgit v1.2.3