All of lore.kernel.org
 help / color / mirror / Atom feed
From: Domen Puncer <domen@coderock.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: netdev@vger.kernel.org, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] phy: export phy_mii_ioctl
Date: Wed, 19 Sep 2007 13:56:21 +0200	[thread overview]
Message-ID: <20070919115621.GI32628@nd47.coderock.org> (raw)
In-Reply-To: <9e4733910709181217v417438s85bb9e6b4ad4b475@mail.gmail.com>

On 18/09/07 15:17 -0400, Jon Smirl wrote:
> On 9/18/07, Domen Puncer <domen@coderock.org> wrote:
> > More testing and getting it to work properly on Phytec pcm030 would
> > be great.
> 
> I compiled it as a module:
>   CC [M]  drivers/net/fec_mpc52xx/fec.o
> drivers/net/fec_mpc52xx/fec.c:613: warning: 'mpc52xx_fec_mac_setup'
> defined but not used
> 
> This code needs to be enclosed in "#ifndef MODULE". But why aren't you
> using module_param() to make a string parameter and then copy it into
> mpc52xx_fec_mac_addr[] if the parameter is not null?

Right,

Patch at the end.
When compiled as module use "modprobe fec_mpc52xx mac=foo",
when built-in add to boot line: "fec_mpc52xx.mac=foo"


As for link-up-printk in the middle of DHCP requests...
is it really that big of a problem?

This sort of things happen when printk doesn't have the whole
line... getting rid of link-up message would just hide it (it can show
ie. when an usb device is bound to scsi layer).


	Domen

---
 drivers/net/fec_mpc52xx/fec.c |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

Index: linux.git/drivers/net/fec_mpc52xx/fec.c
===================================================================
--- linux.git.orig/drivers/net/fec_mpc52xx/fec.c
+++ linux.git/drivers/net/fec_mpc52xx/fec.c
@@ -53,6 +53,8 @@ static void fec_start(struct net_device 
 static void fec_reset(struct net_device *dev);
 
 static u8 mpc52xx_fec_mac_addr[6];
+module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0);
+MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe");
 
 static void fec_tx_timeout(struct net_device *dev)
 {
@@ -609,22 +611,6 @@ static void fec_set_multicast_list(struc
 	}
 }
 
-static int __init mpc52xx_fec_mac_setup(char *mac_address)
-{
-	int i;
-	u64 val64;
-
-	val64 = simple_strtoull(mac_address, NULL, 16);
-
-	for (i = 0; i < 6; i++)
-		mpc52xx_fec_mac_addr[5-i] = val64 >> (i*8);
-
-	return 0;
-}
-
-__setup("mpc52xx-mac=",mpc52xx_fec_mac_setup);
-
-
 /**
  * fec_hw_init
  * @dev: network device

  reply	other threads:[~2007-09-19 11:56 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10  9:51 [RFC PATCH v0.1] net driver: mpc52xx fec Domen Puncer
2007-08-10 13:02 ` Arnaldo Carvalho de Melo
2007-08-13  7:21   ` Domen Puncer
2007-08-18 10:06 ` Domen Puncer
2007-08-19 15:39   ` Matt Sealey
2007-08-20  8:31     ` Domen Puncer
2007-08-20 13:13       ` Domen Puncer
2007-08-20 19:02         ` Matt Sealey
2007-08-21  5:49           ` Domen Puncer
2007-09-02  7:41 ` [RFC PATCH v0.2] " Domen Puncer
2007-09-03 15:57   ` Grant Likely
2007-09-03 16:09     ` Jon Smirl
2007-09-03 16:41       ` Grant Likely
2007-09-15 12:14     ` Domen Puncer
2007-09-17  9:53       ` Sven Luther
2007-09-17 20:21         ` [PATCH] phy: export phy_mii_ioctl Domen Puncer
2007-09-17 22:08           ` Jon Smirl
2007-09-18 15:16             ` Domen Puncer
2007-09-18 19:17               ` Jon Smirl
2007-09-19 11:56                 ` Domen Puncer [this message]
2007-09-19 18:44                   ` Jon Smirl
2007-09-19 21:18                     ` Jon Smirl
2007-09-18 19:29               ` Jon Smirl
2007-09-19  8:54                 ` Pedro Luis D. L.
2007-09-19 10:37                   ` Juergen Beisert
2007-09-19 11:38                     ` Pedro Luis D. L.
2007-09-19 14:51                       ` Juergen Beisert
2007-09-19 15:11                         ` Pedro Luis D. L.
2007-09-19 13:56                   ` Jon Smirl
2007-09-19 14:31                     ` Pedro Luis D. L.
2007-09-19  8:54                 ` Pedro Luis D. L.
2007-09-20  6:36           ` Jeff Garzik
2007-10-02 12:49   ` [RFC PATCH v0.2] net driver: mpc52xx fec Sascha Hauer
2007-10-02 14:32     ` Domen Puncer
2007-10-02 15:46       ` Robert Schwebel
2007-09-27 17:07 ` [RFC PATCH v0.1] " Juergen Beisert
2007-09-27 18:12   ` Jon Smirl
2007-09-27 18:43     ` Scott Wood
2007-09-28  9:12       ` Juergen Beisert
2007-09-28 15:40         ` Scott Wood
2007-10-08  8:48         ` Sascha Hauer
2007-10-08  9:01         ` Sascha Hauer
2007-10-08 16:46           ` Jon Smirl
2007-09-28 15:07   ` Juergen Beisert
2007-09-28 15:38     ` Jon Smirl
2007-10-01  8:35       ` Juergen Beisert
2007-10-01 16:24         ` Juergen Beisert

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=20070919115621.GI32628@nd47.coderock.org \
    --to=domen@coderock.org \
    --cc=jonsmirl@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.