This is a note to let you know that I've just added the patch titled USB: ti_usb_3410_5052: remove lsr from port data to the 3.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-ti_usb_3410_5052-remove-lsr-from-port-data.patch and it can be found in the queue-3.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b5784f7d8528926d69c5868f1ddb2af99f85e799 Mon Sep 17 00:00:00 2001 From: Johan Hovold <jhovold@xxxxxxxxx> Date: Thu, 18 Apr 2013 17:33:20 +0200 Subject: USB: ti_usb_3410_5052: remove lsr from port data From: Johan Hovold <jhovold@xxxxxxxxx> commit b5784f7d8528926d69c5868f1ddb2af99f85e799 upstream. The line status register is only polled so let's not keep a possibly outdated value in the port data. Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/serial/ti_usb_3410_5052.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -67,7 +67,6 @@ struct ti_port { int tp_is_open; __u8 tp_msr; - __u8 tp_lsr; __u8 tp_shadow_mcr; __u8 tp_uart_mode; /* 232 or 485 modes */ unsigned int tp_uart_base_addr; @@ -124,7 +123,7 @@ static void ti_recv(struct usb_serial_po int length); static void ti_send(struct ti_port *tport); static int ti_set_mcr(struct ti_port *tport, unsigned int mcr); -static int ti_get_lsr(struct ti_port *tport); +static int ti_get_lsr(struct ti_port *tport, u8 *lsr); static int ti_get_serial_info(struct ti_port *tport, struct serial_struct __user *ret_arg); static int ti_set_serial_info(struct tty_struct *tty, struct ti_port *tport, @@ -1300,7 +1299,7 @@ static int ti_set_mcr(struct ti_port *tp } -static int ti_get_lsr(struct ti_port *tport) +static int ti_get_lsr(struct ti_port *tport, u8 *lsr) { int size, status; struct ti_device *tdev = tport->tp_tdev; @@ -1326,7 +1325,7 @@ static int ti_get_lsr(struct ti_port *tp dev_dbg(&port->dev, "%s - lsr 0x%02X\n", __func__, data->bLSR); - tport->tp_lsr = data->bLSR; + *lsr = data->bLSR; free_data: kfree(data); @@ -1419,6 +1418,7 @@ static void ti_drain(struct ti_port *tpo struct ti_device *tdev = tport->tp_tdev; struct usb_serial_port *port = tport->tp_port; wait_queue_t wait; + u8 lsr; spin_lock_irq(&tport->tp_lock); @@ -1450,11 +1450,11 @@ static void ti_drain(struct ti_port *tpo /* wait for data to drain from the device */ /* wait for empty tx register, plus 20 ms */ timeout += jiffies; - tport->tp_lsr &= ~TI_LSR_TX_EMPTY; + lsr = 0; while ((long)(jiffies - timeout) < 0 && !signal_pending(current) - && !(tport->tp_lsr&TI_LSR_TX_EMPTY) && !tdev->td_urb_error + && !(lsr & TI_LSR_TX_EMPTY) && !tdev->td_urb_error && !port->serial->disconnected) { - if (ti_get_lsr(tport)) + if (ti_get_lsr(tport, &lsr)) break; mutex_unlock(&port->serial->disc_mutex); msleep_interruptible(20); Patches currently in stable-queue which might be from jhovold@xxxxxxxxx are queue-3.9/usb-mos7720-fix-dma-to-stack.patch queue-3.9/usb-ti_usb_3410_5052-fix-chars_in_buffer-overhead.patch queue-3.9/usb-ftdi_sio-clean-up-get_modem_status.patch queue-3.9/usb-ftdi_sio-fix-chars_in_buffer-overhead.patch queue-3.9/usb-zte_ev-fix-broken-open.patch queue-3.9/usb-ark3116-fix-control-message-timeout.patch queue-3.9/usb-serial-add-wait_until_sent-operation.patch queue-3.9/usb-io_ti-fix-chars_in_buffer-overhead.patch queue-3.9/usb-mos7840-fix-dma-to-stack.patch queue-3.9/usb-serial-fix-treo-kyocera-interrrupt-in-urb-context.patch queue-3.9/usb-ti_usb_3410_5052-query-hardware-buffer-status-in-chars_in_buffer.patch queue-3.9/usb-serial-add-generic-wait_until_sent-implementation.patch queue-3.9/usb-mos7720-fix-hardware-flow-control.patch queue-3.9/usb-keyspan-fix-bogus-array-index.patch queue-3.9/usb-zte_ev-fix-control-message-timeouts.patch queue-3.9/usb-mos7720-fix-message-timeouts.patch queue-3.9/usb-iuu_phoenix-fix-bulk-message-timeout.patch queue-3.9/usb-whiteheat-fix-broken-port-configuration.patch queue-3.9/usb-ti_usb_3410_5052-remove-lsr-from-port-data.patch queue-3.9/usb-visor-fix-initialisation-of-treo-kyocera-devices.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html