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/
Home Products Support Community News


[Xen-changelog] [linux-2.6.18-xen] pci: Do not disable I/O decoding on r

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pci: Do not disable I/O decoding on reassigning resource.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 06 Apr 2009 17:25:02 -0700
Delivery-date: Mon, 06 Apr 2009 17:25:09 -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 1239022047 -3600
# Node ID 571229e265e2b04e126823f594781592e0e789bd
# Parent  67a7ffcc50679d134e6079c738c63049d6314add
pci: Do not disable I/O decoding on reassigning resource.

When I reserve UHCI for guest domain with "guestdev=" and
"reassign_resources" parameters, spurious interrupts occurred.
The reason is that UHCI is not reset by uhci_check_and_reset_hc
because I/O decoding is disabled. UHCI keeps asserting the interrupt
line. As a result spurious interrupts occur.

The patch does not disable I/O decoding. It disables only memory
decoding. So UHCI is reset and spurious interrupts do not occur.

Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
 drivers/pci/quirks.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff -r 67a7ffcc5067 -r 571229e265e2 drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      Wed Apr 01 11:43:01 2009 +0100
+++ b/drivers/pci/quirks.c      Mon Apr 06 13:47:27 2009 +0100
@@ -26,15 +26,16 @@
- * This quirk function disables the device and releases resources
- * which is specified by kernel's boot parameter 'reassigndev'.
+ * This quirk function disables memory decoding and releases memory 
+ * resources which is specified by kernel's boot parameter 'reassigndev'.
  * Later on, kernel will assign page-aligned memory resource back
- * to that device.
+ * to the device.
 static void __devinit quirk_release_resources(struct pci_dev *dev)
        int i;
        struct resource *r;
+       u16 command;
        if (pci_is_reassigndev(dev)) {
                if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
@@ -43,9 +44,11 @@ static void __devinit quirk_release_reso
-                       "PCI: Disable device and release resources [%s].\n",
+                       "PCI: Disable memory decoding and release memory 
resources [%s].\n",
-               pci_disable_device(dev);
+               pci_read_config_word(dev, PCI_COMMAND, &command);
+               command &= ~PCI_COMMAND_MEMORY;
+               pci_write_config_word(dev, PCI_COMMAND, command);
                for (i=0; i < PCI_NUM_RESOURCES; i++) {
                        r = &dev->resource[i];

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pci: Do not disable I/O decoding on reassigning resource., Xen patchbot-linux-2.6.18-xen <=