From d5b16693b54cccbbe19a1607da5a655b335a2781 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 8 Oct 2003 20:30:27 -0700 Subject: [PATCH] [PATCH] USB: Fix USB suspend in 2.6.0-test6 In drivers/usb/core/hcd-pci.c, the code forgets to set hcd->state to USB_STATE_SUSPENDED on suspend. The effect is that on resume, the code refuses to wake the HCD up, and instead prints a message saying the interface hasn't been suspended. The patch below fixes this. It is against 2.6.0-test6. With this patch I can suspend and resume my Apple PowerBook G4, and the USB works after resuming. --- drivers/usb/core/hcd-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 6070530a09f4e..c106bd577f693 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -295,6 +295,8 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state) if (retval) dev_dbg (hcd->controller, "suspend fail, retval %d\n", retval); + else + hcd->state = USB_STATE_SUSPENDED; } pci_set_power_state (dev, state); -- 2.53.0