From 9fd1f2e0cc27baf1a12429f3f0fd648e5b3652bb Mon Sep 17 00:00:00 2001 From: kmacy Date: Sat, 17 Mar 2007 05:23:45 +0000 Subject: move inline function above use so that -O works --- sys/dev/cxgb/cxgb_sge.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'sys') diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index dc2d168..b6d97eb 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -168,8 +168,6 @@ int cxgb_debug = 0; static void t3_free_qset(adapter_t *sc, struct sge_qset *q); static void sge_timer_cb(void *arg); static void sge_timer_reclaim(void *arg, int ncount); -static __inline void refill_rspq(adapter_t *sc, const struct sge_rspq *q, - u_int credits); static int free_tx_desc(adapter_t *sc, struct sge_txq *q, int n, struct mbuf **m_vec); /** @@ -639,6 +637,24 @@ t3_sge_deinit_sw(adapter_t *sc) taskqueue_drain(sc->tq, &sc->slow_intr_task); } +/** + * refill_rspq - replenish an SGE response queue + * @adapter: the adapter + * @q: the response queue to replenish + * @credits: how many new responses to make available + * + * Replenishes a response queue by making the supplied number of responses + * available to HW. + */ +static __inline void +refill_rspq(adapter_t *sc, const struct sge_rspq *q, u_int credits) +{ + + /* mbufs are allocated on demand when a rspq entry is processed. */ + t3_write_reg(sc, A_SG_RSPQ_CREDIT_RETURN, + V_RSPQ(q->cntxt_id) | V_CREDITS(credits)); +} + static void sge_timer_reclaim(void *arg, int ncount) @@ -1563,24 +1579,6 @@ t3_sge_start(adapter_t *sc) /** - * refill_rspq - replenish an SGE response queue - * @adapter: the adapter - * @q: the response queue to replenish - * @credits: how many new responses to make available - * - * Replenishes a response queue by making the supplied number of responses - * available to HW. - */ -static __inline void -refill_rspq(adapter_t *sc, const struct sge_rspq *q, u_int credits) -{ - - /* mbufs are allocated on demand when a rspq entry is processed. */ - t3_write_reg(sc, A_SG_RSPQ_CREDIT_RETURN, - V_RSPQ(q->cntxt_id) | V_CREDITS(credits)); -} - -/** * free_tx_desc - reclaims Tx descriptors and their buffers * @adapter: the adapter * @q: the Tx queue to reclaim descriptors from -- cgit v1.1