2013-10-03 00:41:46 +02:00
|
|
|
# Commit df17e9c889c48c9c10aa3f9dd0bb11077f54efc4
|
|
|
|
# Date 2013-09-20 11:41:08 +0200
|
|
|
|
# Author Olaf Hering <olaf@aepfle.de>
|
|
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
|
|
unmodified_drivers: enable unplug per default
|
2013-09-04 00:22:05 +02:00
|
|
|
|
|
|
|
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.
|
2013-10-03 00:41:46 +02:00
|
|
|
Also recognize the dev_unplug=never parameter, which provides the
|
|
|
|
default before this patch.
|
2013-09-04 00:22:05 +02:00
|
|
|
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
|
2013-10-03 00:41:46 +02:00
|
|
|
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
|
|
|
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
2013-09-09 17:27:39 +02:00
|
|
|
@@ -66,7 +66,7 @@ MODULE_LICENSE("GPL");
|
2013-09-04 00:22:05 +02:00
|
|
|
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");
|
2013-10-03 00:41:46 +02:00
|
|
|
+ "[all,][ide-disks,][aux-ide-disks,][nics,][never] (default is 'all')\n");
|
2009-02-27 00:46:40 +01:00
|
|
|
|
2013-09-04 00:22:05 +02:00
|
|
|
struct pci_dev *xen_platform_pdev;
|
|
|
|
|
2013-09-09 17:27:39 +02:00
|
|
|
@@ -290,6 +290,10 @@ static int check_platform_magic(struct d
|
2013-09-04 00:22:05 +02:00
|
|
|
short magic, unplug = 0;
|
|
|
|
char protocol, *p, *q, *err;
|
|
|
|
|
|
|
|
+ /* Unconditionally unplug everything */
|
|
|
|
+ if (!dev_unplug)
|
|
|
|
+ unplug = UNPLUG_ALL;
|
2009-02-27 00:46:40 +01:00
|
|
|
+
|
2013-09-04 00:22:05 +02:00
|
|
|
for (p = dev_unplug; p; p = q) {
|
|
|
|
q = strchr(dev_unplug, ',');
|
|
|
|
if (q)
|
2013-10-03 00:41:46 +02:00
|
|
|
@@ -302,6 +306,8 @@ static int check_platform_magic(struct d
|
|
|
|
unplug |= UNPLUG_AUX_IDE_DISKS;
|
|
|
|
else if (!strcmp(p, "nics"))
|
|
|
|
unplug |= UNPLUG_ALL_NICS;
|
|
|
|
+ else if (!strcmp(p, "never"))
|
|
|
|
+ unplug = 0;
|
|
|
|
else
|
|
|
|
dev_warn(dev, "unrecognised option '%s' "
|
|
|
|
"in module parameter 'dev_unplug'\n", p);
|