Fwd: USB - Generic Serial device : Unable to read more than 4095 bytes

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

 



Hi,
Regarding the above issue, I was checking the USB- Generic driver,
And I tried the following things and found my data loss issue is fixed.

change point
--------------------
>> In usb_serial_probe() function in usb-serial.c

/* set up the endpoint information */
for (i = 0; i < num_bulk_in; ++i) {
endpoint = bulk_in_endpoint[i];
port = serial->port[i];
buffer_size = max_t(int, serial->type->bulk_in_size,
usb_endpoint_maxp(endpoint));
buffer_size = 16384;
..........
..........

I changed the buffer_size value  used in urb, previously it was 64
bytes now it is 16384 and I found my data loss issue fixed.

Could you tell me is there any issue with this changes ?
I am using this driver in embedded platform and in my application
other devices will not use USB -Generic driver.

Regards,
Arun







On Sat, Aug 8, 2015 at 2:50 AM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Aug 07, 2015 at 07:26:15PM +0900, arun k wrote:
> > Hi,
> >
> > I am stuck with the above issue,
> > I have some doubts regarding USB - Generic driver
> > 1. Could you please explain me why USB - Generic driver is slow ?
>
> Because it was designed that way, it is not for high-speed data
> throughput at all.  It is a stop-gap measure for dumb usb devices that
> want to emulate a serial connection.  If you need a "real" driver, to
> handle high rates of data, you will need to write a new driver for it.
>
> > 2. Now I am try to study USB - Generic driver implementation , I am
> > confused with the function usb_serial_generic_read_bulk_callback() ,
> > could you please tell me from where this function is calling ?
>
> I recommend reading the USB chapter in the Linux Device Drivers book
> (version 3, free online) to understand how USB drivers work.  After
> that, the answer should be obvious (hint, look at where that function
> pointer is assigned to something...)
>
> > 3. If you have any detailed doc regarding the implementation of USB -
> > Generic serial driver, Please send to me,
>
> The source code is pretty well documented :)
>
> 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