All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabian Vogt <fabian@ritter-vogt.de>
To: Felipe Balbi <balbi@kernel.org>
Cc: Fabian Vogt <fabian@ritter-vogt.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Yuan-Hsin Chen <yhchen@faraday-tech.com>,
	linux-usb@vger.kernel.org
Subject: [PATCH 4/7] fotg210-udc: Mask GRP2 interrupts we don't handle
Date: Wed, 24 Mar 2021 15:11:12 +0100	[thread overview]
Message-ID: <20210324141115.9384-5-fabian@ritter-vogt.de> (raw)
In-Reply-To: <20210324141115.9384-1-fabian@ritter-vogt.de>

Currently it leaves unhandled interrupts unmasked, but those are never
acked. In the case of a "device idle" interrupt, this leads to an
effectively frozen system until plugging it in.

Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver")
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
---
 drivers/usb/gadget/udc/fotg210-udc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c
index 911f1a5cd1f4..d7693b8d7c54 100644
--- a/drivers/usb/gadget/udc/fotg210-udc.c
+++ b/drivers/usb/gadget/udc/fotg210-udc.c
@@ -1040,6 +1040,12 @@ static void fotg210_init(struct fotg210_udc *fotg210)
 	value &= ~DMCR_GLINT_EN;
 	iowrite32(value, fotg210->reg + FOTG210_DMCR);
 
+	/* enable only grp2 irqs we handle */
+	iowrite32(~(DISGR2_DMA_ERROR | DISGR2_RX0BYTE_INT | DISGR2_TX0BYTE_INT
+		    | DISGR2_ISO_SEQ_ABORT_INT | DISGR2_ISO_SEQ_ERR_INT
+		    | DISGR2_RESM_INT | DISGR2_SUSP_INT | DISGR2_USBRST_INT),
+		  fotg210->reg + FOTG210_DMISGR2);
+
 	/* disable all fifo interrupt */
 	iowrite32(~(u32)0, fotg210->reg + FOTG210_DMISGR1);
 
-- 
2.25.1


  parent reply	other threads:[~2021-03-24 14:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 14:11 [PATCH 0/7] Fix the fotg210-udc driver Fabian Vogt
2021-03-24 14:11 ` [PATCH 1/7] fotg210-udc: Fix DMA on EP0 for length > max packet size Fabian Vogt
2021-03-24 14:11 ` [PATCH 2/7] fotg210-udc: Fix EP0 IN requests bigger than two packets Fabian Vogt
2021-03-24 14:11 ` [PATCH 3/7] fotg210-udc: Remove a dubious condition leading to fotg210_done Fabian Vogt
2021-03-24 14:11 ` Fabian Vogt [this message]
2021-03-24 14:11 ` [PATCH 5/7] fotg210-udc: Call usb_gadget_udc_reset Fabian Vogt
2021-03-24 14:11 ` [PATCH 6/7] fotg210-udc: Don't DMA more than the buffer can take Fabian Vogt
2021-03-24 14:11 ` [PATCH 7/7] fotg210-udc: Complete OUT requests on short packets Fabian Vogt

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=20210324141115.9384-5-fabian@ritter-vogt.de \
    --to=fabian@ritter-vogt.de \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=yhchen@faraday-tech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.