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

Commit c6232dda authored by Saket Saurabh's avatar Saket Saurabh
Browse files

usb: ci13xxx_udc: Add print when Port Reset bit is not set



When the USB device controller detects a USB Reset, the PR bit(PORT RESET)
of PORTSC register is set which is later clear once USB Reset is done.
It is possible that due to interrupt latency the USB software receives
USB BUS Reset Interrupt after the device controller clears the PR bit.
This change adds check and prints message to detect this scenario.

CRs-fixed: 674609
Change-Id: I83d589bb601388c62cb74d871ab7213d7ec6b917
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 3bb9501c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3804,6 +3804,9 @@ static irqreturn_t udc_irq(void)
		/* order defines priority - do NOT change it */
		if (USBi_URI & intr) {
			isr_statistics.uri++;
			if (!hw_cread(CAP_PORTSC, PORTSC_PR))
				pr_info("%s: USB reset interrupt is delayed\n",
								__func__);
			isr_reset_handler(udc);
		}
		if (USBi_PCI & intr) {
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ struct ci13xxx {
/* PORTSC */
#define PORTSC_FPR            BIT(6)
#define PORTSC_SUSP           BIT(7)
#define PORTSC_PR             BIT(8)
#define PORTSC_HSP            BIT(9)
#define PORTSC_PTC            (0x0FUL << 16)