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] [xen-unstable] xend: Restore bridge control register aft

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Restore bridge control register after secondary bus reset
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Oct 2008 20:00:55 -0700
Delivery-date: Fri, 10 Oct 2008 20:03:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1223635946 -3600
# Node ID 365674de23c225fb5bec546d41c074e8634355b0
# Parent  60bd590a0438e55f1bdd08c01cc6a4932a9b922e
xend: Restore bridge control register after secondary bus reset

From: Chris Dalton <cid@xxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/util/pci.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r 60bd590a0438 -r 365674de23c2 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Fri Oct 10 10:18:06 2008 +0100
+++ b/tools/python/xen/util/pci.py      Fri Oct 10 11:52:26 2008 +0100
@@ -475,14 +475,17 @@ class PciDevice:
         sysfs_mnt = find_sysfs_mnt()
         parent_path = sysfs_mnt + SYSFS_PCI_DEVS_PATH + '/' + \
             target_bus + SYSFS_PCI_DEV_CONFIG_PATH
-        fd = os.open(parent_path, os.O_WRONLY)
+        fd = os.open(parent_path, os.O_RDWR)
+        # Save state of bridge control register - restore after reset
+        os.lseek(fd, PCI_CB_BRIDGE_CONTROL, 0)
+        br_cntl = (struct.unpack('H', os.read(fd, 2)))[0]
         # Assert Secondary Bus Reset
         os.lseek(fd, PCI_CB_BRIDGE_CONTROL, 0)
         os.write(fd, struct.pack('I', PCI_BRIDGE_CTL_BUS_RESET))
         time.sleep(0.200)
         # De-assert Secondary Bus Reset
-        os.lseek(fd, 0x3e, 0)
-        os.write(fd, struct.pack('I', 0x00))
+        os.lseek(fd, PCI_CB_BRIDGE_CONTROL, 0)
+        os.write(fd, struct.pack('H', br_cntl))
         time.sleep(0.200)
         os.close(fd)
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Restore bridge control register after secondary bus reset, Xen patchbot-unstable <=