Skip to content
Permalink
Browse files
USB:ohci:fix ohci interruption problem
The operating method of the system entering S4 sleep mode:
echo reboot > /sys/power/disk
echo disk > /sys/power/state

When OHCI enters the S4 sleep state, check the log and find that
the USB sleep process will call check_root_hub_suspend() and
ohci_bus_suspend() instead ohci_suspend() and ohci_bus_suspend(),
which will cause the OHCI interrupt to not be closed.

At this time, if just one device interrupt is reported. the
driver will not process and close this device interrupt. It will cause
the entire system to be stuck during sleep, causing the device to
fail to respond.

When the abnormal interruption reaches 100,000 times, the system will
forcibly close the interruption and make the device unusable.

Because the root cause of the problem is that ohci_suspend is not
called to perform normal interrupt shutdown operations when the system
enters S4 sleep mode.

Therefore, our solution is to specify freeze interface in this mode to
perform normal suspend_common() operations, and call ohci_suspend()
after check_root_hub_suspend() is executed through the suspend_common()
operation.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
  • Loading branch information
Longfang Liu authored and intel-lab-lkp committed Apr 9, 2021
1 parent e9fcb07 commit fa57a31f84453b32378ba3d1410e7a549b5d397d
Showing 1 changed file with 6 additions and 1 deletion.
@@ -520,6 +520,11 @@ static int resume_common(struct device *dev, int event)

#ifdef CONFIG_PM_SLEEP

static int hcd_pci_freeze(struct device *dev)
{
return suspend_common(dev, device_may_wakeup(dev));
}

static int hcd_pci_suspend(struct device *dev)
{
return suspend_common(dev, device_may_wakeup(dev));
@@ -616,7 +621,7 @@ const struct dev_pm_ops usb_hcd_pci_pm_ops = {
.suspend_noirq = hcd_pci_suspend_noirq,
.resume_noirq = hcd_pci_resume_noirq,
.resume = hcd_pci_resume,
.freeze = check_root_hub_suspended,
.freeze = hcd_pci_freeze,
.freeze_noirq = check_root_hub_suspended,
.thaw_noirq = NULL,
.thaw = NULL,

0 comments on commit fa57a31

Please sign in to comment.