public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001269] New: Via Rhine Ethernet driver is reading the MAC incorrectly
@ 2011-06-21 21:51 bugzilla-daemon
  2011-08-28  9:45 ` [Bug 1001269] " bugzilla-daemon
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: bugzilla-daemon @ 2011-06-21 21:51 UTC (permalink / raw)
  To: unassigned

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 the assignee for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread
* [Bug 1001269] New: Via Rhine Ethernet driver is reading the MAC incorrectly
@ 2011-06-21 21:52 bugzilla-daemon
  2011-08-28  9:45 ` [Bug 1001269] " bugzilla-daemon
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: bugzilla-daemon @ 2011-06-21 21:52 UTC (permalink / raw)
  To: ecos-bugs

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.


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

end of thread, other threads:[~2012-01-17 18:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 21:51 [Bug 1001269] New: Via Rhine Ethernet driver is reading the MAC incorrectly bugzilla-daemon
2011-08-28  9:45 ` [Bug 1001269] " bugzilla-daemon
2011-08-28 10:00 ` bugzilla-daemon
2011-09-06 19:24 ` bugzilla-daemon
2011-09-06 19:28 ` bugzilla-daemon
2011-10-02 14:52 ` bugzilla-daemon
2011-10-03 14:36 ` bugzilla-daemon
2012-01-17 18:49 ` bugzilla-daemon
2011-06-21 21:52 [Bug 1001269] New: " bugzilla-daemon
2011-08-28  9:45 ` [Bug 1001269] " bugzilla-daemon
2011-08-28 10:00 ` bugzilla-daemon
2011-09-06 19:24 ` bugzilla-daemon
2011-09-06 19:28 ` bugzilla-daemon
2011-10-02 14:52 ` bugzilla-daemon
2011-10-03 14:36 ` bugzilla-daemon
2012-01-17 17:49 ` bugzilla-daemon
2012-01-17 18:49 ` bugzilla-daemon

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 read-only IMAP folder(s) and NNTP newsgroup(s).