FreeBSD/sys/dev/vx/if_vx.c
/*
 * XXX: The 3c509 card can get in a mode where both the fifo status bit
 *      FIFOS_RX_OVERRUN and the status bit ERR_INCOMPLETE are set
 *      We detect this situation and we reset the adapter.
 *      It happens at times when there is a lot of broadcast traffic
 *      on the cable (once in a blue moon).
 */
The 3c509 card can get in a mode where both the fifo status bit
FIFOS_RX_OVERRUN and the status bit ERR_INCOMPLETE are set
We detect this situation and we reset the adapter.
It happens at times when there is a lot of broadcast traffic
on the cable (once in a blue moon).
The 3c509 card can get in a mode where both the fifo status bit FIFOS_RX_OVERRUN and the status bit ERR_INCOMPLETE are set We detect this situation and we reset the adapter . It happens at times when there is a lot of broadcast traffic on the cable ( once in a blue moon ) .
static int
vx_status(struct vx_softc *sc)
{
	struct ifnet *ifp;
	int fifost;
	VX_LOCK_ASSERT(sc);
	GO_WINDOW(4);
	fifost = CSR_READ_2(sc, VX_W4_FIFO_DIAG);
	GO_WINDOW(1);
	ifp = sc->vx_ifp;
	if (fifost & FIFOS_RX_UNDERRUN) {
		if (ifp->if_flags & IFF_DEBUG)
			if_printf(ifp, "RX underrun\n");
		vx_reset(sc);
		return 0;
	}
	if (fifost & FIFOS_RX_STATUS_OVERRUN) {
		if (ifp->if_flags & IFF_DEBUG)
			if_printf(ifp, "RX Status overrun\n");
		return 1;
	}
	if (fifost & FIFOS_RX_OVERRUN) {
		if (ifp->if_flags & IFF_DEBUG)
			if_printf(ifp, "RX overrun\n");
		return 1;
	}
	if (fifost & FIFOS_TX_OVERRUN) {
		if (ifp->if_flags & IFF_DEBUG)
			if_printf(ifp, "TX overrun\n");
		vx_reset(sc);
		return 0;
	}
	return 0;
}
static int vx_status ( struct vx_softc * sc ) { struct ifnet * ifp ; int fifost ; VX_LOCK_ASSERT ( sc ) ; GO_WINDOW ( 4 ) ; fifost = CSR_READ_2 ( sc , VX_W4_FIFO_DIAG ) ; GO_WINDOW ( 1 ) ; ifp = sc -> vx_ifp ; if ( fifost & FIFOS_RX_UNDERRUN ) { if ( ifp -> if_flags & IFF_DEBUG ) if_printf ( ifp , " \n " ) ; vx_reset ( sc ) ; return 0 ; } if ( fifost & FIFOS_RX_STATUS_OVERRUN ) { if ( ifp -> if_flags & IFF_DEBUG ) if_printf ( ifp , " \n " ) ; return 1 ; } if ( fifost & FIFOS_RX_OVERRUN ) { if ( ifp -> if_flags & IFF_DEBUG ) if_printf ( ifp , " \n " ) ; return 1 ; } if ( fifost & FIFOS_TX_OVERRUN ) { if ( ifp -> if_flags & IFF_DEBUG ) if_printf ( ifp , " \n " ) ; vx_reset ( sc ) ; return 0 ; } return 0 ; }
XXX: The 3c509 card can get in a mode where both the fifo status bit
      FIFOS_RX_OVERRUN and the status bit ERR_INCOMPLETE are set
      We detect this situation and we reset the adapter.
XXX : The 3c509 card can get in a mode where both the fifo status bit FIFOS_RX_OVERRUN and the status bit ERR_INCOMPLETE are set We detect this situation and we reset the adapter .
/*
         * Check the FIFO status and act accordingly
         */