X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fhcd-pci.c;fp=drivers%2Fusb%2Fcore%2Fhcd-pci.c;h=29b5b2a6e183e11aab66d4615d502869bfeb9812;hp=5078fb3375e34e5c573ef86113b81437ffff1d32;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 5078fb337..29b5b2a6e 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -16,6 +16,7 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -125,7 +126,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) pci_set_master (dev); - retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED); + retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ); if (retval != 0) goto err4; return retval; @@ -212,9 +213,11 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message) if (hcd->driver->suspend) { retval = hcd->driver->suspend(hcd, message); - suspend_report_result(hcd->driver->suspend, retval); - if (retval) + if (retval) { + dev_dbg (&dev->dev, "PCI pre-suspend fail, %d\n", + retval); goto done; + } } synchronize_irq(dev->irq); @@ -260,21 +263,15 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message) * some device state (e.g. as part of clock reinit). */ retval = pci_set_power_state (dev, PCI_D3hot); - suspend_report_result(pci_set_power_state, retval); if (retval == 0) { - int wake = device_can_wakeup(&hcd->self.root_hub->dev); - - wake = wake && device_may_wakeup(hcd->self.controller); - - dev_dbg (hcd->self.controller, "--> PCI D3%s\n", - wake ? "/wakeup" : ""); + dev_dbg (hcd->self.controller, "--> PCI D3\n"); /* Ignore these return values. We rely on pci code to * reject requests the hardware can't implement, rather * than coding the same thing. */ - (void) pci_enable_wake (dev, PCI_D3hot, wake); - (void) pci_enable_wake (dev, PCI_D3cold, wake); + (void) pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup); + (void) pci_enable_wake (dev, PCI_D3cold, hcd->remote_wakeup); } else { dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n", retval); @@ -294,7 +291,7 @@ done: #ifdef CONFIG_PPC_PMAC /* Disable ASIC clocks for USB */ - if (machine_is(powermac)) { + if (_machine == _MACH_Pmac) { struct device_node *of_node; of_node = pci_device_to_OF_node (dev); @@ -329,7 +326,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev) #ifdef CONFIG_PPC_PMAC /* Reenable ASIC clocks for USB */ - if (machine_is(powermac)) { + if (_machine == _MACH_Pmac) { struct device_node *of_node; of_node = pci_device_to_OF_node (dev);