Rework store and forward configuration of TX MAC FIFO. Basically it
enables store and forward mode except for jumbo frame on Yukon Ultra.
This commit is contained in:
parent
5e863acb63
commit
7b4f47c1db
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222221
@ -3654,37 +3654,24 @@ msk_set_tx_stfwd(struct msk_if_softc *sc_if)
|
||||
|
||||
ifp = sc_if->msk_ifp;
|
||||
sc = sc_if->msk_softc;
|
||||
switch (sc->msk_hw_id) {
|
||||
case CHIP_ID_YUKON_EX:
|
||||
if (sc->msk_hw_rev == CHIP_REV_YU_EX_A0)
|
||||
goto yukon_ex_workaround;
|
||||
if (ifp->if_mtu > ETHERMTU)
|
||||
CSR_WRITE_4(sc,
|
||||
MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_JUMBO_ENA | TX_STFW_ENA);
|
||||
else
|
||||
CSR_WRITE_4(sc,
|
||||
MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_JUMBO_DIS | TX_STFW_ENA);
|
||||
break;
|
||||
default:
|
||||
yukon_ex_workaround:
|
||||
if ((sc->msk_hw_id == CHIP_ID_YUKON_EX &&
|
||||
sc->msk_hw_rev != CHIP_REV_YU_EX_A0) ||
|
||||
sc->msk_hw_id >= CHIP_ID_YUKON_SUPR) {
|
||||
CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_STFW_ENA);
|
||||
} else {
|
||||
if (ifp->if_mtu > ETHERMTU) {
|
||||
/* Set Tx GMAC FIFO Almost Empty Threshold. */
|
||||
CSR_WRITE_4(sc,
|
||||
MR_ADDR(sc_if->msk_port, TX_GMF_AE_THR),
|
||||
MSK_ECU_JUMBO_WM << 16 | MSK_ECU_AE_THR);
|
||||
/* Disable Store & Forward mode for Tx. */
|
||||
CSR_WRITE_4(sc,
|
||||
MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_JUMBO_ENA | TX_STFW_DIS);
|
||||
CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_STFW_DIS);
|
||||
} else {
|
||||
/* Enable Store & Forward mode for Tx. */
|
||||
CSR_WRITE_4(sc,
|
||||
MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_JUMBO_DIS | TX_STFW_ENA);
|
||||
CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T),
|
||||
TX_STFW_ENA);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user