Changeset a09f00e in rtems-libbsd


Ignore:
Timestamp:
11/20/14 06:58:17 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
14ecf75d
Parents:
b8e0c66
git-author:
Sebastian Huber <sebastian.huber@…> (11/20/14 06:58:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/21/15 14:00:20)
Message:

if_cgem: Workaround for if_inc_counter()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/dev/cadence/if_cgem.c

    rb8e0c66 ra09f00e  
    561561                        /* discard. */
    562562                        m_free(m);
     563#ifndef __rtems__
    563564                        if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
     565#else /* __rtems__ */
     566                        ifp->if_ierrors++;
     567#endif /* __rtems__ */
    564568                        continue;
    565569                }
     
    607611                m_hd = m_hd->m_next;
    608612                m->m_next = NULL;
     613#ifndef __rtems__
    609614                if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
     615#else /* __rtems__ */
     616                ifp->if_ipackets++;
     617#endif /* __rtems__ */
    610618                (*ifp->if_input)(ifp, m);
    611619        }
     
    649657                } else if ((ctl & (CGEM_TXDESC_RETRY_ERR |
    650658                                   CGEM_TXDESC_LATE_COLL)) != 0) {
     659#ifndef __rtems__
    651660                        if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1);
     661#else /* __rtems__ */
     662                        sc->ifp->if_oerrors++;
     663#endif /* __rtems__ */
    652664                } else
     665#ifndef __rtems__
    653666                        if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1);
     667#else /* __rtems__ */
     668                        sc->ifp->if_opackets++;
     669#endif /* __rtems__ */
    654670
    655671                /* If the packet spanned more than one tx descriptor,
     
    824840        n = RD4(sc, CGEM_SINGLE_COLL_FRAMES);
    825841        sc->stats.tx_single_collisn += n;
     842#ifndef __rtems__
    826843        if_inc_counter(sc->ifp, IFCOUNTER_COLLISIONS, n);
     844#else /* __rtems__ */
     845        sc->ifp->if_collisions += n;
     846#endif /* __rtems__ */
    827847        n = RD4(sc, CGEM_MULTI_COLL_FRAMES);
    828848        sc->stats.tx_multi_collisn += n;
     849#ifndef __rtems__
    829850        if_inc_counter(sc->ifp, IFCOUNTER_COLLISIONS, n);
     851#else /* __rtems__ */
     852        sc->ifp->if_collisions += n;
     853#endif /* __rtems__ */
    830854        n = RD4(sc, CGEM_EXCESSIVE_COLL_FRAMES);
    831855        sc->stats.tx_excsv_collisn += n;
     856#ifndef __rtems__
    832857        if_inc_counter(sc->ifp, IFCOUNTER_COLLISIONS, n);
     858#else /* __rtems__ */
     859        sc->ifp->if_collisions += n;
     860#endif /* __rtems__ */
    833861        n = RD4(sc, CGEM_LATE_COLL);
    834862        sc->stats.tx_late_collisn += n;
     863#ifndef __rtems__
    835864        if_inc_counter(sc->ifp, IFCOUNTER_COLLISIONS, n);
     865#else /* __rtems__ */
     866        sc->ifp->if_collisions += n;
     867#endif /* __rtems__ */
    836868
    837869        sc->stats.tx_deferred_frames += RD4(sc, CGEM_DEFERRED_TX_FRAMES);
Note: See TracChangeset for help on using the changeset viewer.