int retval = 0;
hcd = pci_get_drvdata(dev);
+ dev_dbg (hcd->controller, "suspend D%d --> D%d\n",
+ dev->current_state, state);
+
switch (hcd->state) {
case USB_STATE_HALT:
dev_dbg (hcd->controller, "halted; hcd not suspended\n");
break;
case USB_STATE_SUSPENDED:
- dev_dbg (hcd->controller, "suspend D%d --> D%d\n",
- dev->current_state, state);
+ dev_dbg (hcd->controller, "hcd already suspended\n");
break;
default:
- dev_dbg (hcd->controller, "suspend to state %d\n", state);
-
/* remote wakeup needs hub->suspend() cooperation */
// pci_enable_wake (dev, 3, 1);
/* driver may want to disable DMA etc */
hcd->state = USB_STATE_QUIESCING;
retval = hcd->driver->suspend (hcd, state);
+ if (retval)
+ dev_dbg (hcd->controller, "suspend fail, retval %d\n",
+ retval);
}
pci_set_power_state (dev, state);
int retval;
hcd = pci_get_drvdata(dev);
+ dev_dbg (hcd->controller, "resume from state D%d\n",
+ dev->current_state);
+
if (hcd->state != USB_STATE_SUSPENDED) {
dev_dbg (hcd->controller, "can't resume, not suspended!\n");
return -EL3HLT;