1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-19 15:33:56 +00:00

Do not call nge_tick() if we get an PHY interrupt, nge_tick() calls

mii_tick() which should only be called once per second.

Our current MII/PHY state-engine is not able to deal with PHY
interrupts as far as I can tell, and most net drivers don't seem
to use the link/status change call-back mechanism.  It seems that
MII/PHY was orphaned before it grew up.
This commit is contained in:
Poul-Henning Kamp 2002-05-04 11:15:33 +00:00
parent 37c0fba7c4
commit d9fc2b816e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96028

View File

@ -1434,10 +1434,9 @@ static void nge_tick(xsc)
sc->nge_unit);
if (ifp->if_snd.ifq_head != NULL)
nge_start(ifp);
} else
sc->nge_stat_ch = timeout(nge_tick, sc, hz);
}
}
sc->nge_stat_ch = timeout(nge_tick, sc, hz);
splx(s);
@ -1493,10 +1492,17 @@ static void nge_intr(arg)
nge_init(sc);
}
#if 0
/*
* XXX: nge_tick() is not ready to be called this way
* it screws up the aneg timeout because mii_tick() is
* only to be called once per second.
*/
if (status & NGE_IMR_PHY_INTR) {
sc->nge_link = 0;
nge_tick(sc);
}
#endif
}
/* Re-enable interrupts. */
@ -1764,6 +1770,8 @@ static void nge_init(xsc)
NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX);
}
nge_tick(sc);
/*
* Enable the delivery of PHY interrupts based on
* link/speed/duplex status changes. Also enable the