aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hcd-pci.c28
-rw-r--r--drivers/usb/host/ehci-hcd.c4
2 files changed, 22 insertions, 10 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index fc056062c960..cbb451d227d2 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -121,10 +121,6 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
121 } 121 }
122 } 122 }
123 123
124#ifdef CONFIG_PCI_NAMES
125 hcd->product_desc = dev->pretty_name;
126#endif
127
128 pci_set_master (dev); 124 pci_set_master (dev);
129 125
130 retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ); 126 retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ);
@@ -264,8 +260,10 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
264 retval = pci_set_power_state (dev, PCI_D3hot); 260 retval = pci_set_power_state (dev, PCI_D3hot);
265 if (retval == 0) { 261 if (retval == 0) {
266 dev_dbg (hcd->self.controller, "--> PCI D3\n"); 262 dev_dbg (hcd->self.controller, "--> PCI D3\n");
267 pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup); 263 retval = pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup);
268 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);
269 } else if (retval < 0) { 267 } else if (retval < 0) {
270 dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n", 268 dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n",
271 retval); 269 retval);
@@ -339,8 +337,20 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
339 dev->current_state); 337 dev->current_state);
340 } 338 }
341#endif 339#endif
342 pci_enable_wake (dev, dev->current_state, 0); 340 retval = pci_enable_wake (dev, dev->current_state, 0);
343 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 }
344 } else { 354 } else {
345 /* Same basic cases: clean (powered/not), dirty */ 355 /* Same basic cases: clean (powered/not), dirty */
346 dev_dbg(hcd->self.controller, "PCI legacy resume\n"); 356 dev_dbg(hcd->self.controller, "PCI legacy resume\n");
@@ -380,7 +390,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
380 usb_hc_died (hcd); 390 usb_hc_died (hcd);
381 } 391 }
382 392
383 pci_enable_device(dev); 393 retval = pci_enable_device(dev);
384 return retval; 394 return retval;
385} 395}
386EXPORT_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