public inbox for stable@vger.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>,
	Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org
Cc: John Youn <John.Youn@synopsys.com>, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] usb: dwc3: gadget: Check if the gadget had started
Date: Wed, 06 Jan 2021 09:53:29 +0200	[thread overview]
Message-ID: <87a6tmcxhi.fsf@kernel.org> (raw)
In-Reply-To: <92118292e053f3a1a9238facfec91630468ba752.1609865348.git.Thinh.Nguyen@synopsys.com>


Hi,

Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
> If the gadget had already started, don't try to start again. Otherwise,
> we may request the same threaded irq with the same dev_id, it will mess
> up the interrupt freeing logic. This can happen if a user tries to
> trigger a soft-connect from soft_connect sysfs multiple times. Check to
> make sure that the gadget had started before proceeding to request
> threaded irq. Fix this by checking if there's bounded gadget driver.

Looks like this should be fixed at the framework level, otherwise we
will have to patch every single UDC. After that is done, we can remove
the dwc->gadget_driver check from here.

-- 
balbi

  reply	other threads:[~2021-01-06  7:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 16:56 [PATCH 0/2] usb: dwc3: gadget: Check for multiple start/stop Thinh Nguyen
2021-01-05 16:56 ` [PATCH 1/2] usb: dwc3: gadget: Check if the gadget had started Thinh Nguyen
2021-01-06  7:53   ` Felipe Balbi [this message]
2021-01-06  9:35     ` Thinh Nguyen
2021-01-05 16:56 ` [PATCH 2/2] usb: dwc3: gadget: Check if the gadget had stopped Thinh Nguyen
2021-01-06  7:54   ` Felipe Balbi
2021-01-08  2:36 ` [PATCH 0/2] usb: dwc3: gadget: Check for multiple start/stop Peter Chen
2021-01-08  2:40   ` Thinh Nguyen
2021-01-08  9:40     ` Peter Chen

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=87a6tmcxhi.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox