From: "Ed Swierk" <eswierk@arastra.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] PreP kernels boot using Qemu
Date: Tue, 30 Oct 2007 19:30:48 -0700 [thread overview]
Message-ID: <e6c711510710301930u491e92di7de476940b57fc70@mail.gmail.com> (raw)
In-Reply-To: <200710280917.48849.rob@landley.net>
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
On 10/28/07, Rob Landley <rob@landley.net> wrote:
> Hmmm... All the kernels I've built for this project are static. In theory I
> can add "ne.irq=9" to the kernel command line, but in practice it doesn't
> seem to work. Nor does ne.0.irq=9 or irq=9
>
> However, when I hardwire "dev->irq=9;" into the source code, it does seem to
> work. (Or at least I can ping qemu's virtual gateway.)
>
> Off to read the kernel command line parsing logic...
It seems that the driver.parameter syntax works only for parameters
that the driver exports in /sys/module/driver/parameters. The ne
driver doesn't define parameters at all when not compiled as a module,
let alone export them via sysfs.
The attached patch is my feeble attempt to remedy the situation. With
the patch, adding "ne.irq=9,10" to the kernel command line sets the
correct irqs for eth0 and eth1.
--Ed
[-- Attachment #2: linux-2.6.23-ne-module-params.patch --]
[-- Type: application/octet-stream, Size: 1718 bytes --]
Index: linux-2.6.23.1/drivers/net/Space.c
===================================================================
--- linux-2.6.23.1.orig/drivers/net/Space.c
+++ linux-2.6.23.1/drivers/net/Space.c
@@ -181,10 +181,6 @@ static struct devprobe2 isa_probes[] __i
#ifdef CONFIG_E2100 /* Cabletron E21xx series. */
{e2100_probe, 0},
#endif
-#if defined(CONFIG_NE2000) || \
- defined(CONFIG_NE_H8300) /* ISA (use ne2k-pci for PCI cards) */
- {ne_probe, 0},
-#endif
#ifdef CONFIG_LANCE /* ISA/VLB (use pcnet32 for PCI cards) */
{lance_probe, 0},
#endif
Index: linux-2.6.23.1/drivers/net/ne.c
===================================================================
--- linux-2.6.23.1.orig/drivers/net/ne.c
+++ linux-2.6.23.1/drivers/net/ne.c
@@ -888,16 +888,15 @@ static void __exit ne_exit(void)
platform_driver_unregister(&ne_driver);
}
-#ifdef MODULE
#define MAX_NE_CARDS 4 /* Max number of NE cards per module */
static struct net_device *dev_ne[MAX_NE_CARDS];
static int io[MAX_NE_CARDS];
static int irq[MAX_NE_CARDS];
static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */
-module_param_array(io, int, NULL, 0);
-module_param_array(irq, int, NULL, 0);
-module_param_array(bad, int, NULL, 0);
+module_param_array(io, int, NULL, 0644);
+module_param_array(irq, int, NULL, 0644);
+module_param_array(bad, int, NULL, 0644);
MODULE_PARM_DESC(io, "I/O base address(es),required");
MODULE_PARM_DESC(irq, "IRQ number(s)");
MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures");
@@ -962,7 +961,6 @@ void __exit cleanup_module(void)
}
}
}
-#else /* MODULE */
-module_init(ne_init);
-module_exit(ne_exit);
-#endif /* MODULE */
+
+module_init(init_module);
+module_exit(cleanup_module);
prev parent reply other threads:[~2007-10-31 2:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 7:36 [Qemu-devel] PreP kernels boot using Qemu J. Mayer
2007-10-22 9:23 ` Jocelyn Mayer
2007-10-27 1:59 ` Rob Landley
2007-10-22 16:28 ` Aurelien Jarno
2007-10-22 21:12 ` J. Mayer
2007-10-22 22:05 ` Aurelien Jarno
2007-10-22 22:36 ` J. Mayer
2007-10-23 11:47 ` Thiemo Seufer
2007-10-23 21:53 ` J. Mayer
2007-10-23 21:59 ` Aurelien Jarno
2007-10-23 23:06 ` J. Mayer
2007-10-24 0:08 ` Thiemo Seufer
2007-10-27 8:00 ` Rob Landley
2007-10-27 8:07 ` Aurelien Jarno
2007-10-28 10:25 ` Rob Landley
2007-10-28 9:29 ` Aurelien Jarno
2007-10-28 14:17 ` Rob Landley
2007-10-31 2:30 ` Ed Swierk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6c711510710301930u491e92di7de476940b57fc70@mail.gmail.com \
--to=eswierk@arastra.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).