[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120116123110.7ce91f2d@bob.linux.org.uk>
Date: Mon, 16 Jan 2012 12:31:10 +0000
From: Alan Cox <alan@...ux.intel.com>
To: Tomoya MORINAGA <tomoya.rohm@...il.com>
Cc: Darren Hart <dvhart@...ux.intel.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
David Miller <davem@...emloft.net>,
linux-kernel@...r.kernel.org, arjan@...ux.intel.com,
jeffrey.t.kirsher@...el.com, paul.gortmaker@...driver.com,
jdmason@...zu.us, netdev@...r.kernel.org
Subject: Re: [PATCH] pch_gbe: Use a randomly generated MAC instead of
failing probe
> Saving MAC address into external ROM is generic method, I think.
> Though I know the ROM-less system using eg20t-pch, however I think
> this system is not common.
> So, I think pch_gbe shouldn't have auto-mac address assignment.
The problem is the module load fails for those cases. You cannot load
the module and use the standard ifconfig eth0 hw aa:bb:cc:dd:ee:ff
interface. The better fix might be to make sure it loads.
So change from
memcpy(netdev->dev_addr, adapter->hw.mac.addr,
netdev->addr_len);
if (!is_valid_ether_addr(netdev->dev_addr)) {
dev_err(&pdev->dev, "Invalid MAC Address\n");
ret = -EIO;
goto err_free_adapter;
}
to just printing a warning, and check the current address when a user
tries to ifconfig it up and refuse to allow the port to go active.
Alan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists