| 6335 | } |
| 6336 | |
| 6337 | void |
| 6338 | iflib_link_state_change(if_ctx_t ctx, int link_state, uint64_t baudrate) |
| 6339 | { |
| 6340 | if_t ifp = ctx->ifc_ifp; |
| 6341 | iflib_txq_t txq = ctx->ifc_txqs; |
| 6342 | |
| 6343 | if_setbaudrate(ifp, baudrate); |
| 6344 | if (baudrate >= IF_Gbps(10)) { |
| 6345 | STATE_LOCK(ctx); |
| 6346 | ctx->ifc_flags |= IFC_PREFETCH; |
| 6347 | STATE_UNLOCK(ctx); |
| 6348 | } |
| 6349 | /* If link down, disable watchdog */ |
| 6350 | if ((ctx->ifc_link_state == LINK_STATE_UP) && (link_state == LINK_STATE_DOWN)) { |
| 6351 | for (int i = 0; i < ctx->ifc_softc_ctx.isc_ntxqsets; i++, txq++) |
| 6352 | txq->ift_qstatus = IFLIB_QUEUE_IDLE; |
| 6353 | } |
| 6354 | ctx->ifc_link_state = link_state; |
| 6355 | if_link_state_change(ifp, link_state); |
| 6356 | } |
| 6357 | |
| 6358 | static int |
| 6359 | iflib_tx_credits_update(if_ctx_t ctx, iflib_txq_t txq) |
nothing calls this directly
no test coverage detected