Thread (55 messages) flat view 55 messages, 4 authors, 2011-01-01
STALE5746d

[PATCH 03/10] net/fec: add mac field into platform data and consolidate fec_get_mac

From: Uwe Kleine-König <hidden>
Date: 2010-12-29 10:31:38

Hello Shawn,

On Wed, Dec 29, 2010 at 06:05:21PM +0800, Shawn Guo wrote:
On Wed, Dec 29, 2010 at 08:53:30AM +0200, Baruch Siach wrote:
quoted
Hi Shawn,
In the case of dual MAC that you later add support for, the address which one 
is being set? Is there a way to set both in kernel command line?
The fec0 gets fec_mac and fec1 gets fec_mac + 1. The following code
in function fec_get_mac takes care of it.

	/* Adjust MAC if using default MAC address */
default MAC address means the address passed via cmdline?  Sounds
confusing to me.
	if (iap == fec_mac_default)
		dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->pdev->id;
Can this overflow?  (I didn't check the code, so my concern might be
completely stupid here.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help