Author: np
Date: Tue Jun 11 21:20:23 2013
New Revision: 251638
URL: http://svnweb.freebsd.org/changeset/base/251638

Log:
  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

Modified:
  head/sys/dev/cxgbe/tom/t4_cpl_io.c
  head/sys/dev/cxgbe/tom/t4_ddp.c
  head/sys/dev/cxgbe/tom/t4_tom.h

Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c  Tue Jun 11 20:00:49 2013        
(r251637)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c  Tue Jun 11 21:20:23 2013        
(r251638)
@@ -1410,13 +1410,13 @@ do_set_tcb_rpl(struct sge_iq *iq, const 
 }
 
 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__);

Modified: head/sys/dev/cxgbe/tom/t4_ddp.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_ddp.c     Tue Jun 11 20:00:49 2013        
(r251637)
+++ head/sys/dev/cxgbe/tom/t4_ddp.c     Tue Jun 11 21:20:23 2013        
(r251638)
@@ -541,12 +541,12 @@ enable_ddp(struct adapter *sc, struct to
            __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 t
            __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));
 }
 

Modified: head/sys/dev/cxgbe/tom/t4_tom.h
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_tom.h     Tue Jun 11 20:00:49 2013        
(r251637)
+++ head/sys/dev/cxgbe/tom/t4_tom.h     Tue Jun 11 21:20:23 2013        
(r251638)
@@ -269,8 +269,8 @@ void t4_rcvd(struct toedev *, struct tcp
 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 *);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to