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

[Xen-devel] [PATCH] pv-on-hvm: Correct the order of the argument of out*()



Hi,

The order of the argument of outl() is wrong in platform-pci.c.
The correct order is outl(value, port). This causes kernel panic.

And outw() is also similar.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1264659597 -32400
# Node ID 36f6f2647701484325b3cfefaced8a1213ae5cd2
# Parent  2636e561970898517def148c19e04581b12dc860
pv-on-hvm: Correct the order of the argument of out*()

The order of the argument of outl() is wrong.
The correct order is outl(value, port). This causes kernel panic.

And outw() is also similar.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 2636e5619708 -r 36f6f2647701 
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Tue Jan 26 
15:54:40 2010 +0000
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Thu Jan 28 
15:19:57 2010 +0900
@@ -324,15 +324,15 @@ static int check_platform_magic(struct d
 
        switch (protocol) {
        case 1:
-               outw(XEN_IOPORT_PRODNUM, XEN_IOPORT_LINUX_PRODNUM);
-               outl(XEN_IOPORT_DRVVER, XEN_IOPORT_LINUX_DRVVER);
+               outw(XEN_IOPORT_LINUX_PRODNUM, XEN_IOPORT_PRODNUM);
+               outl(XEN_IOPORT_LINUX_DRVVER, XEN_IOPORT_DRVVER);
                if (inw(XEN_IOPORT_MAGIC) != XEN_IOPORT_MAGIC_VAL) {
                        dev_err(dev, "blacklisted by host\n");
                        return -ENODEV;
                }
                /* Fall through */
        case 0:
-               outw(XEN_IOPORT_UNPLUG, 0xf);
+               outw(0xf, XEN_IOPORT_UNPLUG);
                break;
        default:
                err = "unknown I/O protocol version";
_______________________________________________
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®.