lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[096/140] USB: g_serial: dont set low_latency flag
    2.6.33-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Jon Povey <jon.povey@racelogic.co.uk>

    commit 44a0c0190b500ee6bcfc0976fe540f65dee2cd67 upstream.

    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>
    Acked-by: David Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/usb/gadget/u_serial.c | 15 ++-------------
    1 file changed, 2 insertions(+), 13 deletions(-)

    --- a/drivers/usb/gadget/u_serial.c
    +++ b/drivers/usb/gadget/u_serial.c
    @@ -535,17 +535,11 @@ recycle:
    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;
    }


    @@ -783,11 +777,6 @@ static int gs_open(struct tty_struct *tt
    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;



    \
     
     \ /
      Last update: 2010-07-30 19:51    [W:4.131 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site