This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001269] New: Via Rhine Ethernet driver is reading the MACincorrectly
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Tue, 21 Jun 2011 22:51:34 +0100
- Subject: [Bug 1001269] New: Via Rhine Ethernet driver is reading the MACincorrectly
- Auto-submitted: auto-generated
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001269
Summary: Via Rhine Ethernet driver is reading the MAC
incorrectly
Product: eCos
Version: CVS
Platform: pc (i386 PC target)
OS/Version: IA32
Status: UNCONFIRMED
Severity: major
Priority: low
Component: Ethernet
AssignedTo: unassigned@bugs.ecos.sourceware.org
ReportedBy: stephen@centtech.com
CC: ecos-bugs@ecos.sourceware.org
Class: Advice Request
Created an attachment (id=1292)
--> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1292)
if_rhine.c patch
The current Via Rhine Ethernet driver was designed to access the PCI card by
way of I/O reads and writes. Early in the code the driver acquires the I/O
base and stores in the cpd->base structure. Then, the driver uses
HAL_PCI_IO_READs and HAL_PCI_IO_WRITEs macros to access the card.
However, for some unknown reason the driver reloads the MAC address using the
cpd->base variable as a memory address. This causes the driver to load random
data for the MAC. Later, REDBOOT fails because it passes a bad MAC to the DHCP
server.
The fix was to change the code to access the card via macros.
Old Code:
// Use the address from the serial EEPROM
p = cpd->base + RHINE_PAR0;
for (i = 0; i < 6; i++)
cpd->esa[i] = *p++;
New Code:
// Use the address from the serial EEPROM
for (i = 0; i < 6; i++) {
HAL_PCI_IO_READ_UINT8(cpd->base + RHINE_PAR0 + i, cpd->esa[i]);
}
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.