Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgb/cxgb_sge.c
Show First 20 Lines • Show All 384 Lines • ▼ Show 20 Lines | if (reclaim > 0) { | ||||
q->in_use -= reclaim; | q->in_use -= reclaim; | ||||
} | } | ||||
if (isset(&qs->txq_stopped, TXQ_ETH)) | if (isset(&qs->txq_stopped, TXQ_ETH)) | ||||
clrbit(&qs->txq_stopped, TXQ_ETH); | clrbit(&qs->txq_stopped, TXQ_ETH); | ||||
return (reclaim); | return (reclaim); | ||||
} | } | ||||
#ifdef NETDUMP | #ifdef DEBUGNET | ||||
int | int | ||||
cxgb_netdump_poll_tx(struct sge_qset *qs) | cxgb_debugnet_poll_tx(struct sge_qset *qs) | ||||
{ | { | ||||
return (reclaim_completed_tx(qs, TX_RECLAIM_MAX, TXQ_ETH)); | return (reclaim_completed_tx(qs, TX_RECLAIM_MAX, TXQ_ETH)); | ||||
} | } | ||||
#endif | #endif | ||||
/** | /** | ||||
* should_restart_tx - are there enough resources to restart a Tx queue? | * should_restart_tx - are there enough resources to restart a Tx queue? | ||||
▲ Show 20 Lines • Show All 1,186 Lines • ▼ Show 20 Lines | t3_encap(struct sge_qset *qs, struct mbuf **m) | ||||
wr_lo = htonl(V_WR_TID(txq->token)); | wr_lo = htonl(V_WR_TID(txq->token)); | ||||
write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, | write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, | ||||
sgl_flits, wr_hi, wr_lo); | sgl_flits, wr_hi, wr_lo); | ||||
check_ring_tx_db(sc, txq, 0); | check_ring_tx_db(sc, txq, 0); | ||||
return (0); | return (0); | ||||
} | } | ||||
#ifdef NETDUMP | #ifdef DEBUGNET | ||||
int | int | ||||
cxgb_netdump_encap(struct sge_qset *qs, struct mbuf **m) | cxgb_debugnet_encap(struct sge_qset *qs, struct mbuf **m) | ||||
{ | { | ||||
int error; | int error; | ||||
error = t3_encap(qs, m); | error = t3_encap(qs, m); | ||||
if (error == 0) | if (error == 0) | ||||
check_ring_tx_db(qs->port->adapter, &qs->txq[TXQ_ETH], 1); | check_ring_tx_db(qs->port->adapter, &qs->txq[TXQ_ETH], 1); | ||||
else if (*m != NULL) { | else if (*m != NULL) { | ||||
m_freem(*m); | m_freem(*m); | ||||
▲ Show 20 Lines • Show All 1,426 Lines • ▼ Show 20 Lines | if (cxgb_debug && (rq->next_holdoff != last_holdoff)) { | ||||
last_holdoff = rq->next_holdoff; | last_holdoff = rq->next_holdoff; | ||||
} | } | ||||
t3_write_reg(adap, A_SG_GTS, V_RSPQ(rq->cntxt_id) | | t3_write_reg(adap, A_SG_GTS, V_RSPQ(rq->cntxt_id) | | ||||
V_NEWTIMER(rq->next_holdoff) | V_NEWINDEX(rq->cidx)); | V_NEWTIMER(rq->next_holdoff) | V_NEWINDEX(rq->cidx)); | ||||
return (work); | return (work); | ||||
} | } | ||||
#ifdef NETDUMP | #ifdef DEBUGNET | ||||
int | int | ||||
cxgb_netdump_poll_rx(adapter_t *adap, struct sge_qset *qs) | cxgb_debugnet_poll_rx(adapter_t *adap, struct sge_qset *qs) | ||||
{ | { | ||||
return (process_responses_gts(adap, &qs->rspq)); | return (process_responses_gts(adap, &qs->rspq)); | ||||
} | } | ||||
#endif | #endif | ||||
/* | /* | ||||
* Interrupt handler for legacy INTx interrupts for T3B-based cards. | * Interrupt handler for legacy INTx interrupts for T3B-based cards. | ||||
▲ Show 20 Lines • Show All 688 Lines • Show Last 20 Lines |