aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-23 04:38:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 14:41:25 -0400
commit026694920579590c73b5c56705d543568ed5ad41 (patch)
tree1c3ad318fe65c5812dd33008af8e77389ee31c46 /drivers/usb
parent372254018eb1b65ee69210d11686bfc65c8d84db (diff)
[PATCH] pm: print name of failed suspend function
Print more diagnostic info to help identify the source of power management suspend failures. Example: usb_hcd_pci_suspend(): pci_set_power_state+0x0/0x1af() returns -22 pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x11b() returns -22 suspend_device(): pci_device_suspend+0x0/0x34() returns -22 Work-in-progress. It needs lots more suspend_report_result() calls sprinkled everywhere. Cc: Patrick Mochel <mochel@digitalimplant.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hcd-pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 0d2193b69235..66b78404ab34 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -213,11 +213,9 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
213 213
214 if (hcd->driver->suspend) { 214 if (hcd->driver->suspend) {
215 retval = hcd->driver->suspend(hcd, message); 215 retval = hcd->driver->suspend(hcd, message);
216 if (retval) { 216 suspend_report_result(hcd->driver->suspend, retval);
217 dev_dbg (&dev->dev, "PCI pre-suspend fail, %d\n", 217 if (retval)
218 retval);
219 goto done; 218 goto done;
220 }
221 } 219 }
222 synchronize_irq(dev->irq); 220 synchronize_irq(dev->irq);
223 221
@@ -263,6 +261,7 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
263 * some device state (e.g. as part of clock reinit). 261 * some device state (e.g. as part of clock reinit).
264 */ 262 */
265 retval = pci_set_power_state (dev, PCI_D3hot); 263 retval = pci_set_power_state (dev, PCI_D3hot);
264 suspend_report_result(pci_set_power_state, retval);
266 if (retval == 0) { 265 if (retval == 0) {
267 int wake = device_can_wakeup(&hcd->self.root_hub->dev); 266 int wake = device_can_wakeup(&hcd->self.root_hub->dev);
268 267