Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 590bb17a authored by Fabian Vogt's avatar Fabian Vogt Committed by Greg Kroah-Hartman
Browse files

fotg210-udc: Mask GRP2 interrupts we don't handle



[ Upstream commit 9aee3a23d6455200702f3a57e731fa11e8408667 ]

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: b84a8dee ("usb: gadget: add Faraday fotg210_udc driver")
Signed-off-by: default avatarFabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/20210324141115.9384-5-fabian@ritter-vogt.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bf1fbee8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1030,6 +1030,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);