---------- Forwarded message ----------
From: arun k <arunkarunakara...@gmail.com>
Date: Wed, Aug 5, 2015 at 12:57 PM
Subject: Re: USB - Generic Serial device : Unable to read more than 4095 bytes
To: Peter Hurley <pe...@hurleysoftware.com>
Cc: Greg KH <gre...@linuxfoundation.org>, linux-usb@vger.kernel.org


> Ok, but does the sending device know how to process in-band software flow 
> control
> and is it set up to respond properly?

I am not sure about this. I need to check this.

> Also, I doubt software flow control is going to work @ 4Mbaud line rate.
> If you're stuck using software flow control, start with a 115kbaud line rate
> and see if that fixes your data loss problem

I tried B115200 also but issue is still there.

I am using a USB device and that sending data at a rate of 409600
bytes/sec. Is this data rate have any relation with issue.

Regards,
Arun





On Wed, Aug 5, 2015 at 11:24 AM, Peter Hurley <pe...@hurleysoftware.com> wrote:
>
> On 08/04/2015 10:00 PM, arun k wrote:
> > I enabled software flow control like below
> >
> > tty.c_iflag |= (IXON | IXOFF | IXANY);
>
> Ok, but does the sending device know how to process in-band software flow 
> control
> and is it set up to respond properly?
>
> Also, I doubt software flow control is going to work @ 4Mbaud line rate.
> If you're stuck using software flow control, start with a 115kbaud line rate
> and see if that fixes your data loss problem.
>
> Regards,
> Peter Hurley
>
>
> > On Wed, Aug 5, 2015 at 12:59 AM, Peter Hurley <pe...@hurleysoftware.com> 
> > wrote:
> >> On 08/03/2015 10:47 PM, arun k wrote:
> >>> Thank you for the reply
> >>>
> >>>>> The tty layer is limiting you, just keep reading in a loop until you
> >>>>> run out of data, you should not ever expect to read a specific number of
> >>>>> bytes from a tty device at a time, the read call will tell you the
> >>>>> number that was read properly.
> >>>
> >>> I tried this method but in my case I found data loss. By changing any 
> >>> buffer size modification in driver side , can we fix this issue ?
> >>
> >> The data loss is probably occurring because you have all flow control 
> >> disabled
> >> and the line speed is too fast for no flow control.
> >>
> >> Regards,
> >> Peter Hurley
> >>
> >>>>> Please don't use the "generic" driver, it's slow and not the best to
> >>>>> use
> >>>
> >>> Could you tell me is generic driver is suitable for my application ( My 
> >>> usb device sending data at a rate of 409600 bytes/sec) , ?
> >>> or do you have any other suggestion for me ?
> >>>
> >>> My Linux kernel  version is 3.4.35
> >>>
> >>> Regards,
> >>> Arun
> >>>
> >>> On Tue, Aug 4, 2015 at 1:13 AM, Greg KH <gre...@linuxfoundation.org 
> >>> <mailto:gre...@linuxfoundation.org>> wrote:
> >>>
> >>>     On Mon, Aug 03, 2015 at 04:44:07PM +0900, arun k wrote:
> >>>     > Hi ,
> >>>     >
> >>>     > I have a trouble with using usb serial generic device.
> >>>     >  I am using USB - Generic Serial driver for communicating with my 
> >>> usb
> >>>     > device and my embedded device.
> >>>
> >>>     Please don't use the "generic" driver, it's slow and not the best to
> >>>     use.
> >>>
> >>>     > My usb device sending data at a rate of 409600 bytes/sec, and in 
> >>> host
> >>>     > side application I tried to read 16384 bytes in one read. But the 
> >>> read
> >>>     > size returning is always  4095
> >>>
> >>>     The tty layer is limiting you, just keep reading in a loop until you
> >>>     run out of data, you should not ever expect to read a specific number 
> >>> of
> >>>     bytes from a tty device at a time, the read call will tell you the
> >>>     number that was read properly.
> >>>
> >>>     thanks,
> >>>
> >>>     greg k-h
> >>>
> >>>
> >>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to