[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 12/13] Remove usage of pci_restore_bars() as Linux handles the power-up states correctly now.



Originally this code was pulled from the upstream kernel, and stuck
in the linux-2.6-sparse tree. At that point of time, the Linux tree (2.6.16?)
did not know how to handle this. Nowadays the pci_set_power_state routine
handles this case so we do not need this anymore.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pciback/conf_space_capability_pm.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/xen/pciback/conf_space_capability_pm.c 
b/drivers/xen/pciback/conf_space_capability_pm.c
index e2f99c7..e1d3af4 100644
--- a/drivers/xen/pciback/conf_space_capability_pm.c
+++ b/drivers/xen/pciback/conf_space_capability_pm.c
@@ -58,19 +58,6 @@ static int pm_ctrl_write(struct pci_dev *dev, int offset, 
u16 new_value,
                goto out;
        }
 
-       /*
-        * Device may lose PCI config info on D3->D0 transition. This
-        * is a problem for some guests which will not reset BARs. Even
-        * those that have a go will be foiled by our BAR-write handler
-        * which will discard the write! Since Linux won't re-init
-        * the config space automatically in all cases, we do it here.
-        * Future: Should we re-initialise all first 64 bytes of config space?
-        */
-       if (new_state == PCI_D0 &&
-           (old_state == PCI_D3hot || old_state == PCI_D3cold) &&
-           !(old_value & PCI_PM_CTRL_NO_SOFT_RESET))
-               pci_restore_bars(dev);
-
  out:
        return err;
 }
-- 
1.6.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.