All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: John Youn <John.Youn@synopsys.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: gadget: Init only available HW eps
Date: Fri, 08 Jan 2021 14:23:22 +0200	[thread overview]
Message-ID: <87eeivwrb9.fsf@kernel.org> (raw)
In-Reply-To: <19b685a9-0c25-9b6c-ecaf-ffca4069182b@synopsys.com>

[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]


Hi,

Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
>>>>> How have you verified this patch? Did you read Bryan's commit log? This
>>>>> is likely to reintroduce the problem raised by Bryan.
>>>>>
>>>> We verified with our FPGA HAPS with various number of endpoints. No
>>>> issue is seen.
>>> That's cool. Could you please make sure our understanding of this is
>>> sound and won't interfere with any designs? If we modify this part of
>>> the code again, I'd like to see a clear reference to a specific section
>>> of the databook detailing the expected behavior :-)
>>>
>>> cheers
>>>
>> Hm... I didn't consider bidirection endpoint other than control endpoint.
>>
>> DWC3_USB3x_NUM_EPS specifies the number of device mode for single
>> directional endpoints. A bidirectional endpoint needs 2 single
>> directional endpoints, 1 IN and 1 OUT. So, if your setup uses 3
>> bidirection endpoints and only those, DWC3_USB3x_NUM_EPS should be 6.
>> DWC3_USB3x_NUM_IN_EPS specifies the maximum number of IN endpoint active
>> at any time.
>>
>> However, I will have to double check and confirm internally regarding
>> how to determine many endpoint would be available if bidirection
>> endpoints come into play.
>>
>> Thanks for pointing this out. Will get back on this.
>>
>> Thinh
>>
>
> Ok. Just had some discussion internally. So, like you said, any endpoint
> can be configured in either direction. However, we are limited to
> configuring up to DWC_USB3x_NUM_IN_EPS because each IN endpoint has its
> own TxFIFO while for OUT, they share the same RxFIFO. So we could have
> up to DWC_USB3x_NUM_EPS number of OUT endpoints. So, the issue Bryan
> attempted to address is still there.
>
> However, the current code still has some assumption on the number of IN
> and OUT endpoints, I need to think of a better solution.

Yes, the assumption still exists because at the time there was no better
solution :-)

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

  reply	other threads:[~2021-01-08 12:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 17:20 [PATCH] usb: dwc3: gadget: Init only available HW eps Thinh Nguyen
2021-01-06  7:51 ` Felipe Balbi
2021-01-06  9:29   ` Thinh Nguyen
2021-01-07  9:33     ` Felipe Balbi
2021-01-08  2:32       ` Thinh Nguyen
2021-01-08  3:54         ` Thinh Nguyen
2021-01-08 12:23           ` Felipe Balbi [this message]
2021-01-29  0:58             ` Bryan O'Donoghue

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=87eeivwrb9.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pure.logic@nexus-software.ie \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.