2013-09-03 22:22:05 +00:00
|
|
|
From: Olaf Hering <olaf@aepfle.de>
|
|
|
|
Subject: [PATCH v2] unmodified_drivers: enable unplug per default
|
|
|
|
|
|
|
|
Since xen-3.3 an official unplug protocol for emulated hardware is
|
|
|
|
available in the toolstack. The pvops kernel does the unplug per
|
|
|
|
default, so it is safe to do it also in the drivers for forward ported
|
|
|
|
xenlinux.
|
|
|
|
Currently its required to load xen-platform-pci with the module
|
|
|
|
parameter dev_unplug=all, which is cumbersome.
|
|
|
|
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
---
|
|
|
|
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c | 6 +++++-
|
|
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
Index: xen-4.3.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
|
|
|
===================================================================
|
|
|
|
--- xen-4.3.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
|
|
|
+++ xen-4.3.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
|
|
|
@@ -67,7 +67,7 @@ MODULE_LICENSE("GPL");
|
|
|
|
static char *dev_unplug;
|
|
|
|
module_param(dev_unplug, charp, 0644);
|
|
|
|
MODULE_PARM_DESC(dev_unplug, "Emulated devices to unplug: "
|
|
|
|
- "[all,][ide-disks,][aux-ide-disks,][nics]\n");
|
|
|
|
+ "[all,][ide-disks,][aux-ide-disks,][nics] (default is 'all')\n");
|
2009-02-26 23:46:40 +00:00
|
|
|
|
2013-09-03 22:22:05 +00:00
|
|
|
struct pci_dev *xen_platform_pdev;
|
|
|
|
|
|
|
|
@@ -291,6 +291,10 @@ static int check_platform_magic(struct d
|
|
|
|
short magic, unplug = 0;
|
|
|
|
char protocol, *p, *q, *err;
|
|
|
|
|
|
|
|
+ /* Unconditionally unplug everything */
|
|
|
|
+ if (!dev_unplug)
|
|
|
|
+ unplug = UNPLUG_ALL;
|
2009-02-26 23:46:40 +00:00
|
|
|
+
|
2013-09-03 22:22:05 +00:00
|
|
|
for (p = dev_unplug; p; p = q) {
|
|
|
|
q = strchr(dev_unplug, ',');
|
|
|
|
if (q)
|