From 3ef8ef9167a786aa91132329e9a673b222bf3fc2 Mon Sep 17 00:00:00 2001 From: np Date: Tue, 11 Jun 2013 21:20:23 +0000 Subject: [PATCH] cxgbe/tom: Allow caller to select the queue (control or data) used to send the CPL_SET_TCB_FIELD request in t4_set_tcb_field(). MFC after: 1 week --- sys/dev/cxgbe/tom/t4_cpl_io.c | 6 +++--- sys/dev/cxgbe/tom/t4_ddp.c | 8 ++++---- sys/dev/cxgbe/tom/t4_tom.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index fa45b6bb1381..8bb90f5e6d3a 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1410,13 +1410,13 @@ do_set_tcb_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) } void -t4_set_tcb_field(struct adapter *sc, struct toepcb *toep, uint16_t word, - uint64_t mask, uint64_t val) +t4_set_tcb_field(struct adapter *sc, struct toepcb *toep, int ctrl, + uint16_t word, uint64_t mask, uint64_t val) { struct wrqe *wr; struct cpl_set_tcb_field *req; - wr = alloc_wrqe(sizeof(*req), toep->ctrlq); + wr = alloc_wrqe(sizeof(*req), ctrl ? toep->ctrlq : toep->ofld_txq); if (wr == NULL) { /* XXX */ panic("%s: allocation failure.", __func__); diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index d8505c25e6fb..6c9367564b4a 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -541,12 +541,12 @@ enable_ddp(struct adapter *sc, struct toepcb *toep) __func__, toep->tid, time_uptime); toep->ddp_flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep, W_TCB_RX_DDP_FLAGS, + t4_set_tcb_field(sc, toep, 1, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | V_TF_DDP_INDICATE_OUT(1) | V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1) | V_TF_DDP_BUF0_VALID(1) | V_TF_DDP_BUF1_VALID(1), V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1)); - t4_set_tcb_field(sc, toep, W_TCB_T_FLAGS, + t4_set_tcb_field(sc, toep, 1, W_TCB_T_FLAGS, V_TF_RCV_COALESCE_ENABLE(1), 0); } @@ -562,9 +562,9 @@ disable_ddp(struct adapter *sc, struct toepcb *toep) __func__, toep->tid, time_uptime); toep->ddp_flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep, W_TCB_T_FLAGS, + t4_set_tcb_field(sc, toep, 1, W_TCB_T_FLAGS, V_TF_RCV_COALESCE_ENABLE(1), V_TF_RCV_COALESCE_ENABLE(1)); - t4_set_tcb_field(sc, toep, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1), + t4_set_tcb_field(sc, toep, 1, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1), V_TF_DDP_OFF(1)); } diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index fb4584ce6055..4411a0642dbd 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -269,8 +269,8 @@ void t4_rcvd(struct toedev *, struct tcpcb *); int t4_tod_output(struct toedev *, struct tcpcb *); int t4_send_fin(struct toedev *, struct tcpcb *); int t4_send_rst(struct toedev *, struct tcpcb *); -void t4_set_tcb_field(struct adapter *, struct toepcb *, uint16_t, uint64_t, - uint64_t); +void t4_set_tcb_field(struct adapter *, struct toepcb *, int, uint16_t, + uint64_t, uint64_t); /* t4_ddp.c */ void t4_init_ddp(struct adapter *, struct tom_data *);