netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND] [PATCH] atl1: relax eeprom mac address error check
@ 2008-06-12 22:04 Jay Cliburn
  2008-06-18  3:26 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Jay Cliburn @ 2008-06-12 22:04 UTC (permalink / raw)
  To: jeff; +Cc: advantis, csnook, netdev, linux-kernel

From: Radu Cristescu <advantis@gmx.net>

The atl1 driver tries to determine the MAC address thusly:

	- If an EEPROM exists, read the MAC address from EEPROM and
	  validate it.
	- If an EEPROM doesn't exist, try to read a MAC address from
	  SPI flash.
	- If that fails, try to read a MAC address directly from the
	  MAC Station Address register.
	- If that fails, assign a random MAC address provided by the
	  kernel.

We now have a report of a system fitted with an EEPROM containing all
zeros where we expect the MAC address to be, and we currently handle
this as an error condition.  Turns out, on this system the BIOS writes
a valid MAC address to the NIC's MAC Station Address register, but we
never try to read it because we return an error when we find the all-
zeros address in EEPROM.

This patch relaxes the error check and continues looking for a MAC
address even if it finds an illegal one in EEPROM.

Signed-off-by: Radu Cristescu <advantis@gmx.net>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
 drivers/net/atlx/atl1.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 99e0b4c..3c798ae 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -471,7 +471,6 @@ static int atl1_get_permanent_address(struct
atl1_hw *hw) memcpy(hw->perm_mac_addr, eth_addr, ETH_ALEN);
 			return 0;
 		}
-		return 1;
 	}
 
 	/* see if SPI FLAGS exist ? */
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESEND] [PATCH] atl1: relax eeprom mac address error check
  2008-06-12 22:04 [RESEND] [PATCH] atl1: relax eeprom mac address error check Jay Cliburn
@ 2008-06-18  3:26 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-06-18  3:26 UTC (permalink / raw)
  To: Jay Cliburn; +Cc: advantis, csnook, netdev, linux-kernel

Jay Cliburn wrote:
> From: Radu Cristescu <advantis@gmx.net>
> 
> The atl1 driver tries to determine the MAC address thusly:
> 
> 	- If an EEPROM exists, read the MAC address from EEPROM and
> 	  validate it.
> 	- If an EEPROM doesn't exist, try to read a MAC address from
> 	  SPI flash.
> 	- If that fails, try to read a MAC address directly from the
> 	  MAC Station Address register.
> 	- If that fails, assign a random MAC address provided by the
> 	  kernel.
> 
> We now have a report of a system fitted with an EEPROM containing all
> zeros where we expect the MAC address to be, and we currently handle
> this as an error condition.  Turns out, on this system the BIOS writes
> a valid MAC address to the NIC's MAC Station Address register, but we
> never try to read it because we return an error when we find the all-
> zeros address in EEPROM.
> 
> This patch relaxes the error check and continues looking for a MAC
> address even if it finds an illegal one in EEPROM.
> 
> Signed-off-by: Radu Cristescu <advantis@gmx.net>
> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
> ---
>  drivers/net/atlx/atl1.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-18  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12 22:04 [RESEND] [PATCH] atl1: relax eeprom mac address error check Jay Cliburn
2008-06-18  3:26 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).