[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1634027450-3358-1-git-send-email-zhuyinbo@loongson.cn>
Date: Tue, 12 Oct 2021 16:30:50 +0800
From: Yinbo Zhu <zhuyinbo@...ngson.cn>
To: Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <greg@...ah.com>,
Patchwork Bot <patchwork-bot@...nel.org>
Cc: zhuyinbo@...ngson.cn
Subject: [PATCH v5] usb: ohci: disable start-of-frame interrupt in ohci_rh_suspend
The usb states of ohci controller include UsbOperational, UsbReset,
UsbSuspend and UsbResume. Among them, only the UsbOperational state
supports launching the start-of-frame for host controller according
the ohci protocol spec, but in S3 and S4 (suspend to memory/suspend
to disk) press test procedure, it may happen that the start-of-
frame was launched in UsbSuspend status and cause ohci works failed
that the phenomenon was hc will allways reproduce the SoF interrupt
and consider that hc doesn't deal with the ed/td/done list in non-
UsbOperational, and this patch was to disable SoF interrupt in ohci
_rh_suspend so that it can fix ohci SoF abnormally interrupt issue.
Signed-off-by: Yinbo Zhu <zhuyinbo@...ngson.cn>
---
Change in v5:
Move the key code change into ohci_rh_suspend.
Rework the commit log information.
drivers/usb/host/ohci-hub.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index f474f2f..80a0094 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -88,6 +88,8 @@ static int ohci_rh_suspend (struct ohci_hcd *ohci, int autostop)
msleep (8);
spin_lock_irq (&ohci->lock);
}
+ /* All ED unlinks should be finished, no need for SOF interrupts */
+ ohci_writel(ohci, OHCI_INTR_SF, &ohci->regs->intrdisable);
update_done_list(ohci);
ohci_work(ohci);
--
1.8.3.1
Powered by blists - more mailing lists