From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Linyu Yuan <quic_linyyuan@quicinc.com>
Cc: 정재훈 <jh0801.jung@samsung.com>,
"'Felipe Balbi'" <balbi@kernel.org>,
"'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>,
"Thinh Nguyen" <Thinh.Nguyen@synopsys.com>,
"'open list:USB XHCI DRIVER'" <linux-usb@vger.kernel.org>,
"'open list'" <linux-kernel@vger.kernel.org>,
"'Seungchull Suh'" <sc.suh@samsung.com>,
"'Daehwan Jung'" <dh10.jung@samsung.com>
Subject: Re: [PATCH] usb: dwc3: Clear DWC3_EVENT_PENDING when count is 0
Date: Mon, 9 Jan 2023 18:28:18 +0000 [thread overview]
Message-ID: <20230109182813.sle5h34wdgglnlph@synopsys.com> (raw)
In-Reply-To: <0bbd2355-2290-17c7-6860-d8b25930aed6@quicinc.com>
On Fri, Jan 06, 2023, Linyu Yuan wrote:
> On 1/5/2023 5:54 PM, 정재훈 wrote:
> >
> > > -----Original Message-----
> > > From: Linyu Yuan [mailto:quic_linyyuan@quicinc.com]
> > > Sent: Thursday, January 5, 2023 12:35 PM
> > > To: JaeHun Jung; Felipe Balbi; Greg Kroah-Hartman; Thinh Nguyen
> > > Cc: open list:USB XHCI DRIVER; open list; Seungchull Suh; Daehwan Jung
> > > Subject: Re: [PATCH] usb: dwc3: Clear DWC3_EVENT_PENDING when count is 0
> > >
> > >
> > > On 1/5/2023 11:29 AM, Linyu Yuan wrote:
> > > > On 1/2/2023 1:08 PM, JaeHun Jung wrote:
> > > > > Sometimes very rarely, The count is 0 and the DWC3 flag is set has
> > > > > status.
> > > > > It must not have these status. Because, It can make happen interrupt
> > > > > storming status.
> > > > could you help explain without clear the flag, how interrupt storming
> > > > happen ?
> > > >
> > > > as your change didn't touch any hardware register, i don't know how it
> > > > fix storming.
> > > >
> > H/W interrupts are still occur on IP.
>
> I guess we should fix it from IP layer.
>
How are you certain the problem is from IP layer?
>
> but when checking DWC3_EVENT_PENDING flag, it will auto clear in dwc3 thread
> irq handler.
>
> there is one possible root cause is it cleared only after irq enabled in
> dwc3_process_event_buf(),
>
> we should move unmask irq operation at end of this function.
>
This interrupt storm can happen because we clear the evt->flags _after_
we unmask the interrupt. This was done to prevent false interrupt from
delay interrupt deassertion, which can be a problem for legacy pci
interrupt.
see 7441b273388b ("usb: dwc3: gadget: Fix event pending check")
The change JaeHun Jung did should be fine.
BR,
Thinh
next prev parent reply other threads:[~2023-01-09 18:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230102050839epcas2p4b9d09d926f9a14c3b8e8df2574d334c3@epcas2p4.samsung.com>
2023-01-02 5:08 ` [PATCH] usb: dwc3: Clear DWC3_EVENT_PENDING when count is 0 JaeHun Jung
2023-01-03 15:48 ` Felipe Balbi
2023-01-05 3:29 ` Linyu Yuan
2023-01-05 3:35 ` Linyu Yuan
2023-01-05 9:54 ` 정재훈
2023-01-06 3:13 ` Linyu Yuan
2023-01-09 18:28 ` Thinh Nguyen [this message]
2023-01-10 1:56 ` Linyu Yuan
2023-01-10 2:53 ` Thinh Nguyen
2023-01-10 3:05 ` Linyu Yuan
2023-01-10 3:13 ` Linyu Yuan
2023-01-10 7:38 ` Linyu Yuan
2023-01-11 0:00 ` Thinh Nguyen
2023-01-11 1:45 ` Linyu Yuan
2023-01-11 2:27 ` Thinh Nguyen
2023-01-31 6:38 ` Linyu Yuan
2023-02-01 18:57 ` Thinh Nguyen
2023-02-02 5:00 ` Linyu Yuan
2023-02-02 20:06 ` Thinh Nguyen
2023-02-03 2:18 ` Linyu Yuan
2023-01-09 18:35 ` Thinh Nguyen
2023-01-09 19:09 ` Thinh Nguyen
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=20230109182813.sle5h34wdgglnlph@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=dh10.jung@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jh0801.jung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_linyyuan@quicinc.com \
--cc=sc.suh@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).