linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: John.Youn@synopsys.com (John Youn)
To: linux-arm-kernel@lists.infradead.org
Subject: [Bug] usb: dwc2: host function broken in OTG mode on bcm283x
Date: Tue, 23 Aug 2016 11:37:47 -0700	[thread overview]
Message-ID: <a058e07d-ac9a-3e70-af7d-059d21875fba@synopsys.com> (raw)
In-Reply-To: <1408689388.21552.709cd5b7-97dd-4dda-9392-7c46ec5e192c.open-xchange@email.1und1.de>

On 8/22/2016 9:41 PM, Stefan Wahren wrote:
> Hi John,
> 
>> John Youn <John.Youn@synopsys.com> hat am 23. August 2016 um 00:08
>> geschrieben:
>>
>>
>> On 8/22/2016 1:47 PM, Stefan Wahren wrote:
>>> Hi John,
>>>
>>>> John Youn <John.Youn@synopsys.com> hat am 22. August 2016 um 22:06
>>>> geschrieben:
>>>>
>>>>
>>>> On 8/20/2016 6:03 AM, Stefan Wahren wrote:
>>>>> Hi John,
>>>>>
>>>>>
>>>>
>>>> Hi Stefan,
>>>>
>>>> Why doesn't DT work? I think all the properties are there to set
>>>> these.
>>>
>>> it only works for the future releases, not for existing DT blobs. The DT is
>>> part
>>> of the ABI.
>>>
>>> Yes, i already send a patch to fix the DT [1], but it would be better to fix
>>> the
>>> issue in deep.
>>
>> I don't know much about DT issues. So I'm not sure what the issue is
>> with this.The properties for the gadget fifo sizes already exist so
>> there's no change to the ABI, correct?
> 
> It's correct the ABI doesn't change, but it also means that newer kernel must
> work with older DTB files. So the fix should be better in the driver and not in
> the DT sources.
> 
>>
>> Also, the patch you linked doesn't seem to have settings for the FIFO
>> sizes.
> 
> It wouldn't make sense to provide gadget fifo sizes for a host-only setup. The
> mentioned patch doesn't really fix this issue, that's why i mentioned that we
> should fix this issue first.
> 
>>
>>>
>>>>
>>>> I hesitate to change the legacy/default settings in case it breaks any
>>>> existing drivers that depend on them.
>>>
>>> Platforms? I didn't expected that other drivers use these settings.
>>
>> Yes, I mean platforms.
>>
>> I believe these values were hard-coded since before the unified "dwc2"
>> existed. So for sure there are platforms using these settings and to
>> lower them will negatively impact those platforms. The DT properties
>> were introduced to override these.
> 
> Unfortunately the gadget fifo sizes should have been marked as required for OTG
> and gadget mode. But now it's too late. We only can improve DT binding here or
> at least add a warning during probe.
> 
>>
>> I think it is best to override them in the broken platforms. Either
>> that or fix it so that the defaults are more intelligently determined
>> in a way that maximizes the fifo sizes and cannot fail, as opposed to
>> some other arbitrary values.
>>
> 
> I don't have the knowledge for the second solution and i wouldn't prefer much
> more detection intelligence.
> 

How about we fall back to smaller defaults if the original values
fail? And don't configure more than the amount of endpoints.

That should take care of most of the cases. If an irregular
configuration shows up, require it to use the DT properties.

Regards,
John

  reply	other threads:[~2016-08-23 18:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20 13:02 [Bug] usb: dwc2: host function broken in OTG mode on bcm283x Stefan Wahren
2016-08-22 20:06 ` John Youn
2016-08-22 20:47   ` Stefan Wahren
2016-08-22 22:08     ` John Youn
2016-08-23  4:40       ` Stefan Wahren
2016-08-23 18:37         ` John Youn [this message]
2016-08-23 18:55           ` Stefan Wahren

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=a058e07d-ac9a-3e70-af7d-059d21875fba@synopsys.com \
    --to=john.youn@synopsys.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).