netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Luethi <rl@hellgate.ch>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>, netdev@oss.sgi.com
Subject: Re: [9/9][PATCH 2.6] Add WOL support
Date: Sun, 20 Jun 2004 00:15:13 +0200	[thread overview]
Message-ID: <20040619221513.GB3313@k3.hellgate.ch> (raw)
In-Reply-To: <40D4B049.6070508@pobox.com>

On Sat, 19 Jun 2004 17:29:45 -0400, Jeff Garzik wrote:
> >+				reason = "Unicast packet";
> >+				break;
> >+			case WOLbmcast:
> >+				reason = "Multicast/broadcast packet";
> >+				break;
> >+			default:
> >+				reason = "Unknown";
> >+			}
> >+			printk("%s: Woke system up. Reason: %s.\n",
> >+			       DRV_NAME, reason);
> 
> printk needs  KERN_xxx prefix

Oops. Fixed.

> also, use dev->name rather than DRV_NAME, since we are past the probe phase.

Can you define probe phase? ... In the code as is, we haven't called
register_netdev when we execute that part. Getting the probe stuff into
a sane order is on my todo list as well, but ISTR that calling
register_netdev way early is frowned upon. No?

> >+	/* Enable legacy WOL (for old motherboards) */
> >+	writeb(0x01, ioaddr + PwcfgSet);
> >+	writeb(readb(ioaddr + StickyHW) | 0x04, ioaddr + StickyHW);
> >+
> >+	/* Hit power state D3 (sleep) */
> >+	writeb(readb(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
> 
> would be nice to eliminate these magic numbers (0x04, 0x04), ...

Mostly agreed. I want to change a bunch of symbol names anyway. However,
I found it easier to document magic numbers that are used only _once_
where they occur instead of giving them a name I have to look up later.
I don't feel strongly about it, though, so feel free to bug me again if
you do :-).

Roger

  reply	other threads:[~2004-06-19 22:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-15 17:47 [0/9] via-rhine: Major surgery Roger Luethi
2004-06-15 17:48 ` [1/9][PATCH 2.6] Restructure reset code Roger Luethi
2004-06-15 17:48 ` [2/9][PATCH 2.6] fix mc_filter on big-endian arch Roger Luethi
2004-06-15 17:48 ` [3/9][PATCH 2.6] Remove lingering PHY special casing Roger Luethi
2004-06-15 17:49 ` [4/9][PATCH 2.6] Rewrite PHY detection Roger Luethi
2004-06-15 17:49 ` [5/9][PATCH 2.6] Remove options, full_duplex parameters Roger Luethi
2004-06-15 17:49 ` [7/9][PATCH 2.6] Media mode rewrite Roger Luethi
2004-06-19 21:24   ` Jeff Garzik
2004-06-19 22:20     ` Roger Luethi
2004-06-15 17:49 ` [8/9][PATCH 2.6] Small fixes and clean-up Roger Luethi
     [not found]   ` <40D4AFE1.6020508@pobox.com>
2004-06-19 22:23     ` Roger Luethi
2004-06-15 17:50 ` [9/9][PATCH 2.6] Add WOL support Roger Luethi
2004-06-19 21:29   ` Jeff Garzik
2004-06-19 22:15     ` Roger Luethi [this message]
2004-06-16 15:03 ` [0/9] via-rhine: Major surgery Jeff Garzik
2004-06-19 21:20 ` Jeff Garzik

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=20040619221513.GB3313@k3.hellgate.ch \
    --to=rl@hellgate.ch \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /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).