From: Peter Korsgaard <jacmet@sunsite.dk>
To: Wu Fengguang <wfg@linux.intel.com>, dbrownell@users.sourceforge.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] dm9601: handle corrupt mac address
Date: Tue, 06 Jan 2009 09:42:01 +0100 [thread overview]
Message-ID: <874p0cvnae.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20090106082928.GB19690@localhost> (Wu Fengguang's message of "Tue\, 6 Jan 2009 16\:29\:28 +0800")
>>>>> "Wu" == Wu Fengguang <wfg@linux.intel.com> writes:
Hi,
>> Do we automatically get a random address in netdev nowadays without
>> calling random_ether_addr? I didn't know that.
Wu> I confirmed based on both code review and tests.
Wu> The logic goes like this in usbnet.c:
Wu> 80 // randomly generated ethernet address
Wu> 81 static u8 node_id [ETH_ALEN];
Wu> ...
Wu> 1118 int
Wu> 1119 usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
Wu> 1120 {
Wu> ...
Wu> 1168 dev->net = net;
Wu> 1169 strcpy (net->name, "usb%d");
Wu> 1170 memcpy (net->dev_addr, node_id, sizeof node_id);
Wu> ...
So what happens if you plug in 2 devices without an EEPROM? Do they
get the same MAC address? That seems broken.
>> Anyway, I would prefer to add a dev_warn mentioning the fact that
>> we're using a random address (and which one).
Wu> I'll do that in another patch. Since I'd like to add one more similar
Wu> warning to dm9601_set_mac_address(). That warning helped me identify
Wu> this bug.
Ok.
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2009-01-06 8:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 6:14 [PATCH] dm9601: handle corrupt mac address Wu Fengguang
2009-01-06 8:04 ` Peter Korsgaard
2009-01-06 8:29 ` Wu Fengguang
2009-01-06 8:42 ` Peter Korsgaard [this message]
2009-01-06 9:50 ` Wu Fengguang
2009-01-06 10:28 ` David Brownell
2009-01-06 10:56 ` Peter Korsgaard
2009-01-06 18:55 ` David Miller
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=874p0cvnae.fsf@macbook.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=dbrownell@users.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=wfg@linux.intel.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 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.