lkml.org 
[lkml]   [2010]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/5] tty: sort out the request_room handling for whiteheat
    Date
    This driver has its own (surplus) backup queue system which wants removing
    from the receive overflow logic.

    Do this at the same time as removing the request_room logic

    Signed-off-by: Alan Cox <alan@linux.intel.com>
    ---

    drivers/usb/serial/whiteheat.c | 18 +++---------------
    1 files changed, 3 insertions(+), 15 deletions(-)


    diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
    index e89e0d5..12ed820 100644
    --- a/drivers/usb/serial/whiteheat.c
    +++ b/drivers/usb/serial/whiteheat.c
    @@ -1492,21 +1492,9 @@ static void rx_data_softint(struct work_struct *work)
    wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
    urb = wrap->urb;

    - if (tty && urb->actual_length) {
    - int len = tty_buffer_request_room(tty,
    - urb->actual_length);
    - /* This stuff can go away now I suspect */
    - if (unlikely(len < urb->actual_length)) {
    - spin_lock_irqsave(&info->lock, flags);
    - list_add(tmp, &info->rx_urb_q);
    - spin_unlock_irqrestore(&info->lock, flags);
    - tty_flip_buffer_push(tty);
    - schedule_work(&info->rx_work);
    - goto out;
    - }
    - tty_insert_flip_string(tty, urb->transfer_buffer, len);
    - sent += len;
    - }
    + if (tty && urb->actual_length)
    + sent += tty_insert_flip_string(tty,
    + urb->transfer_buffer, urb->actual_length);

    urb->dev = port->serial->dev;
    result = usb_submit_urb(urb, GFP_ATOMIC);


    \
     
     \ /
      Last update: 2010-02-17 14:33    [W:2.407 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site