Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ohci-at91: fix power management hanging

A hanging has been detected in ohci-at91 while going in suspend to ram. This is
due to asynchronous operations between ohci reset and ohci clocks shutdown.
This patch adds the reading of the control register between the reset of the
ohci and clocks stop. This "flush the writes" idea was taken from ohci-hcd.c
file (ohci_shutdown() function).

Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Patrice Vilchez and committed by
Greg Kroah-Hartman
869aa98c 073900a2

+2
+2
drivers/usb/host/ohci-at91.c
··· 331 331 */ 332 332 if (at91_suspend_entering_slow_clock()) { 333 333 ohci_usb_reset (ohci); 334 + /* flush the writes */ 335 + (void) ohci_readl (ohci, &ohci->regs->control); 334 336 at91_stop_clock(); 335 337 } 336 338