Changeset 640f1cb in rtems


Ignore:
Timestamp:
05/21/04 15:09:43 (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
922db65
Parents:
e2f50f9d
Message:

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

  • PR/625/networking
  • 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).
  • network/elnk.c: Let elnk bail out if autoneg never completes instead of looping forever. Avoid divide by zero (crashed my PC).
  • network/if_fxp.c: Enable more fxp chip variants but warn that they are UNTESTED.
Location:
c/src/libchip
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/ChangeLog

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

    re2f50f9d r640f1cb  
    244244#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
    245245
    246 inline void st_le32(volatile unsigned32 *addr, unsigned32 value)
     246static inline void st_le32(volatile unsigned32 *addr, unsigned32 value)
    247247{
    248248  *(addr)=value ;
    249249}
    250250
    251 inline unsigned32 ld_le32(volatile unsigned32 *addr)
     251static inline unsigned32 ld_le32(volatile unsigned32 *addr)
    252252{
    253253  return(*addr);
     
    10621062         printk( "DEC/Intel 21143 PCI network card found\n" );
    10631063      else
    1064          rtems_panic("DEC PCI network card not found !!\n");
     1064      {
     1065         printk("No DEC/Intel 21140/3 PCI network card found !!\n");
     1066         return 0;
     1067      }
    10651068   }
    10661069#endif 
  • c/src/libchip/network/elnk.c

    re2f50f9d r640f1cb  
    205205#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
    206206
    207 inline void st_le32(volatile unsigned32 *addr, unsigned32 value)
     207static inline void st_le32(volatile unsigned32 *addr, unsigned32 value)
    208208{
    209209  *(addr)=value ;
    210210}
    211211
    212 inline unsigned32 ld_le32(volatile unsigned32 *addr)
     212static inline unsigned32 ld_le32(volatile unsigned32 *addr)
    213213{
    214214  return(*addr);
     
    26702670         xl_miibus_writereg(sc, 0x18, MII_BMCR, BMCR_STARTNEG | BMCR_AUTOEN );
    26712671
    2672          while( ((sr = xl_miibus_readreg(sc, 0x18, MII_BMSR)) & BMSR_ACOMP) == 0 );
     2672
     2673         for (i=0; ((sr = xl_miibus_readreg(sc, 0x18, MII_BMSR)) & BMSR_ACOMP) == 0 && i < 20; i++)
     2674            DELAY(10000);
    26732675      }
    26742676
     
    29983000             sc->xl_stats.device_interrupts,
    29993001             sc->xl_stats.txcomplete_ints,
    3000              (totalLengths / numLengths) );
     3002             numLengths ? (totalLengths / numLengths) : -1 );
    30013003   }
    30023004
     
    31203122      int pbus,pdev,pfun, vid, did, tindex;
    31213123};
    3122 
    3123 
    31243124
    31253125/*
  • c/src/libchip/network/if_fxp.c

    re2f50f9d r640f1cb  
    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};
     
    474468                      "and pci signature 0x%x\n",
    475469                      i,sc->pci_signature);
    476         if (PCIB_ERR_SUCCESS == i)
     470        if (PCIB_ERR_SUCCESS == i) {
     471                        if ( UNTESTED == fxp_ident_table[j].warn ) {
     472                                device_printf(dev,"WARNING: this chip version has NOT been reported to work under RTEMS yet.\n");
     473                                device_printf(dev,"         If it works OK, report it as tested in 'c/src/libchip/network/if_fxp.c'\n");
     474                        }
    477475                        break;
     476                }
    478477          }                     
    479478        }
Note: See TracChangeset for help on using the changeset viewer.