aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-07-28 14:37:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 17:57:25 -0400
commit95a629657dbe28e44a312c47815b3dc3f1ce0970 (patch)
tree0e48656b5d61e26078a50af9f6766e52934fbedf /drivers/usb
parent085ae41f66657a9655ce832b0a61832a06f0e1dc (diff)
[PATCH] PCI: start paying attention to a lot of pci function return values
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hcd-pci.c24
-rw-r--r--drivers/usb/host/ehci-hcd.c4
2 files changed, 22 insertions, 6 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 7b9e54c39678..cbb451d227d2 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -260,8 +260,10 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
260 retval = pci_set_power_state (dev, PCI_D3hot); 260 retval = pci_set_power_state (dev, PCI_D3hot);
261 if (retval == 0) { 261 if (retval == 0) {
262 dev_dbg (hcd->self.controller, "--> PCI D3\n"); 262 dev_dbg (hcd->self.controller, "--> PCI D3\n");
263 pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup); 263 retval = pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup);
264 pci_enable_wake (dev, PCI_D3cold, hcd->remote_wakeup); 264 if (retval)
265 break;
266 retval = pci_enable_wake (dev, PCI_D3cold, hcd->remote_wakeup);
265 } else if (retval < 0) { 267 } else if (retval < 0) {
266 dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n", 268 dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n",
267 retval); 269 retval);
@@ -335,8 +337,20 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
335 dev->current_state); 337 dev->current_state);
336 } 338 }
337#endif 339#endif
338 pci_enable_wake (dev, dev->current_state, 0); 340 retval = pci_enable_wake (dev, dev->current_state, 0);
339 pci_enable_wake (dev, PCI_D3cold, 0); 341 if (retval) {
342 dev_err(hcd->self.controller,
343 "can't enable_wake to %d, %d!\n",
344 dev->current_state, retval);
345 return retval;
346 }
347 retval = pci_enable_wake (dev, PCI_D3cold, 0);
348 if (retval) {
349 dev_err(hcd->self.controller,
350 "can't enable_wake to %d, %d!\n",
351 PCI_D3cold, retval);
352 return retval;
353 }
340 } else { 354 } else {
341 /* Same basic cases: clean (powered/not), dirty */ 355 /* Same basic cases: clean (powered/not), dirty */
342 dev_dbg(hcd->self.controller, "PCI legacy resume\n"); 356 dev_dbg(hcd->self.controller, "PCI legacy resume\n");
@@ -376,7 +390,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
376 usb_hc_died (hcd); 390 usb_hc_died (hcd);
377 } 391 }
378 392
379 pci_enable_device(dev); 393 retval = pci_enable_device(dev);
380 return retval; 394 return retval;
381} 395}
382EXPORT_SYMBOL (usb_hcd_pci_resume); 396EXPORT_SYMBOL (usb_hcd_pci_resume);
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 149b13fc0a71..2507e898af09 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -549,7 +549,9 @@ static int ehci_start (struct usb_hcd *hcd)
549 hcd->can_wakeup = (port_wake & 1) != 0; 549 hcd->can_wakeup = (port_wake & 1) != 0;
550 550
551 /* help hc dma work well with cachelines */ 551 /* help hc dma work well with cachelines */
552 pci_set_mwi (pdev); 552 retval = pci_set_mwi(pdev);
553 if (retval)
554 ehci_dbg(ehci, "unable to enable MWI - not fatal.\n");
553 } 555 }
554#endif 556#endif
555 557