[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9bea397a-f3a1-49d0-bf5f-303dcda3263f@US01WEHTC2.internal.synopsys.com>
Date: Wed, 19 Apr 2017 18:21:25 +0400
From: Razmik Karapetyan <Razmik.Karapetyan@...opsys.com>
To: John Youn <John.Youn@...opsys.com>,
Felipe Balbi <balbi@...nel.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Razmik Karapetyan <Razmik.Karapetyan@...opsys.com>
Subject: [PATCH v2 1/3] usb: dwc2: Update dwc2_handle_incomplete_isoc_in() function
Disabled only that ISOC endpoints,for which interrupt bit was set
in the DAINTMSK register. This will allow to minimize incomplete
ISOC IN interrupt handling.
Signed-off-by: Razmik Karapetyan <razmik@...opsys.com>
---
drivers/usb/dwc2/gadget.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 98a4a79..543ecf1 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3449,14 +3449,21 @@ static void dwc2_gadget_handle_incomplete_isoc_in(struct dwc2_hsotg *hsotg)
{
struct dwc2_hsotg_ep *hs_ep;
u32 epctrl;
+ u32 daintmsk;
u32 idx;
dev_dbg(hsotg->dev, "Incomplete isoc in interrupt received:\n");
+ daintmsk = dwc2_readl(hsotg->regs + DAINTMSK);
+
for (idx = 1; idx <= hsotg->num_of_eps; idx++) {
hs_ep = hsotg->eps_in[idx];
+ /* Proceed only unmasked ISOC EPs */
+ if (!hs_ep->isochronous || (BIT(idx) & ~daintmsk))
+ continue;
+
epctrl = dwc2_readl(hsotg->regs + DIEPCTL(idx));
- if ((epctrl & DXEPCTL_EPENA) && hs_ep->isochronous &&
+ if ((epctrl & DXEPCTL_EPENA) &&
dwc2_gadget_target_frame_elapsed(hs_ep)) {
epctrl |= DXEPCTL_SNAK;
epctrl |= DXEPCTL_EPDIS;
--
2.7.4
Powered by blists - more mailing lists