- break;
- }
- hcd->state = HCD_STATE_SUSPENDED;
- /* FALLTHROUGH */
-
- /* entry with CONFIG_USB_SUSPEND, or hcds that autosuspend: the
- * controller and/or root hub will already have been suspended,
- * but it won't be ready for a PCI resume call.
- *
- * FIXME only CONFIG_USB_SUSPEND guarantees hub_suspend() will
- * have been called, otherwise root hub timers still run ...
- */
- case HCD_STATE_SUSPENDED:
- if (state <= dev->current_state)
- break;
-
- /* no DMA or IRQs except in D0 */
- if (!dev->current_state) {
- pci_save_state (dev);
- pci_disable_device (dev);
- free_irq (hcd->irq, hcd);
- }
-
- if (!has_pci_pm) {
- dev_dbg (hcd->self.controller, "--> PCI D0/legacy\n");
- break;
- }
-
- /* POLICY: ignore D1/D2/D3hot differences;
- * we know D3hot will always work.
- */
- retval = pci_set_power_state (dev, state);
- if (retval < 0 && state < 3) {
- retval = pci_set_power_state (dev, 3);
- if (retval == 0)
- state = 3;
- }
- if (retval == 0) {
- dev_dbg (hcd->self.controller, "--> PCI %s\n",
- pci_state(dev->current_state));