Changeset 7397638 in rtems


Ignore:
Timestamp:
Feb 4, 1999, 10:59:46 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
13cc89e1
Parents:
354b00bc
Message:

Works great now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/dmv177/sonic/sonic.c

    r354b00bc r7397638  
    140140 */
    141141#define SONIC_DCR \
    142    (DCR_DW32 | DCR_WAIT0 | DCR_PO0 | DCR_PO1  | DCR_RFT4 | DCR_TFT8)
     142   (DCR_DW32 | DCR_WAIT0 | DCR_PO0 | DCR_PO1  | DCR_RFT24 | DCR_TFT28)
    143143#ifndef SONIC_DCR
    144144# define SONIC_DCR (DCR_DW32 | DCR_TFT28)
     
    152152 */
    153153#define RDA_COUNT     20 /* 20 */
    154 #define TDA_COUNT     10 /* 10 */
     154#define TDA_COUNT     20 /* 10 */
    155155
    156156/*
     
    512512
    513513#if (SONIC_DEBUG & SONIC_DEBUG_ERRORS)
    514     if ( status != 0x0001 )
     514    /*
     515     *  If there is an error that was not a collision,
     516     *  then someone may want to see it.
     517     */
     518
     519    if ( (status & ~(TDA_STATUS_COLLISION_MASK|TDA_STATUS_DEF)) != 0x0001 )
    515520      printf( "ERROR: retire TDA %p (0x%08x)\n",
    516521                sc->tdaTail, sc->tdaTail->status );
     
    529534       */
    530535      rtems_unsigned16 link;
     536#if (SONIC_DEBUG & SONIC_DEBUG_ERRORS)
     537      printf("restarting sonic after error\n");
     538#endif
     539
    531540      link = *(sc->tdaTail->linkp);
    532541
     
    600609  static char padBuf[64];
    601610
     611  /* printf( "sonic_sendpacket %p\n", m ); */
    602612  /*
    603613   * Free up transmit descriptors.
     
    609619   */
    610620  if (sc->tdaActiveCount == sc->tdaCount) {
    611 #if (SONIC_DEBUG & SONIC_DEBUG_FRAGMENTS)
     621#if (SONIC_DEBUG & SONIC_DEBUG_ERRORS)
    612622    puts( "Wait for more TDAs" );
    613623#endif
     624
    614625    /*
    615626     * Clear old events.
     
    628639    while (sc->tdaActiveCount == sc->tdaCount) {
    629640      rtems_event_set events;
     641
     642#if (SONIC_DEBUG & SONIC_DEBUG_ERRORS)
     643      printf("blocking until TDAs are available\n");
     644#endif
    630645      /*
    631646       * Enable transmitter interrupts.
     
    727742  sc->tdaHead = tdp;
    728743
    729 /* XXX */
    730 /*   sonic_enable_interrupts( rp, (IMR_PINTEN | IMR_PTXEN | IMR_TXEREN) ); */
     744/* XXX not in KA9Q */
     745  sonic_enable_interrupts( rp, (IMR_PINTEN | IMR_PTXEN | IMR_TXEREN) );
    731746  sonic_write_register( rp, SONIC_REG_CR, CR_TXP );
    732747}
     
    9851000#endif
    9861001
     1002      /* printf( "ether_input %p\n", m ); */
    9871003      ether_input (ifp, eh, m);
    9881004
     
    11251141
    11261142/* XXX not used by the BSD drivers
     1143*/
    11271144    if (i & 1)
    11281145      tdp->pkt_config = TDA_CONFIG_PINT;
    1129 */
    11301146
    11311147    tdp->frag_count        = 0;
     
    14471463   */
    14481464  /* sonic_write_register( rp, SONIC_REG_IMR, 0 ); */
    1449   sonic_enable_interrupts( rp, (IMR_PRXEN | IMR_RBAEEN) );
     1465  sonic_enable_interrupts( rp,
     1466        (IMR_PINTEN | IMR_PTXEN | IMR_TXEREN) | (IMR_PRXEN | IMR_RBAEEN) );
    14501467
    14511468  sonic_write_register(rp, SONIC_REG_CR, /* CR_TXP | */ CR_RXEN);
     
    16571674#endif
    16581675
    1659 inline void sonic_write_register(
     1676void sonic_write_register(
    16601677  void       *base,
    16611678  unsigned32  regno,
     
    16731690}
    16741691
    1675 inline unsigned32 sonic_read_register(
     1692unsigned32 sonic_read_register(
    16761693  void       *base,
    16771694  unsigned32  regno
Note: See TracChangeset for help on using the changeset viewer.