mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
To: <hminas@synopsys.com>, <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<amelie.delaunay@foss.st.com>, <alexandre.torgue@foss.st.com>
Subject: Re: [PATCH v2 0/2] usb: dwc2: fill in gadget caps, configure it for stm32mp15
Date: Wed, 13 Oct 2021 16:00:22 +0200	[thread overview]
Message-ID: <1000e62a-26e2-90d3-afee-a4166bb4ff79@foss.st.com> (raw)
In-Reply-To: <1633679589-16021-1-git-send-email-fabrice.gasnier@foss.st.com>

On 10/8/21 9:53 AM, Fabrice Gasnier wrote:
> This patchset fills in 'otg_caps' of the usb_gadget structure, and
> configures it on stm32mp15.
> 
> When dwc2 is configured as dual role (OTG), the USB gadget descriptors
> (device mode) are configured via configfs. This lead in calling
> usb_otg_descriptor_init().
> In usb_otg_descriptor_init() (drivers/usb/gadget/config.c):
> - If otg caps structure is provided -> use it
> - If otg caps structure isn't provided -> HNP and SRP are enabled by default
> 
> This could lead to a configuration mismatch beetween:
> - OTG controller: HNP and SRP aren't enabled
> - gadget descriptors: HNP and SRP are advertised
> 
> ---

Hi All, I just sent a v3 of this series, to add the dt-bindings.

Please rather review the v3.

Thanks in advance,
Fabrice


> Changes in v2:
> - replace otg_cap bit field by otg_caps structure.
> - Fix build issue when HOST only mode is selected [1]
> - DT patch for stm32mp151 merged in v1, so not resent
> 
> [1] https://syzkaller.appspot.com/bug?extid=7af597ce2b38596c16ea
> 
> Fabrice Gasnier (2):
>   usb: dwc2: add otg_rev and otg_caps information for gadget driver
>   usb: dwc2: stm32mp15: set otg_rev
> 
>  drivers/usb/dwc2/core.h    | 19 ++++++------
>  drivers/usb/dwc2/debugfs.c |  4 ++-
>  drivers/usb/dwc2/gadget.c  |  1 +
>  drivers/usb/dwc2/hcd.c     | 12 +++-----
>  drivers/usb/dwc2/params.c  | 75 ++++++++++++++++++++++++++--------------------
>  5 files changed, 59 insertions(+), 52 deletions(-)
> 

      parent reply	other threads:[~2021-10-13 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  7:53 Fabrice Gasnier
2021-10-08  7:53 ` [PATCH v2 1/2] usb: dwc2: add otg_rev and otg_caps information for gadget driver Fabrice Gasnier
2021-10-08  7:53 ` [PATCH v2 2/2] usb: dwc2: stm32mp15: set otg_rev Fabrice Gasnier
2021-10-13 14:00 ` Fabrice Gasnier [this message]

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=1000e62a-26e2-90d3-afee-a4166bb4ff79@foss.st.com \
    --to=fabrice.gasnier@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hminas@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®