Re: usbrsa: dead lock usbrsa_write/usbrsa_write_room

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

 



On Thu, Mar 22, 2012 at 09:24:44PM +0000, tilman wrote:
> Hello
> 
> > But first, why are you reimplementing the write functionality -- why not
> > reuse the generic implementation?
> The USB-RSA has a TX buffer of 4 Kbytes. To be able to take advantage of it, I 
> implemented a streaming mechanism using the whiteheat driver as role model. I 
> have not fully finished it yet -- as of now, the inner loop is redundant.

Most devices have some kind of buffer and the generic write
implementation will happily fill it for you in an efficient way.

What kind of device are we talking about? And what speeds?

You really should try to use the generic write before implementing your
own. 

> > You need to call usb_serial_port_softint from your completion handler.
> That did the trick -- no more stalling. Thanks.
> 
> I however still observe the buffering effect, i.e. characters sent from the 
> USBRSA to a serial port is not directly dumped but buffered, and eventually 
> displayed by cat. Can I set the buffer size somehow or control flushing ? 

See "man termios" and make sure canonical mode is disabled and
VMIN and VTIME set according to your needs.

/Johan

--
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