WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] pciback: Allow DomU to restore addres

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pciback: Allow DomU to restore address bars if needed.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jul 2007 09:00:52 -0700
Delivery-date: Tue, 10 Jul 2007 08:59:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184059104 -3600
# Node ID a70de77dd8d3db31dce965c718f5d221e2372e16
# Parent  e9c0b1c115872a62aedb298da80a48621f6f958b
pciback: Allow DomU to restore address bars if needed.
Signed-off-by: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>
---
 drivers/xen/pciback/conf_space_header.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff -r e9c0b1c11587 -r a70de77dd8d3 drivers/xen/pciback/conf_space_header.c
--- a/drivers/xen/pciback/conf_space_header.c   Tue Jul 10 10:12:11 2007 +0100
+++ b/drivers/xen/pciback/conf_space_header.c   Tue Jul 10 10:18:24 2007 +0100
@@ -75,8 +75,15 @@ static int rom_write(struct pci_dev *dev
         */
        if (value == ~PCI_ROM_ADDRESS_ENABLE)
                bar->which = 1;
-       else
+       else {
+               u32 tmpval;
+               pci_read_config_dword(dev, offset, &tmpval);
+               if (tmpval != bar->val && value == bar->val) {
+                       /* Allow restoration of bar value. */
+                       pci_write_config_dword(dev, offset, bar->val);
+               }
                bar->which = 0;
+       }
 
        /* Do we need to support enabling/disabling the rom address here? */
 
@@ -102,8 +109,15 @@ static int bar_write(struct pci_dev *dev
         */
        if (value == ~0)
                bar->which = 1;
-       else
+       else {
+               u32 tmpval;
+               pci_read_config_dword(dev, offset, &tmpval);
+               if (tmpval != bar->val && value == bar->val) {
+                       /* Allow restoration of bar value. */
+                       pci_write_config_dword(dev, offset, bar->val);
+               }
                bar->which = 0;
+       }
 
        return 0;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pciback: Allow DomU to restore address bars if needed., Xen patchbot-linux-2.6.18-xen <=