lkml.org 
[lkml]   [2009]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] usb_debug: EXPERIMENTAL - poll hcd device to force writes
On Wed, May 06, 2009 at 04:41:41PM +0100, Alan Cox wrote:
> In other words never lie in the write_room method. Try to send data as
> early as possible, but don't queue data inefficiently when the port has
> plenty left to send.
>
> The rules for write_room are simple
>
> If you say you have space for X bytes you can't say you have room
> for less bytes unless those bytes have actually been written - no
> window shrinking so to speak.
>
> If your write_room method works properly, and you fix the buffering logic
> then the rest will work. Probably we need usb/serial/buffer.c which has a
> generic implementation in then that can be used to replace the completely
> bogus hacks in most of the drivers.

I agree, this is the correct solution.

thanks,

greg k-h


\
 
 \ /
  Last update: 2009-05-06 17:51    [W:0.046 / U:5.980 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site