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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Samstag, 3. Oktober 2009 13:42:29 schrieb Johan Hovold:
> +       spin_lock_irqsave(&port->lock, flags);
> +       if (!port->throttled) {
> +               spin_unlock_irqrestore(&port->lock, flags);
> +               ftdi_submit_read_urb(port, GFP_ATOMIC);
> +       } else
> +               spin_unlock_irqrestore(&port->lock, flags);
> +}
>  
>  static void ftdi_break_ctl(struct tty_struct *tty, int break_state)
>  {
> @@ -2605,33 +2467,30 @@ static int ftdi_ioctl(struct tty_struct *tty,
> struct file *file, static void ftdi_throttle(struct tty_struct *tty)
[..]
> +       spin_lock_irqsave(&port->lock, flags);
> +       port->throttled = 1;
> +       spin_unlock_irqrestore(&port->lock, flags);
>  }
>  
> -
> -static void ftdi_unthrottle(struct tty_struct *tty)
> +void ftdi_unthrottle(struct tty_struct *tty)
[..]
> +       spin_lock_irqsave(&port->lock, flags);
> +       was_throttled = port->throttled;
> +       port->throttled = 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);
>  }

This unfortunately is incorrect. If an unthrottling happens before the read
callback runs you submit a running URB.

	Regards
		Oliver
 

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux