Enable vlan (8021q) module
[kernel-power] / kernel-power-2.6.28 / debian / patches / USB-g_serial-don-t-set-low_latency-flag.diff
1 From a325a46edc23a9c267ac060299f3ba9955c1ca57 Mon Sep 17 00:00:00 2001
2 From: Jon Povey <jon.povey@racelogic.co.uk>
3 Date: Mon, 14 Jun 2010 19:41:04 +0900
4 Subject: [PATCH] USB: g_serial: don't set low_latency flag
5
6 No longer set low_latency flag as it causes this warning backtrace:
7
8   WARNING: at kernel/mutex.c:207 __mutex_lock_slowpath+0x6c/0x288()
9
10 Fix associated locking and wakeups.
11
12 Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
13 Cc: Maulik Mankad <x0082077@ti.com>
14 Cc: stable <stable@kernel.org>
15 Acked-by: David Brownell <dbrownell@users.sourceforge.net>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 ---
18  drivers/usb/gadget/u_serial.c |   15 ++-------------
19  1 files changed, 2 insertions(+), 13 deletions(-)
20
21 diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
22 index 5c83a87..b09c4b2 100644
23 --- a/drivers/usb/gadget/u_serial.c
24 +++ b/drivers/usb/gadget/u_serial.c
25 @@ -550,17 +550,11 @@ recycle:
26                 list_move(&req->list, &port->read_pool);
27         }
28  
29 -       /* Push from tty to ldisc; this is immediate with low_latency, and
30 -        * may trigger callbacks to this driver ... so drop the spinlock.
31 +       /* Push from tty to ldisc; without low_latency set this is handled by
32 +        * a workqueue, so we won't get callbacks and can hold port_lock
33          */
34         if (tty && do_push) {
35 -               spin_unlock_irq(&port->port_lock);
36                 tty_flip_buffer_push(tty);
37 -               wake_up_interruptible(&tty->read_wait);
38 -               spin_lock_irq(&port->port_lock);
39 -
40 -               /* tty may have been closed */
41 -               tty = port->port_tty;
42         }
43  
44  
45 @@ -798,11 +792,6 @@ static int gs_open(struct tty_struct *tty, struct file *file)
46         port->open_count = 1;
47         port->openclose = false;
48  
49 -       /* low_latency means ldiscs work in tasklet context, without
50 -        * needing a workqueue schedule ... easier to keep up.
51 -        */
52 -       tty->low_latency = 1;
53 -
54         /* if connected, start the I/O stream */
55         if (port->port_usb) {
56                 struct gserial  *gser = port->port_usb;
57 -- 
58 1.7.3.4
59