aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2012-03-21 10:08:38 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-03-22 11:37:11 -0400
commitb9136d207f0c05c96c6b9c980fa7f7fd541a65a8 (patch)
treec5782f620475131fbd838cec21376c1a2dad7ff5 /drivers/net/xen-netfront.c
parent106b44388d8f76373149c4ea144f717b6d4d9a6d (diff)
xen: initialize platform-pci even if xen_emul_unplug=never
When xen_emul_unplug=never is specified on kernel command line reading files from /sys/hypervisor is broken (returns -EBUSY). It is caused by xen_bus dependency on platform-pci and platform-pci isn't initialized when xen_emul_unplug=never is specified. Fix it by allowing platform-pci to ignore xen_emul_unplug=never, and do not intialize xen_[blk|net]front instead. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index fa679057630f..8cc0914b9f92 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -47,6 +47,7 @@
47#include <xen/xenbus.h> 47#include <xen/xenbus.h>
48#include <xen/events.h> 48#include <xen/events.h>
49#include <xen/page.h> 49#include <xen/page.h>
50#include <xen/platform_pci.h>
50#include <xen/grant_table.h> 51#include <xen/grant_table.h>
51 52
52#include <xen/interface/io/netif.h> 53#include <xen/interface/io/netif.h>
@@ -1956,6 +1957,9 @@ static int __init netif_init(void)
1956 if (xen_initial_domain()) 1957 if (xen_initial_domain())
1957 return 0; 1958 return 0;
1958 1959
1960 if (!xen_platform_pci_unplug)
1961 return -ENODEV;
1962
1959 printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); 1963 printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");
1960 1964
1961 return xenbus_register_frontend(&netfront_driver); 1965 return xenbus_register_frontend(&netfront_driver);