Skip to content

Commit

Permalink
USB: g_serial: don't set low_latency flag
Browse files Browse the repository at this point in the history
No longer set low_latency flag as it causes this warning backtrace:

  WARNING: at kernel/mutex.c:207 __mutex_lock_slowpath+0x6c/0x288()

Fix associated locking and wakeups.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Cc: Maulik Mankad <x0082077@ti.com>
Cc: stable <stable@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jon Povey authored and Greg Kroah-Hartman committed Jun 30, 2010
1 parent 9341625 commit 44a0c01
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions drivers/usb/gadget/u_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,11 @@ static void gs_rx_push(unsigned long _port)
list_move(&req->list, &port->read_pool);
}

/* Push from tty to ldisc; this is immediate with low_latency, and
* may trigger callbacks to this driver ... so drop the spinlock.
/* Push from tty to ldisc; without low_latency set this is handled by
* a workqueue, so we won't get callbacks and can hold port_lock
*/
if (tty && do_push) {
spin_unlock_irq(&port->port_lock);
tty_flip_buffer_push(tty);
wake_up_interruptible(&tty->read_wait);
spin_lock_irq(&port->port_lock);

/* tty may have been closed */
tty = port->port_tty;
}


Expand Down Expand Up @@ -784,11 +778,6 @@ static int gs_open(struct tty_struct *tty, struct file *file)
port->open_count = 1;
port->openclose = false;

/* low_latency means ldiscs work in tasklet context, without
* needing a workqueue schedule ... easier to keep up.
*/
tty->low_latency = 1;

/* if connected, start the I/O stream */
if (port->port_usb) {
struct gserial *gser = port->port_usb;
Expand Down

0 comments on commit 44a0c01

Please sign in to comment.