Commit 84050a84 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] PCI: make pci_save_state() only happen when no suspend()

Recent PCI changes are killing USB Power Management, and maybe more.

The root cause is a change to the PCI suspend code from back in May,
saving a copy of pci config space after the PCI driver did.  That
was OK until a recent change made it overwrite the copy that the
PCI device driver would later restore ... net result for USB is
that DMA would always be disabled after resume.

This patch restores the long-documented behavior of PCI driver
suspend/resume calls (drivers are responsible for saving and
restoring config space state), and also removes a superfluous line
from the USB suspend logic.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 3cf710a1
......@@ -308,7 +308,7 @@ static int pci_device_suspend(struct device * dev, u32 state)
dev_state = state_conversion[state];
if (drv && drv->suspend)
i = drv->suspend(pci_dev, dev_state);
else
pci_save_state(pci_dev);
return i;
}
......
......@@ -174,7 +174,6 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
}
hcd->state = USB_STATE_HALT;
pci_set_master (dev);
#ifndef __sparc__
sprintf (buf, "%d", dev->irq);
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment