* [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC @ 2012-05-01 22:14 Darren Hart 2012-05-01 22:14 ` [PATCH 1/1] " Darren Hart 2012-05-03 22:29 ` [PATCH 0/1][linux-yocto-3.2] " Bruce Ashfield 0 siblings, 2 replies; 5+ messages in thread From: Darren Hart @ 2012-05-01 22:14 UTC (permalink / raw) To: Yocto Project, Bruce Ashfield, Tom Zanussi This somehow missed the 3.0 to 3.2 update. It is required for networking on the sys940x BSP. Please apply to standard/base and derived branches. The following changes since commit 900717638fab9d2b25be35f3612ccfd95ceb31d1: Merge branch 'yocto/standard/base' into standard/base (2012-03-16 10:43:42 -0400) are available in the git repository at: git://git.infradead.org/users/dvhart/linux-yocto-3.2.git dvhart/standard/pch_gbe http://git.infradead.org/users/dvhart/linux-yocto-3.2.git/shortlog/refs/heads/dvhart/standard/pch_gbe Darren Hart (1): pch_gbe: Do not abort probe on bad MAC .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) -- 1.7.7.6 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] pch_gbe: Do not abort probe on bad MAC 2012-05-01 22:14 [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC Darren Hart @ 2012-05-01 22:14 ` Darren Hart 2012-05-03 22:29 ` [PATCH 0/1][linux-yocto-3.2] " Bruce Ashfield 1 sibling, 0 replies; 5+ messages in thread From: Darren Hart @ 2012-05-01 22:14 UTC (permalink / raw) To: Yocto Project, Bruce Ashfield, Tom Zanussi commit: 2b53d07891630dead46d65c8f896955fd3ae0302 (linux-stable) If the MAC is invalid or not implemented, do not abort the probe. Issue a warning and prevent bringing the interface up until a MAC is set manually (via ifconfig $IFACE hw ether $MAC). Tested on two platforms, one with a valid MAC, the other without a MAC. The real MAC is used if present, the interface fails to come up until the MAC is set on the other. They successfully get an IP over DHCP and pass a simple ping and login over ssh test. This is meant to allow the Inforce SYS940X development board: http://www.inforcecomputing.com/SYS940X_ECX.html (and others suffering from a missing MAC) to work with the mainline kernel. Without this patch, the probe will fail and the interface will not be created, preventing the user from configuring the MAC manually. This does not make any attempt to address a missing or invalid MAC for the pch_phub driver. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Arjan van de Ven <arjan@linux.intel.com> CC: Alan Cox <alan@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: "David S. Miller" <davem@davemloft.net> CC: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Jon Mason <jdmason@kudzu.us> CC: netdev@vger.kernel.org CC: Mark Brown <broonie@opensource.wolfsonmicro.com> CC: David Laight <David.Laight@ACULAB.COM> CC: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net> --- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 48406ca..43c7b25 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -1745,6 +1745,12 @@ int pch_gbe_up(struct pch_gbe_adapter *adapter) struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring; int err; + /* Ensure we have a valid MAC */ + if (!is_valid_ether_addr(adapter->hw.mac.addr)) { + pr_err("Error: Invalid MAC address\n"); + return -EINVAL; + } + /* hardware has been reset, we need to reload some things */ pch_gbe_set_multi(netdev); @@ -2467,9 +2473,14 @@ static int pch_gbe_probe(struct pci_dev *pdev, 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; + /* + * If the MAC is invalid (or just missing), display a warning + * but do not abort setting up the device. pch_gbe_up will + * prevent the interface from being brought up until a valid MAC + * is set. + */ + dev_err(&pdev->dev, "Invalid MAC address, " + "interface disabled.\n"); } setup_timer(&adapter->watchdog_timer, pch_gbe_watchdog, (unsigned long)adapter); -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC 2012-05-01 22:14 [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC Darren Hart 2012-05-01 22:14 ` [PATCH 1/1] " Darren Hart @ 2012-05-03 22:29 ` Bruce Ashfield 2012-05-04 0:10 ` Darren Hart 1 sibling, 1 reply; 5+ messages in thread From: Bruce Ashfield @ 2012-05-03 22:29 UTC (permalink / raw) To: Darren Hart; +Cc: Yocto Project On 12-05-01 06:14 PM, Darren Hart wrote: > This somehow missed the 3.0 to 3.2 update. It is required for networking > on the sys940x BSP. Please apply to standard/base and derived branches. The somehow .. is that I thought this made 3.2, and it didn't. This is merged here, and when I get back to a decent internet connection. It'll appear on the servers. Bruce > > The following changes since commit 900717638fab9d2b25be35f3612ccfd95ceb31d1: > > Merge branch 'yocto/standard/base' into standard/base (2012-03-16 10:43:42 -0400) > > are available in the git repository at: > > git://git.infradead.org/users/dvhart/linux-yocto-3.2.git dvhart/standard/pch_gbe > http://git.infradead.org/users/dvhart/linux-yocto-3.2.git/shortlog/refs/heads/dvhart/standard/pch_gbe > > Darren Hart (1): > pch_gbe: Do not abort probe on bad MAC > > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 ++++++++++++++--- > 1 files changed, 14 insertions(+), 3 deletions(-) > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC 2012-05-03 22:29 ` [PATCH 0/1][linux-yocto-3.2] " Bruce Ashfield @ 2012-05-04 0:10 ` Darren Hart 2012-05-07 13:01 ` Bruce Ashfield 0 siblings, 1 reply; 5+ messages in thread From: Darren Hart @ 2012-05-04 0:10 UTC (permalink / raw) To: Bruce Ashfield; +Cc: Yocto Project On 05/03/2012 03:29 PM, Bruce Ashfield wrote: > On 12-05-01 06:14 PM, Darren Hart wrote: >> This somehow missed the 3.0 to 3.2 update. It is required for networking >> on the sys940x BSP. Please apply to standard/base and derived branches. > > The somehow .. is that I thought this made 3.2, and it didn't. This is > merged > here, and when I get back to a decent internet connection. It'll appear > on the servers. > It's been proposed to stable since, so it will make it eventually. > Bruce > >> >> The following changes since commit 900717638fab9d2b25be35f3612ccfd95ceb31d1: >> >> Merge branch 'yocto/standard/base' into standard/base (2012-03-16 10:43:42 -0400) >> >> are available in the git repository at: >> >> git://git.infradead.org/users/dvhart/linux-yocto-3.2.git dvhart/standard/pch_gbe >> http://git.infradead.org/users/dvhart/linux-yocto-3.2.git/shortlog/refs/heads/dvhart/standard/pch_gbe >> >> Darren Hart (1): >> pch_gbe: Do not abort probe on bad MAC >> >> .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 ++++++++++++++--- >> 1 files changed, 14 insertions(+), 3 deletions(-) >> > -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC 2012-05-04 0:10 ` Darren Hart @ 2012-05-07 13:01 ` Bruce Ashfield 0 siblings, 0 replies; 5+ messages in thread From: Bruce Ashfield @ 2012-05-07 13:01 UTC (permalink / raw) To: Darren Hart; +Cc: Yocto Project On 12-05-03 08:10 PM, Darren Hart wrote: > > > On 05/03/2012 03:29 PM, Bruce Ashfield wrote: >> On 12-05-01 06:14 PM, Darren Hart wrote: >>> This somehow missed the 3.0 to 3.2 update. It is required for networking >>> on the sys940x BSP. Please apply to standard/base and derived branches. >> >> The somehow .. is that I thought this made 3.2, and it didn't. This is >> merged >> here, and when I get back to a decent internet connection. It'll appear >> on the servers. >> > > It's been proposed to stable since, so it will make it eventually. This is merged out now. Sorry for the delay, I had a stream of other fixes and issues to deal with. update your SRCREVs accordingly, and I'll send one out for master shortly. Bruce > > >> Bruce >> >>> >>> The following changes since commit 900717638fab9d2b25be35f3612ccfd95ceb31d1: >>> >>> Merge branch 'yocto/standard/base' into standard/base (2012-03-16 10:43:42 -0400) >>> >>> are available in the git repository at: >>> >>> git://git.infradead.org/users/dvhart/linux-yocto-3.2.git dvhart/standard/pch_gbe >>> http://git.infradead.org/users/dvhart/linux-yocto-3.2.git/shortlog/refs/heads/dvhart/standard/pch_gbe >>> >>> Darren Hart (1): >>> pch_gbe: Do not abort probe on bad MAC >>> >>> .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 ++++++++++++++--- >>> 1 files changed, 14 insertions(+), 3 deletions(-) >>> >> > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-07 13:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-01 22:14 [PATCH 0/1][linux-yocto-3.2] pch_gbe: Do not abort probe on bad MAC Darren Hart 2012-05-01 22:14 ` [PATCH 1/1] " Darren Hart 2012-05-03 22:29 ` [PATCH 0/1][linux-yocto-3.2] " Bruce Ashfield 2012-05-04 0:10 ` Darren Hart 2012-05-07 13:01 ` Bruce Ashfield
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.