OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [tests/] [ethmac/] [board/] [ethmac-ping.c] - Diff between revs 415 and 425

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 415 Rev 425
Line 98... Line 98...
*/
*/
#define TX_TIMEOUT      (2*HZ)
#define TX_TIMEOUT      (2*HZ)
 
 
/* Buffer number (must be 2^n)
/* Buffer number (must be 2^n)
*/
*/
#define OETH_RXBD_NUM           32
#define OETH_RXBD_NUM           64
#define OETH_TXBD_NUM           32
#define OETH_TXBD_NUM           64
#define OETH_RXBD_NUM_MASK      (OETH_RXBD_NUM-1)
#define OETH_RXBD_NUM_MASK      (OETH_RXBD_NUM-1)
#define OETH_TXBD_NUM_MASK      (OETH_TXBD_NUM-1)
#define OETH_TXBD_NUM_MASK      (OETH_TXBD_NUM-1)
 
 
/* Buffer size
/* Buffer size
*/
*/
Line 1788... Line 1788...
        if (rx_bdp[i].len_status & OETH_RX_BD_LATECOL) {
        if (rx_bdp[i].len_status & OETH_RX_BD_LATECOL) {
          bad = 1;
          bad = 1;
        }
        }
 
 
        if (bad) {
        if (bad) {
 
          printf("RXE: 0x%x\n",rx_bdp[i].len_status & OETH_RX_BD_STATS);
          rx_bdp[i].len_status &= ~OETH_RX_BD_STATS;
          rx_bdp[i].len_status &= ~OETH_RX_BD_STATS;
          rx_bdp[i].len_status |= OETH_RX_BD_EMPTY;
          rx_bdp[i].len_status |= OETH_RX_BD_EMPTY;
 
          bad = 0;
          continue;
          continue;
        }
        }
        else {
        else {
 
 
          /* Process the incoming frame.
          /* Process the incoming frame.
Line 1842... Line 1843...
          //oeth_print_packet(tx_bd[i].addr, (tx_bd[i].len_status >> 16));
          //oeth_print_packet(tx_bd[i].addr, (tx_bd[i].len_status >> 16));
          /* Single threaded so no chance we have detected a buffer that has had its IRQ bit set but not its BD_READ flag. Maybe this won't work in linux */
          /* Single threaded so no chance we have detected a buffer that has had its IRQ bit set but not its BD_READ flag. Maybe this won't work in linux */
          tx_bd[i].len_status &= ~OETH_TX_BD_IRQ;
          tx_bd[i].len_status &= ~OETH_TX_BD_IRQ;
 
 
          /* Probably good to check for TX errors here */
          /* Probably good to check for TX errors here */
 
          // Check if either carrier sense lost or colission indicated
 
          if (tx_bd[i].len_status & OETH_TX_BD_STATS)
 
            printf("TXER: 0x%x\n",(tx_bd[i].len_status & OETH_TX_BD_STATS));
 
 
          if (print_packet_contents)
          if (print_packet_contents)
            printf("T%d",i);
            printf("T%d",i);
        }
        }
    }
    }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.