From: Greg Kroah-Hartman Date: Fri, 17 Aug 2012 17:56:01 +0000 (-0700) Subject: 3.5-stable patches X-Git-Tag: v3.5.3~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc29a884e64e397b8161d3ec8021969e518c1d17;p=thirdparty%2Fkernel%2Fstable-queue.git 3.5-stable patches added patches: rt2x00-add-support-for-buffalo-wli-uc-gnm2-to-rt2800usb.patch usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch usb-gadget-u_ether-fix-kworker-100-cpu-issue-with-still-used-interfaces-in-eth_stop.patch usb-serial-mos7840-fixup-mos7840_chars_in_buffer.patch --- diff --git a/queue-3.5/rt2x00-add-support-for-buffalo-wli-uc-gnm2-to-rt2800usb.patch b/queue-3.5/rt2x00-add-support-for-buffalo-wli-uc-gnm2-to-rt2800usb.patch new file mode 100644 index 00000000000..4785866002a --- /dev/null +++ b/queue-3.5/rt2x00-add-support-for-buffalo-wli-uc-gnm2-to-rt2800usb.patch @@ -0,0 +1,29 @@ +From a769f9577232afe2c754606a83aad85127e7052a Mon Sep 17 00:00:00 2001 +From: Jeongdo Son +Date: Fri, 15 Jun 2012 02:28:01 +0900 +Subject: rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb. + +From: Jeongdo Son + +commit a769f9577232afe2c754606a83aad85127e7052a upstream. + +This is a RT3070 based device. + +Signed-off-by: Jeongdo Son +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rt2x00/rt2800usb.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/rt2x00/rt2800usb.c +@@ -971,6 +971,7 @@ static struct usb_device_id rt2800usb_de + { USB_DEVICE(0x0411, 0x015d) }, + { USB_DEVICE(0x0411, 0x016f) }, + { USB_DEVICE(0x0411, 0x01a2) }, ++ { USB_DEVICE(0x0411, 0x01ee) }, + /* Corega */ + { USB_DEVICE(0x07aa, 0x002f) }, + { USB_DEVICE(0x07aa, 0x003c) }, diff --git a/queue-3.5/series b/queue-3.5/series index 1c27d19a35f..06d7412f2b6 100644 --- a/queue-3.5/series +++ b/queue-3.5/series @@ -32,3 +32,7 @@ drivers-core-make-structured-logging-play-nice-with-dynamic-debug.patch staging-comedi-fix-reversed-test-in-comedi_device_attach.patch usb-support-the-new-interfaces-of-huawei-data-card-devices-in-option-driver.patch usb-option-add-zte-k5006-z.patch +usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch +usb-serial-mos7840-fixup-mos7840_chars_in_buffer.patch +usb-gadget-u_ether-fix-kworker-100-cpu-issue-with-still-used-interfaces-in-eth_stop.patch +rt2x00-add-support-for-buffalo-wli-uc-gnm2-to-rt2800usb.patch diff --git a/queue-3.5/usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch b/queue-3.5/usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch new file mode 100644 index 00000000000..222524492f8 --- /dev/null +++ b/queue-3.5/usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch @@ -0,0 +1,49 @@ +From 7724a1edbe463b06d4e7831a41149ba095b16c53 Mon Sep 17 00:00:00 2001 +From: Ozan Çağlayan +Date: Fri, 10 Aug 2012 17:25:10 +0300 +Subject: USB: ftdi_sio: Add VID/PID for Kondo Serial USB + +From: Ozan Çağlayan + +commit 7724a1edbe463b06d4e7831a41149ba095b16c53 upstream. + +This adds VID/PID for Kondo Kagaku Co. Ltd. Serial USB Adapter +interface: +http://www.kondo-robot.com/EN/wp/?cat=28 + +Tested by controlling an RCB3 board using libRCB3. + +Signed-off-by: Ozan Çağlayan +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++ + 2 files changed, 8 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -811,6 +811,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, + { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, + { USB_DEVICE(PI_VID, PI_E861_PID) }, ++ { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) }, + { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, + { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -795,6 +795,13 @@ + #define PI_E861_PID 0x1008 /* E-861 piezo controller USB connection */ + + /* ++ * Kondo Kagaku Co.Ltd. ++ * http://www.kondo-robot.com/EN ++ */ ++#define KONDO_VID 0x165c ++#define KONDO_USB_SERIAL_PID 0x0002 ++ ++/* + * Bayer Ascensia Contour blood glucose meter USB-converter cable. + * http://winglucofacts.com/cables/ + */ diff --git a/queue-3.5/usb-gadget-u_ether-fix-kworker-100-cpu-issue-with-still-used-interfaces-in-eth_stop.patch b/queue-3.5/usb-gadget-u_ether-fix-kworker-100-cpu-issue-with-still-used-interfaces-in-eth_stop.patch new file mode 100644 index 00000000000..9b10e07189d --- /dev/null +++ b/queue-3.5/usb-gadget-u_ether-fix-kworker-100-cpu-issue-with-still-used-interfaces-in-eth_stop.patch @@ -0,0 +1,73 @@ +From b1b552a69b8805e7e338074a9e8b670b4a795218 Mon Sep 17 00:00:00 2001 +From: Michael Grzeschik +Date: Wed, 8 Aug 2012 11:48:10 +0200 +Subject: usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop + +From: Michael Grzeschik + +commit b1b552a69b8805e7e338074a9e8b670b4a795218 upstream. + +This patch fixes an issue introduced by patch: + + 72c973d usb: gadget: add usb_endpoint_descriptor to struct usb_ep + +Without this patch we see a kworker taking 100% CPU, after this sequence: + +- Connect gadget to a windows host +- load g_ether +- ifconfig up ; ifconfig down; ifconfig up +- ping + +The "ifconfig down" results in calling eth_stop(), which will call +usb_ep_disable() and, if the carrier is still ok, usb_ep_enable(): + + usb_ep_disable(link->in_ep); + usb_ep_disable(link->out_ep); + if (netif_carrier_ok(net)) { + usb_ep_enable(link->in_ep); + usb_ep_enable(link->out_ep); + } + +The ep should stay enabled, but will not, as ep_disable set the desc +pointer to NULL, therefore the subsequent ep_enable will fail. This leads +to permanent rescheduling of the eth_work() worker as usb_ep_queue() +(called by the worker) will fail due to the unconfigured endpoint. + +We fix this issue by saving the ep descriptors and re-assign them before +usb_ep_enable(). + +Cc: Tatyana Brokhman +Signed-off-by: Michael Grzeschik +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/u_ether.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/gadget/u_ether.c ++++ b/drivers/usb/gadget/u_ether.c +@@ -669,6 +669,8 @@ static int eth_stop(struct net_device *n + spin_lock_irqsave(&dev->lock, flags); + if (dev->port_usb) { + struct gether *link = dev->port_usb; ++ const struct usb_endpoint_descriptor *in; ++ const struct usb_endpoint_descriptor *out; + + if (link->close) + link->close(link); +@@ -682,10 +684,14 @@ static int eth_stop(struct net_device *n + * their own pace; the network stack can handle old packets. + * For the moment we leave this here, since it works. + */ ++ in = link->in_ep->desc; ++ out = link->out_ep->desc; + usb_ep_disable(link->in_ep); + usb_ep_disable(link->out_ep); + if (netif_carrier_ok(net)) { + DBG(dev, "host still using in/out endpoints\n"); ++ link->in_ep->desc = in; ++ link->out_ep->desc = out; + usb_ep_enable(link->in_ep); + usb_ep_enable(link->out_ep); + } diff --git a/queue-3.5/usb-serial-mos7840-fixup-mos7840_chars_in_buffer.patch b/queue-3.5/usb-serial-mos7840-fixup-mos7840_chars_in_buffer.patch new file mode 100644 index 00000000000..d9dd636cf60 --- /dev/null +++ b/queue-3.5/usb-serial-mos7840-fixup-mos7840_chars_in_buffer.patch @@ -0,0 +1,38 @@ +From 5c263b92f828af6a8cf54041db45ceae5af8f2ab Mon Sep 17 00:00:00 2001 +From: Mark Ferrell +Date: Tue, 24 Jul 2012 14:15:13 -0500 +Subject: usb: serial: mos7840: Fixup mos7840_chars_in_buffer() + +From: Mark Ferrell + +commit 5c263b92f828af6a8cf54041db45ceae5af8f2ab upstream. + + * Use the buffer content length as opposed to the total buffer size. This can + be a real problem when using the mos7840 as a usb serial-console as all + kernel output is truncated during boot. + +Signed-off-by: Mark Ferrell +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -1232,9 +1232,12 @@ static int mos7840_chars_in_buffer(struc + return 0; + + spin_lock_irqsave(&mos7840_port->pool_lock, flags); +- for (i = 0; i < NUM_URBS; ++i) +- if (mos7840_port->busy[i]) +- chars += URB_TRANSFER_BUFFER_SIZE; ++ for (i = 0; i < NUM_URBS; ++i) { ++ if (mos7840_port->busy[i]) { ++ struct urb *urb = mos7840_port->write_urb_pool[i]; ++ chars += urb->transfer_buffer_length; ++ } ++ } + spin_unlock_irqrestore(&mos7840_port->pool_lock, flags); + dbg("%s - returns %d", __func__, chars); + return chars;