Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency.

From: Oliver Neukum
Date: Sat Oct 03 2009 - 09:29:43 EST


Am Samstag, 3. Oktober 2009 14:28:48 schrieb Johan Hovold:
> +void ftdi_unthrottle(struct tty_struct *tty)
[..]
> +       spin_lock_irqsave(&port->lock, flags);
> +       was_throttled = port->throttled;
> +       port->throttled = port->throttle_req = 0;
> +       spin_unlock_irqrestore(&port->lock, flags);
>  
> -       if (actually_throttled)
> -               schedule_delayed_work(&priv->rx_work, 0);
> +       if (was_throttled && !test_bit(ASYNCB_CLOSING, &port->port.flags))
> +               ftdi_submit_read_urb(port, GFP_KERNEL);
>  }

Did you check whether this races with resume()?
If so, you'll need to submit with the spinlock held.

Regards
Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/