Changeset 1402d56a in rtems


Ignore:
Timestamp:
05/21/04 15:18:14 (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
4dbbcb7
Parents:
e649222
Message:

2004-05-21 Till Strauman <strauman@…>

  • PR/625/networking
  • libchip/network/dec21140.c, ... : Prevent name clashes by making 'ld_le32()' etc. static inlines. Let dec21140 attach routine return an error rather than panic if no chip is detected (thus allowing for probing).
  • libchip/network/elnk.c: Let elnk bail out if autoneg never completes instead of looping forever. Avoid divide by zero (crashed my PC).
  • libchip/network/if_fxp.c: Enable more fxp chip variants but warn that they are UNTESTED.
Location:
c/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/ChangeLog

    re649222 r1402d56a  
     12004-05-21  Till Strauman <strauman@slac.stanford.edu>
     2
     3        * PR/625/networking
     4        * libchip/network/dec21140.c, ... : Prevent name clashes by making
     5        'ld_le32()' etc.  static inlines.  Let dec21140 attach routine return
     6        an error rather than panic if no chip is detected (thus allowing
     7        for probing).
     8        * libchip/network/elnk.c: Let elnk bail out if autoneg never completes
     9        instead of looping forever.  Avoid divide by zero (crashed my PC).
     10        * libchip/network/if_fxp.c: Enable more fxp chip variants but warn that
     11        they are UNTESTED.
     12
    1132004-05-10      Ralf Corsepius <ralf_corsepius@rtems.org>
    214
  • c/src/libchip/network/dec21140.c

    re649222 r1402d56a  
    245245#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
    246246
    247 inline void st_le32(volatile uint32_t   *addr, uint32_t   value)
     247static inline void st_le32(volatile uint32_t   *addr, uint32_t   value)
    248248{
    249249  *(addr)=value ;
    250250}
    251251
    252 inline uint32_t   ld_le32(volatile uint32_t   *addr)
     252static inline uint32_t   ld_le32(volatile uint32_t   *addr)
    253253{
    254254  return(*addr);
     
    10631063         printk( "DEC/Intel 21143 PCI network card found\n" );
    10641064      else
    1065          rtems_panic("DEC PCI network card not found !!\n");
     1065      {
     1066         printk("No DEC/Intel 21140/3 PCI network card found !!\n");
     1067         return 0;
     1068      }
    10661069   }
    10671070#endif
  • c/src/libchip/network/elnk.c

    re649222 r1402d56a  
    206206#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
    207207
    208 inline void st_le32(volatile uint32_t   *addr, uint32_t   value)
     208static inline void st_le32(volatile uint32_t   *addr, uint32_t   value)
    209209{
    210210  *(addr)=value ;
    211211}
    212212
    213 inline uint32_t   ld_le32(volatile uint32_t   *addr)
     213static inline uint32_t   ld_le32(volatile uint32_t   *addr)
    214214{
    215215  return(*addr);
     
    26712671         xl_miibus_writereg(sc, 0x18, MII_BMCR, BMCR_STARTNEG | BMCR_AUTOEN );
    26722672
    2673          while( ((sr = xl_miibus_readreg(sc, 0x18, MII_BMSR)) & BMSR_ACOMP) == 0 );
     2673         for (i=0; ((sr = xl_miibus_readreg(sc, 0x18, MII_BMSR)) & BMSR_ACOMP) == 0 && i < 20; i++)
     2674            DELAY(10000);
    26742675      }
    26752676
     
    29993000             sc->xl_stats.device_interrupts,
    30003001             sc->xl_stats.txcomplete_ints,
    3001              (totalLengths / numLengths) );
     3002             numLengths ? (totalLengths / numLengths) : -1 );
    30023003   }
    30033004
     
    31213122      int pbus,pdev,pfun, vid, did, tindex;
    31223123};
    3123 
    3124 
    31253124
    31263125/*
  • c/src/libchip/network/if_fxp.c

    re649222 r1402d56a  
    183183        u_int16_t       devid;
    184184        char            *name;
     185        int                     warn;
    185186};
     187
     188#define UNTESTED 1
    186189
    187190/*
     
    192195 */
    193196static struct fxp_ident fxp_ident_table[] = {
    194 #ifdef NOTUSED
    195         /* currently untested */
    196     { 0x1229,           "Intel Pro 10/100B/100+ Ethernet" },
    197     { 0x2449,           "Intel Pro/100 Ethernet" },
    198 #endif
    199     { 0x1209,           "Intel Embedded 10/100 Ethernet" },
    200 #ifdef NOTUSED
    201         /* currently untested */
    202     { 0x1029,           "Intel Pro/100 Ethernet" },
    203 #endif
    204     { 0x1030,           "Intel Pro/100 Ethernet" },
    205 #ifdef NOTUSED
    206         /* currently untested */
    207     { 0x1031,           "Intel Pro/100 Ethernet" },
    208     { 0x1032,           "Intel Pro/100 Ethernet" },
    209     { 0x1033,           "Intel Pro/100 Ethernet" },
    210     { 0x1034,           "Intel Pro/100 Ethernet" },
    211     { 0x1035,           "Intel Pro/100 Ethernet" },
    212     { 0x1036,           "Intel Pro/100 Ethernet" },
    213     { 0x1037,           "Intel Pro/100 Ethernet" },
    214     { 0x1038,           "Intel Pro/100 Ethernet" },
    215 #endif
     197    { 0x1229,           "Intel Pro 10/100B/100+ Ethernet", UNTESTED },
     198    { 0x2449,           "Intel Pro/100 Ethernet", UNTESTED },
     199    { 0x1209,           "Intel Embedded 10/100 Ethernet", 0 },
     200    { 0x1029,           "Intel Pro/100 Ethernet", UNTESTED },
     201    { 0x1030,           "Intel Pro/100 Ethernet", 0 },
     202    { 0x1031,           "Intel Pro/100 Ethernet", UNTESTED },
     203    { 0x1032,           "Intel Pro/100 Ethernet", UNTESTED },
     204    { 0x1033,           "Intel Pro/100 Ethernet", UNTESTED },
     205    { 0x1034,           "Intel Pro/100 Ethernet", UNTESTED },
     206    { 0x1035,           "Intel Pro/100 Ethernet", UNTESTED },
     207    { 0x1036,           "Intel Pro/100 Ethernet", UNTESTED },
     208    { 0x1037,           "Intel Pro/100 Ethernet", UNTESTED },
     209    { 0x1038,           "Intel Pro/100 Ethernet", UNTESTED },
    216210    { 0,                NULL },
    217211};
     
    468462      for (j=0; fxp_ident_table[j].devid; j++ ) {
    469463                i = pcib_find_by_devid( 0x8086,
    470                                                                 fxp_ident_table[j].devid,
    471                                                                 unitNumber-1,
    472                                                         &(sc->pci_signature));
     464                        fxp_ident_table[j].devid,
     465                        unitNumber-1,
     466                        &(sc->pci_signature));
    473467                DBGLVL_PRINTK(2,"fxp_attach: find_devid returned %d "
    474468                      "and pci signature 0x%x\n",
    475469                      i,sc->pci_signature);
    476         if (PCIB_ERR_SUCCESS == i)
    477                         break;
     470                if (PCIB_ERR_SUCCESS == i) {
     471                  if ( UNTESTED == fxp_ident_table[j].warn ) {
     472                        device_printf(dev
     473"WARNING: this chip version has NOT been reported to work under RTEMS yet.\n");
     474                        device_printf(dev,
     475"         If it works OK, report it as tested in 'c/src/libchip/network/if_fxp.c'\n");
     476                        }
     477                        break;
     478                }
    478479          }
    479480        }
Note: See TracChangeset for help on using the changeset viewer.