Skip to contentSkip to conversation

DM9000 driver

PATCH New stefano babic 3 participants 4 messages Aug 21, 2007 – Aug 29, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DM9000 driver

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.

Signature · 12 lines
=====================================================================
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 at denx.de
=====================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DM9000-EEPROM.diff
Type: text/x-patch
Size: 1317 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070821/42f959b3/attachment.bin 
#1 lore raw

PATCH 1/1 DM9000 driver

Quoted 8 lines · stefano babic

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.

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.

Quoted 30 lines

------------------------------------------------------------------------

Quoted 1 line

From 432445542c9ebc11cc9d4ed4200de3671a2cf029 Mon Sep 17 00:00:00 2001

From: Stefano Babic <[email protected]>
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(-)
drivers/dm9000x.c +2 -2
index e0d531b..78acb09 100644
@@ -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_multicast_ether_addr(bd->bi_enetaddr)) {
+	if (!is_zero_ether_addr(bd->bi_enetaddr) &&
+	    !is_mutlicast_ether_addr(bd->bi_enetaddr)) {
 		/* try reading from environment */
 		u8 i;
 		char *s, *e;

drivers/dm9000x.c read_srom_word(int offset) · line 546

Quoted 6 lines
drivers/dm9000x.c +1 -1
@@ -542,7 +542,7 @@ read_srom_word(int offset)
 {
 	DM9000_iow(DM9000_EPAR, offset);
 	DM9000_iow(DM9000_EPCR, 0x4);
-	udelay(8000);
+	udelay(200);
 

Does the 200us delay not work, or are you just doing this to match the Linux driver?

#2 lore raw

PATCH 1/1 DM9000 driver

Quoted 2 lines · Ben Warren

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.

Signature · 9 lines
=====================================================================
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 at denx.de
=====================================================================
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-The-logic-to-check-if-there-is-a-correct-MAC-address-in-the-DM9000-EEPROM.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20070821/94a30b7a/attachment.txt 
#3 lore raw

PATCH 1/1 DM9000 driver

Quoted 9 lines · In message <[email protected]> you wrote:

This is a multi-part message in MIME format. --------------080308050605080402030006
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Quoted 2 lines · Ben Warren

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.

Quoted 8 lines

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.

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Don't you know anything? I should have thought anyone knows that  who
knows anything about anything...      - Terry Pratchett, _Soul Music_