Count how many frames driver lost in interrupt handler. This
register is cleared on read so make sure to clear it in driver initialization phase.
This commit is contained in:
parent
5f14ee2363
commit
26b40a6592
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218833
@ -3250,7 +3250,7 @@ dc_intr(void *arg)
|
||||
{
|
||||
struct dc_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
u_int32_t status;
|
||||
u_int32_t r, status;
|
||||
int curpkts, n;
|
||||
|
||||
sc = arg;
|
||||
@ -3305,6 +3305,8 @@ dc_intr(void *arg)
|
||||
|
||||
if ((status & DC_ISR_RX_WATDOGTIMEO)
|
||||
|| (status & DC_ISR_RX_NOBUF)) {
|
||||
r = CSR_READ_4(sc, DC_FRAMESDISCARDED);
|
||||
ifp->if_ierrors += (r & 0xffff) + ((r >> 17) & 0x7ff);
|
||||
curpkts = ifp->if_ipackets;
|
||||
dc_rxeof(sc);
|
||||
if (curpkts == ifp->if_ipackets) {
|
||||
@ -3723,6 +3725,9 @@ dc_init_locked(struct dc_softc *sc)
|
||||
mii_mediachg(mii);
|
||||
dc_setcfg(sc, sc->dc_if_media);
|
||||
|
||||
/* Clear missed frames and overflow counter. */
|
||||
CSR_READ_4(sc, DC_FRAMESDISCARDED);
|
||||
|
||||
/* Don't start the ticker if this is a homePNA link. */
|
||||
if (IFM_SUBTYPE(mii->mii_media.ifm_media) == IFM_HPNA_1)
|
||||
sc->dc_link = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user