2005-09-06 19:18:05

by Thomas Glanzmann

[permalink] [raw]
Subject: wakeup on lan enable without compiling as module

Hello,
I would like to build the 3c59x vortex module into the kernel (not as
module) but don't loose the ability to use wakeup-on-lan. Because it
seems to be impossible to specify 'module parameters' to a built-in
kernel module I tried the following patch, which doesn't work for me.
Could someone enlighten me how I can get the expected behaviour?

Thanks,
Thomas

[PATCH] Try to enable wakeup-on-lan per default. (doesn't work)

--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -906,7 +906,7 @@
static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int enable_wol[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
+static int enable_wol[MAX_UNITS] = {1, 1, 1, 1, 1, 1, 1, 1};
static int global_options = -1;
static int global_full_duplex = -1;
static int global_enable_wol = -1;


2005-09-06 19:18:04

by Thomas Glanzmann

[permalink] [raw]
Subject: Re: wakeup on lan enable without compiling as module

Hello again,
I have a few other problems with 2.6.13 (and also 2.6.12.5). When I pull
the ethernet plug from my card when the net is configured out and put it
back in, I have connectivity for about two till three seconds and after
that the card doesn't handle any more traffic. It did not happen with
the kernel I had before 2.6.12.5, but I don't remember the version.

0000:00:0c.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 74)

Also I would like to know how can I put the card in wake-up-on-lan modus
when I use Magic Sysrq - O to turn it off.

Thanks,
Thomas

2005-09-06 19:26:40

by Stephen Hemminger

[permalink] [raw]
Subject: Re: wakeup on lan enable without compiling as module

On Tue, 6 Sep 2005 20:53:38 +0200
Thomas Glanzmann <[email protected]> wrote:

> Hello,
> I would like to build the 3c59x vortex module into the kernel (not as
> module) but don't loose the ability to use wakeup-on-lan. Because it
> seems to be impossible to specify 'module parameters' to a built-in
> kernel module I tried the following patch, which doesn't work for me.
> Could someone enlighten me how I can get the expected behaviour?
>
> Thanks,
> Thomas

Use
3c59x.enable_wol on command line to pass parameters even if
builtin.

The current practice is to use ethtool instead of module parameters to
do this. This driver doesn't support wake on lan settings via ethtool,
that would be the right way to fix.

2005-09-06 19:37:46

by Thomas Glanzmann

[permalink] [raw]
Subject: Re: wakeup on lan enable without compiling as module

Hello,

* Thomas Glanzmann <[email protected]> [050906 20:53]:
> I would like to build the 3c59x vortex module into the kernel (not as
> module) but don't loose the ability to use wakeup-on-lan. Because it
> seems to be impossible to specify 'module parameters' to a built-in
> kernel module I tried the following patch, which doesn't work for me.
> Could someone enlighten me how I can get the expected behaviour?

I just got a private eMail with the solution. You can provide module
parameters using the following syntax:

3c59x.enable_wol=1

and it works as expected.

Thanks,
Thomas

2005-09-06 21:27:24

by Tony Breeds

[permalink] [raw]
Subject: Re: wakeup on lan enable without compiling as module

On Tue, Sep 06, 2005 at 08:53:38PM +0200, Thomas Glanzmann wrote:
> Hello,
> I would like to build the 3c59x vortex module into the kernel (not as
> module) but don't loose the ability to use wakeup-on-lan. Because it
> seems to be impossible to specify 'module parameters' to a built-in
> kernel module I tried the following patch, which doesn't work for me.
> Could someone enlighten me how I can get the expected behaviour?

IIRC you can pass "module parameters" to code built into the kernel on the
kernel command line. I /think/ the form is
${module_name}_${module_arg}=....

So no need to modify the code.

Yours Tony

linux.conf.au http://linux.conf.au/ || http://lca2006.linux.org.au/
Jan 23-28 2006 The Australian Linux Technical Conference!

2005-09-06 21:33:16

by Randy Dunlap

[permalink] [raw]
Subject: Re: wakeup on lan enable without compiling as module

On Wed, 7 Sep 2005, Tony Breeds wrote:

> On Tue, Sep 06, 2005 at 08:53:38PM +0200, Thomas Glanzmann wrote:
> > Hello,
> > I would like to build the 3c59x vortex module into the kernel (not as
> > module) but don't loose the ability to use wakeup-on-lan. Because it
> > seems to be impossible to specify 'module parameters' to a built-in
> > kernel module I tried the following patch, which doesn't work for me.
> > Could someone enlighten me how I can get the expected behaviour?
>
> IIRC you can pass "module parameters" to code built into the kernel on the
> kernel command line. I /think/ the form is
> ${module_name}_${module_arg}=....
. here instead of _

It's documented in Documentation/kernel-parameters.txt .

> So no need to modify the code.

--
~Randy