Re: g_serial and cdc_acm communications

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

 



--- On Thu, 5/13/10, Ron Madrid <ron_madrid@xxxxxxxxxxxxx> wrote:

> From: Ron Madrid <ron_madrid@xxxxxxxxxxxxx>
> Subject: Re: g_serial and cdc_acm communications
> To: "Rob Duncan" <Robert.Duncan@xxxxxxxx>
> Cc: "Oliver Neukum" <oliver@xxxxxxxxxx>, "linux-usb@xxxxxxxxxxxxxxx" <linux-usb@xxxxxxxxxxxxxxx>
> Date: Thursday, May 13, 2010, 2:03 PM
> --- On Thu, 5/13/10, Ron Madrid
> <ron_madrid@xxxxxxxxxxxxx>
> wrote:
> 
> > From: Ron Madrid <ron_madrid@xxxxxxxxxxxxx>
> > Subject: Re: g_serial and cdc_acm communications
> > To: "Rob Duncan" <Robert.Duncan@xxxxxxxx>
> > Cc: "Oliver Neukum" <oliver@xxxxxxxxxx>,
> "linux-usb@xxxxxxxxxxxxxxx"
> <linux-usb@xxxxxxxxxxxxxxx>
> > Date: Thursday, May 13, 2010, 12:13 PM
> > --- On Thu, 5/13/10, Rob Duncan
> > <Robert.Duncan@xxxxxxxx>
> > wrote:
> > 
> > > From: Rob Duncan <Robert.Duncan@xxxxxxxx>
> > > Subject: Re: g_serial and cdc_acm communications
> > > To: "Ron Madrid" <ron_madrid@xxxxxxxxxxxxx>
> > > Cc: "Oliver Neukum" <oliver@xxxxxxxxxx>,
> > "linux-usb@xxxxxxxxxxxxxxx"
> > <linux-usb@xxxxxxxxxxxxxxx>
> > > Date: Thursday, May 13, 2010, 11:49 AM
> > > 
> > > On May 13, 2010, at 10:11 AM, Ron Madrid wrote:
> > > 
> > > > This is the last (failing) transfer that
> occurs.
> > 
> > > The third
> > > > line is my app receiving information about
> the
> > data it
> > > should
> > > > expect, and the size of the transfer in
> dwords,
> > 0x7d0
> > > (8000
> > > > bytes).  I then see, in subsequent
> lines, 7
> > *
> > > 1024 bytes
> > > > received (Bi) followed by 832 bytes
> received
> > which
> > > totals up
> > > > to 8000 bytes.
> > > 
> > > I suspect it's because that host controller is
> waiting
> > for
> > > the end of
> > > the transfer.  832 bytes is an exact
> multiple of
> > > 64-bytes, which means
> > > that the the HC is waiting for a short packet, or
> up
> > to
> > > your transfer
> > > size, which appears to be 1024.
> > 
> > I'm read()ing 8000 bytes.  I just tried read()ing
> 8004
> > bytes
> > and I saw a similar failure.  Also, this
> 8000/8004
> > byte read()
> > is in a 10000 iteration loop and is successful a
> seemingly
> > arbitrary number of times (a few dozen to a few
> hundred)
> > before failing.  I had read about a zpl problem
> > before, but
> > this doesn't seem to be the case unless I'm missing
> > something.
> 
> Another wrinkle in all of this ... I just tried write()ing
> the exact same number of bytes and everything appeared to
> work flawlessly.

I noticed that when I was doing write() to the tty device, the
USB device was performing Bo with 512 bytes at a time, read()
seemed to do 1024 at a time.  Is there a way that I could
change the USB Bi buffer to 512 and see if that fixes
anything?  Or does this possible mean anything?

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