[vortex] WOL for 3C905C; 2.4.7

Dr. Tilmann Bubeck bubeck@think-at-work.de
Wed, 08 Aug 2001 21:32:41 +0200


Hi

I had the same problem and solved it as follows for kernel 2.4.2. I think the 
problem is still in 2.4.7 but I have not confirmed this. This information was 
already sent to donald for inclusion into the driver but he asked me to send 
it to the vortex list too. This is what I do here... ;-)

 solution 1: insert this lines into /etc/rc.d/init.d/halt right before
             runcmd $"Unmounting proc file system: " umount /proc

# turn off eth0, so that wake-on-lan is possible
/sbin/ifconfig eth0 down
/sbin/rmmod 3c59x

  solution 2: use driver 3c90x instead of 3c59x (RH 7.1 uses 3c59x as default)

  solution 3: fix 3c59x (or wait for it to be fixed)

This is the problem:
====================

If using 3c59x as a module and powering off the machine with "poweroff" then
the machine will power off completely as it should. However, if you try to
wake up this machine by sending a wake-on-lan package the machine will NOT
turn on again.

The machine will properly turn on again, if the driver 3c90x was used instead.

Code inspection:
================

Looking at both drivers showed a difference when used as a module. The
"correct" driver 3c90x does a TotalReset when "device->stop" is called. The
"broken" 3c59x does not do this in "device->stop" (implemented in
"vortex_close") but in cleanup_module. If we do no TotalReset before the
machine get's powered down, then the NIC will not wake up the machine.

My RHAT 7.1 does a "ifconfig eth0 down" in /etc/rc.d/init.d/halt which means,
that the driver 3c90x does a TotalReset but 3c59x does NOT.

I looked at "3c59x.c:LK1.1.13 27 Jan 2001  Donald Becker and
others. http://www.scyld.com/network/vortex.html"

Solutions:
==========

a) Move TotalReset code from cleanup_module into vortex_close so that it gets
   called by "ifconfig eth0 down"

-or-

b) Tell RHAT (and all other affected distributions) to unload modules right
   before halt.

I would suggest solution a) because the manual page of ifconfig tells:

       down   This  flag  causes the driver for this interface to
              be shut down.

Therefore it should be enough to make a "ifconfig eth0 down" and it should not
be necessary to do a module unload (which should not alter hardware settings,
too). Apart from that point, many distributions do not unload modules at the
moment.

What do you think? Do you need more information?
   Till

+-------+-------------------------------------------------------------+
|       | dr. tilmann bubeck               reinform medien- und       |
| rein  |                                  informationstechnologie AG |
| form  | cell.: +49 (172) 8 84 29 72      koenigstrasse 80           |
|    AG | fax  : +49 (711) 7 22 77 34      70173 stuttgart / germany  |
|       | email: t.bubeck@reinform-ag.com  http://www.reinform-ag.com |
+-------+----------------------------------------------(in gruendung)-+