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

usb: ohci-at91: Set RemoteWakeupConnected bit explicitly.

The reset value of RWC is 0, set RemoteWakeupConnected bit explicitly
before calling ohci_run, it also fixes the issue that the mass
storage stick connected wasn't suspended when the system suspend.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wenyou Yang and committed by
Greg Kroah-Hartman
ed19ece1 36de70ea

+6 -3
+6 -3
drivers/usb/host/ohci-at91.c
··· 221 221 ohci->num_ports = board->ports; 222 222 at91_start_hc(pdev); 223 223 224 + /* 225 + * The RemoteWakeupConnected bit has to be set explicitly 226 + * before calling ohci_run. The reset value of this bit is 0. 227 + */ 228 + ohci->hc_control = OHCI_CTRL_RWC; 229 + 224 230 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 225 231 if (retval == 0) { 226 232 device_wakeup_enable(hcd->self.controller); ··· 683 677 * REVISIT: some boards will be able to turn VBUS off... 684 678 */ 685 679 if (!ohci_at91->wakeup) { 686 - ohci->hc_control = ohci_readl(ohci, &ohci->regs->control); 687 - ohci->hc_control &= OHCI_CTRL_RWC; 688 - ohci_writel(ohci, ohci->hc_control, &ohci->regs->control); 689 680 ohci->rh_state = OHCI_RH_HALTED; 690 681 691 682 /* flush the writes */