linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Baldyga <r.baldyga@samsung.com>
To: Paul Zimmerman <Paul.Zimmerman@synopsys.com>,
	"balbi@ti.com" <balbi@ti.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
	"andrzej.p@samsung.com" <andrzej.p@samsung.com>
Subject: Re: [PATCH v2 10/12] usb: dwc2/gadget: assign TX FIFO dynamically
Date: Fri, 18 Jul 2014 13:07:59 +0200	[thread overview]
Message-ID: <53C9000F.4070007@samsung.com> (raw)
In-Reply-To: <A2CA0424C0A6F04399FB9E1CD98E0304844BEA77@US01WEMBX2.internal.synopsys.com>

On 07/16/2014 09:58 PM, Paul Zimmerman wrote:
>> From: Robert Baldyga [mailto:r.baldyga@samsung.com]
>> Sent: Wednesday, July 16, 2014 3:22 AM
>>
>> Because we have not enough memory to have each TX FIFO of size at least 3072
>> bytes (the maximum single packet size), we create four FIFOs of lenght 1024,
>> and four of length 3072 bytes, and assing them to endpoints dynamically
>> according to maxpacket size value of given endpoint.
> 
> I don't think this commit message entirely explains what you are doing
> here.
> 
> 3072 is actually 3 times the max packet size for an Isoc endpoint. So you
> want to have four TX FIFOs of that size, presumably to be assigned to
> Isoc endpoints. Where before this change, all TX FIFOs were of size 768,
> which is not even 1 max packet size for an Isoc endpoint. So I guess you
> were seeing some problem with that?

FIFO size in DPTXFSIZn register is in terms of 32-bit words, so
768*4=3072 - maximum packet size with 3 transactions per microframe
(Mult=2). The problem is that we have not enough memory to have all
FIFOs of this size, so we split available memory to have at least few
FIFOs of maximum packet size.

> 
> With a TX FIFO size of 3072, an entire microframe worth of Isoc data
> (when MaxBurst=2) can fit in the FIFO. I guess that is why you chose
> 3072?
> 

Yes, this is why I chose this value.

> Also, after this change, you are only initializing 8 TX FIFOs, where
> before you were initializing all 15. So now there can only be a maximum
> of 8 IN endpoints active at the same time. That's OK I guess, but I
> think you should mention that in the commit message.
> 

We use only 8 IN endpoints so there is no need to have more TX FIFOs.

I'm preparing v3 of this patchset so I will supply better description.

Thanks,
Robert Baldyga

  parent reply	other threads:[~2014-07-18 11:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 10:22 [PATCH v2 00/12] usb: dwc2/gadget: fix series Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 01/12] usb: dwc2/gadget: fix phy disable sequence Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 02/12] usb: dwc2/gadget: fix phy initialization sequence Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 03/12] usb: dwc2/gadget: move phy bus legth initialization Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 04/12] usb: dwc2/gadget: Fix comment text Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 05/12] usb: dwc2/gadget: hide some not really needed debug messages Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 06/12] usb: dwc2/gadget: ensure that all fifos have correct memory buffers Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 07/12] usb: dwc2/gadget: break infinite loop in endpoint disable code Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 08/12] usb: dwc2/gadget: do not call disconnect method in pullup Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 09/12] usb: dwc2/gadget: delay enabling irq once hardware is configured properly Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 10/12] usb: dwc2/gadget: assign TX FIFO dynamically Robert Baldyga
2014-07-16 19:58   ` Paul Zimmerman
2014-07-16 20:22     ` Paul Zimmerman
2014-07-18 11:07     ` Robert Baldyga [this message]
2014-07-16 10:22 ` [PATCH v2 11/12] usb: dwc2/gadget: disable clock when it's not needed Robert Baldyga
2014-07-16 10:22 ` [PATCH v2 12/12] usb: dwc2/gadget: avoid disabling ep0 Robert Baldyga
2014-07-17  0:27 ` [PATCH v2 00/12] usb: dwc2/gadget: fix series Paul Zimmerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53C9000F.4070007@samsung.com \
    --to=r.baldyga@samsung.com \
    --cc=Paul.Zimmerman@synopsys.com \
    --cc=andrzej.p@samsung.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).