Changeset 38b81b5 in rtems


Ignore:
Timestamp:
Dec 13, 1999, 4:25:03 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
9537e5e
Parents:
4bdebdfe
Message:

Patch from Emmanuel Raguet <raguet@…> to correct some problems
in the dec21140 driver. Comments follow:

I have tried to use bootp with the dec21140 driver
and I had problems. I have found them

  • Ethernet address must be known in Attach step (read from the board)
  • Endian problem for Ethernet address storage.

Now it is solved and I can use bootp to obtain
the network configuration of the target.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/network/dec21140.c

    r4bdebdfe r38b81b5  
    364364   */
    365365  st_le32( (tbase+memCSR0), CSR0_MODE); 
    366 
    367   /*  csr12_val = ld_le32( (tbase+memCSR8) );*/
    368 
    369   for (i=0; i<32; i++){
    370     rombuf.s[i] = eeget16(tbase+memCSR9, i);
    371   }
    372   memcpy (sc->arpcom.ac_enaddr, rombuf.c+20, ETHER_ADDR_LEN);
    373366
    374367#ifdef DEC_DEBUG
     
    494487  st_le32( (tbase+memCSR7), IT_SETUP);
    495488  st_le32( (unsigned int*)(tbase+memCSR6), CSR6_INIT | CSR6_TXRX);
    496  
    497489}
    498490
     
    887879        }
    888880        else {
    889           memset (sc->arpcom.ac_enaddr, 0x08,ETHER_ADDR_LEN);
     881          union {char c[64]; unsigned short s[32];} rombuf;
     882          int i;
     883
     884          for (i=0; i<32; i++){
     885            rombuf.s[i] = eeget16(sc->base+memCSR9, i);
     886          }
     887#if defined(__i386)
     888          for (i=0 ; i<(ETHER_ADDR_LEN/2); i++){
     889            sc->arpcom.ac_enaddr[2*i]   = rombuf.c[20+2*i+1];
     890            sc->arpcom.ac_enaddr[2*i+1] = rombuf.c[20+2*i];
     891          } 
     892#endif
     893#if defined(__PPC)
     894          memcpy (sc->arpcom.ac_enaddr, rombuf.c+20, ETHER_ADDR_LEN);
     895#endif
    890896        }
     897
    891898        if (config->mtu)
    892899                mtu = config->mtu;
Note: See TracChangeset for help on using the changeset viewer.