
21 Aug
2007
21 Aug
'07
3:50 p.m.
Ben Warren wrote:
Your patch is backwards (stuff to remove should be - and to add should be +), and so won't apply. The same goes for the TFTP one.
Sorry, I submit the correct ones:
The logic to check if there is a correct MAC address in the DM9000 EEPROM, added in the last patch, is wrong. Now the MAC address is always taken from the environment, even if a suitable MAC is present in the EEPROM.
Signed-off-by: Stefano Babic sbabic@denx.de
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
=====================================================================
>From 432445542c9ebc11cc9d4ed4200de3671a2cf029 Mon Sep 17 00:00:00 2001
From: Stefano Babic sbabic@denx.de
Date: Tue, 21 Aug 2007 12:46:34 +0200
Subject: [PATCH] The logic to check if there is a correct MAC address in the DM9000 EEPROM,
added in the last patch, is wrong.
Now the MAC address is always taken from the environment, even if a suitable MAC
is present in the EEPROM. Time to wait reading the EEPROM is set to 8ms
according to the linux driver
---
drivers/dm9000x.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dm9000x.c b/drivers/dm9000x.c
index 78acb09..e0d531b 100644
--- a/drivers/dm9000x.c
+++ b/drivers/dm9000x.c
@@ -303,8 +303,8 @@ eth_init(bd_t * bd)
for (i = 0; i < 6; i++)
((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
- if (!is_zero_ether_addr(bd->bi_enetaddr) &&
- !is_mutlicast_ether_addr(bd->bi_enetaddr)) {
+ if (is_zero_ether_addr(bd->bi_enetaddr) ||
+ is_multicast_ether_addr(bd->bi_enetaddr)) {
/* try reading from environment */
u8 i;
char *s, *e;
@@ -542,7 +542,7 @@ read_srom_word(int offset)
{
DM9000_iow(DM9000_EPAR, offset);
DM9000_iow(DM9000_EPCR, 0x4);
- udelay(200);
+ udelay(8000);
DM9000_iow(DM9000_EPCR, 0x0);
return (DM9000_ior(DM9000_EPDRL) + (DM9000_ior(DM9000_EPDRH) << 8));
}
--
1.4.3.4