lkml.org 
[lkml]   [2010]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [REGRESSION] "USB: use kfifo to buffer usb-generic serial writes" causes gobi_loader to hang
    Date
    Am Montag, 18. Januar 2010 02:58:44 schrieb Matthew Garrett:
    > drivers/usb/serial/generic.c: usb_serial_generic_write - port 0
    > drivers/usb/serial/usb-serial.c: serial_write - port 0, 1536 byte(s)
    > drivers/usb/serial/generic.c: usb_serial_generic_write - port 0
    > drivers/usb/serial/usb-serial.c: usb_serial_port_work - port 0
    > drivers/usb/serial/usb-serial.c: serial_write - port 0, 1536 byte(s)
    > drivers/usb/serial/generic.c: usb_serial_generic_write - port 0

    Hi,

    it is not conclusive. Can you apply the attached patch and try again?

    Regards
    Oliver
    From 27e54a5d36aba23276d30bd61b962916dca7a946 Mon Sep 17 00:00:00 2001
    From: Oliver Neukum <oliver@neukum.org>
    Date: Mon, 18 Jan 2010 18:23:09 +0100
    Subject: [PATCH] additional debugging

    ---
    drivers/usb/serial/generic.c | 5 ++++-
    1 files changed, 4 insertions(+), 1 deletions(-)

    diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
    index f1ea3a3..76e5514 100644
    --- a/drivers/usb/serial/generic.c
    +++ b/drivers/usb/serial/generic.c
    @@ -283,6 +283,8 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port)

    if (!start_io)
    return 0;
    +
    + dbg("%s - starting IO", __func__);

    data = port->write_urb->transfer_buffer;
    count = kfifo_out_locked(&port->write_fifo, data, port->bulk_out_size, &port->lock);
    @@ -330,7 +332,7 @@ int usb_serial_generic_write(struct tty_struct *tty,
    struct usb_serial *serial = port->serial;
    int result;

    - dbg("%s - port %d", __func__, port->number);
    + dbg("%s - port %d, %d bytes", __func__, port->number, count);

    if (count == 0) {
    dbg("%s - write request of 0 bytes", __func__);
    @@ -346,6 +348,7 @@ int usb_serial_generic_write(struct tty_struct *tty,
    buf, count);

    count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock);
    + dbg("%s - put %d bytes into fifo", __func__, count);
    result = usb_serial_generic_write_start(port);

    if (result >= 0)
    --
    1.6.4.2
    \
     
     \ /
      Last update: 2010-01-18 18:29    [W:0.026 / U:178.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site