Commit 4ceaa893 authored by Manjunath Goudar's avatar Manjunath Goudar Committed by Greg Kroah-Hartman
Browse files

USB: OHCI: Properly handle ohci-pxa27x suspend



Suspend scenario in case of ohci-pxa27x glue was not
properly handled as it was not suspending generic part
of ohci controller.  Alan Stern suggested, properly
handle ohci-pxa27x suspend scenario.

Calling explicitly the ohci_suspend() routine in
ohci_hcd_pxa27x_drv_suspend() will ensure proper
handling of suspend scenario.

Signed-off-by: default avatarManjunath Goudar <manjunath.goudar@linaro.org>
Signed-off-by: default avatarManjunath Goudar <csmanjuvijay@gmail.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 39dbd7df
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -509,13 +509,20 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev)
	struct usb_hcd *hcd = dev_get_drvdata(dev);
	struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd);
	struct ohci_hcd *ohci = hcd_to_ohci(hcd);
	bool do_wakeup = device_may_wakeup(dev);
	int ret;


	if (time_before(jiffies, ohci->next_statechange))
		msleep(5);
	ohci->next_statechange = jiffies;

	ret = ohci_suspend(hcd, do_wakeup);
	if (ret)
		return ret;

	pxa27x_stop_hc(pxa_ohci, dev);
	return 0;
	return ret;
}

static int ohci_hcd_pxa27x_drv_resume(struct device *dev)