Re: BUG: rawhide installer does not autoload xenblk/xennet modules

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

 



Needs something like the attached patch file...



Jeremy Katz wrote:
On Tue, 2008-01-08 at 12:16 -0500, Bill Nottingham wrote:
Jeremy Katz (katzj@xxxxxxxxxx) said:
On Mon, 2008-01-07 at 21:32 +0200, Pasi Kärkkäinen wrote:
I just tried to install rawhide/development to a xen domU with virt-manager,
and it seems current kernel (or xen drivers?) has a bug that prevents
anaconda/installer from autoloading the needed drivers..
[snip]
"No driver found"
"Unable to find any devices of the type needed for this installation type."
"Would you like to manually select your driver or use a driver disk?"
This could either be the xen kernel or the changes within anaconda to
stop using kudzu.  Please file it in bugzilla so that it doesn't get
lost in the noise of the list.
xenblk/xennet don't export any aliases that would cause them to get loaded.
So they don't get loaded.

That would do it.  Thus, file the bug against kernel-xen.  They should
have modaliases so they can get loaded automatically
Jeremy

Implement module autoloading via modalias and udev for xen drivers.
---
 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c   |    2 -
 linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c       |    1 
 linux-2.6-xen-sparse/drivers/xen/fbfront/xenkbd.c      |    1 
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c   |    1 
 linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c     |    1 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c |   25 +++++++++++++++++
 6 files changed, 30 insertions(+), 1 deletion(-)

Index: xenpv/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
===================================================================
--- xenpv.orig/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
+++ xenpv/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
@@ -883,7 +883,7 @@ static struct xenbus_device_id blkfront_
 	{ "vbd" },
 	{ "" }
 };
-
+MODULE_ALIAS("xen:vbd");
 
 static struct xenbus_driver blkfront = {
 	.name = "vbd",
Index: xenpv/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
===================================================================
--- xenpv.orig/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
+++ xenpv/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
@@ -2075,6 +2075,7 @@ static struct xenbus_device_id netfront_
 	{ "vif" },
 	{ "" }
 };
+MODULE_ALIAS("xen:vif");
 
 
 static struct xenbus_driver netfront = {
Index: xenpv/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
===================================================================
--- xenpv.orig/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
+++ xenpv/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
@@ -165,6 +165,30 @@ static int read_backend_details(struct x
 	return read_otherend_details(xendev, "backend-id", "backend");
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+static int xenbus_uevent_frontend(struct device *dev, char **envp,
+				  int num_envp, char *buffer, int buffer_size)
+{
+	struct xenbus_device *xdev;
+	int length = 0, i = 0;
+
+	if (dev == NULL)
+		return -ENODEV;
+	xdev = to_xenbus_device(dev);
+	if (xdev == NULL)
+		return -ENODEV;
+
+	/* stuff we want to pass to /sbin/hotplug */
+	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+		       "XENBUS_TYPE=%s", xdev->devicetype);
+	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+		       "XENBUS_PATH=%s", xdev->nodename);
+	add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+		       "MODALIAS=xen:%s", xdev->devicetype);
+
+	return 0;
+}
+#endif
 
 /* Bus type for frontend drivers. */
 static struct xen_bus_type xenbus_frontend = {
@@ -180,6 +204,7 @@ static struct xen_bus_type xenbus_fronte
 		.probe    = xenbus_dev_probe,
 		.remove   = xenbus_dev_remove,
 		.shutdown = xenbus_dev_shutdown,
+		.uevent   = xenbus_uevent_frontend,
 #endif
 	},
 	.dev = {
Index: xenpv/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c
===================================================================
--- xenpv.orig/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c
+++ xenpv/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c
@@ -718,6 +718,7 @@ static struct xenbus_device_id xenfb_ids
 	{ "vfb" },
 	{ "" }
 };
+MODULE_ALIAS("xen:vfb");
 
 static struct xenbus_driver xenfb = {
 	.name = "vfb",
Index: xenpv/linux-2.6-xen-sparse/drivers/xen/fbfront/xenkbd.c
===================================================================
--- xenpv.orig/linux-2.6-xen-sparse/drivers/xen/fbfront/xenkbd.c
+++ xenpv/linux-2.6-xen-sparse/drivers/xen/fbfront/xenkbd.c
@@ -299,6 +299,7 @@ static struct xenbus_device_id xenkbd_id
 	{ "vkbd" },
 	{ "" }
 };
+MODULE_ALIAS("xen:vkbd");
 
 static struct xenbus_driver xenkbd = {
 	.name = "vkbd",
Index: xenpv/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c
===================================================================
--- xenpv.orig/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c
+++ xenpv/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c
@@ -273,6 +273,7 @@ static struct xenbus_device_id xenpci_id
 	{"pci"},
 	{{0}},
 };
+MODULE_ALIAS("xen:pci");
 
 static struct xenbus_driver xenbus_pcifront_driver = {
 	.name 			= "pcifront",
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux