lkml.org 
[lkml]   [2023]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] usb: dwc3: Clear DWC3_EVENT_PENDING when count is 0
From
hi Thinh,


regarding your suggestion, assume it is not PCIe type,  still have one
question,


-       if (evt->flags & DWC3_EVENT_PENDING)
+       if (evt->flags & DWC3_EVENT_PENDING) {
+               if (!evt->count) {
+                       u32 reg = dwc3_readl(dwc->regs, DWC3_GEVNTSIZ(0));
+
+                       if (!(reg & DWC3_GEVNTSIZ_INTMASK))
+                               evt->flags &= ~DWC3_EVENT_PENDING;

do we need to return IRQ_WAKE_THREAD  ?

+               }
                return IRQ_HANDLED;

as here return IRQ HANDLED, how can we make sure a new IRQ will be
handled after previous IRQ thread clean PENDING flag ?

+       }


also for non-PCIe controller, consider IRQ mask register working correctly,

consider a case IRQ happen before IRQ thread exit,  here just return
IRQ_HANDLED.

once IRQ thread exit, it will clean PENDING flag, so next IRQ event will
run normally.

if 정재훈 saw PENDING flag is not cleared, does it mean IRQ thread have no
chance to exit ?

\
 
 \ /
  Last update: 2023-03-27 00:03    [W:0.175 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site