Re: linux write system call returns -1 when using usb as virtual serial port

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

 



On Wed, Jan 12, 2011 at 03:49:08PM -0800, Donna Rigas wrote:
> Hi all -
> 
> We are trying to use a usb virtual serial port on our embedded
> system to communicate
> between our x86 host and the usb device on board a LPC2378 processor.
> 
> When we call write on the X86 side, we often get a return value -1 and
> errno is: 'resource temporarily unavailable'.  If I retry lots of
> times, I can
> eventually get the data written.

What driver are you using for this on the host side?

What kernel version?

And you always need to check the return value of the write() system
call, that's just normal.

> Prior to trying to use USB, we were using a real serial port for the
> same purpose and never got errors on write.

You were lucky :)

> We are not sending enough data out to be overflowing the 4k tx buffer.
> (our kernel is old and has 4k tx and rx buffers).
> 
> Is it reasonable to get errors on write calls when using USB?

It depends on the driver you are using, but yes, it can happen.

> If not an overflow of the 4k buffer, what would be the cause of this
> error?  Is it reasonable to retry until successful?

Yes.

thanks,

greg k-h
--
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