PERFORCE change 128253 for review

Kip Macy kmacy at FreeBSD.org
Sun Oct 28 15:22:18 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=128253

Change 128253 by kmacy at kmacy:storage:toestack on 2007/10/28 22:21:17

	- set the length on a control mbuf so memcpy doesn't get passed -8
	- call callout_stop on callouts, callout_drain still doesn't seem to do the trick
	- don't disable offload by default

Affected files ...

.. //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#12 edit

Differences ...

==== //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#12 (text+ko) ====

@@ -203,7 +203,7 @@
  * The driver enables offload as a default.
  * To disable it, use ofld_disable = 1.
  */
-static int ofld_disable = 1;
+static int ofld_disable = 0;
 TUNABLE_INT("hw.cxgb.ofld_disable", &ofld_disable);
 SYSCTL_UINT(_hw_cxgb, OID_AUTO, ofld_disable, CTLFLAG_RDTUN, &ofld_disable, 0,
     "disable ULP offload");
@@ -1301,6 +1301,8 @@
 		return (ENOMEM);
 
 	req = mtod(m, struct cpl_smt_write_req *);
+	m->m_pkthdr.len = m->m_len = sizeof(struct cpl_smt_write_req);
+	
 	req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
 	OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SMT_WRITE_REQ, idx));
 	req->mtu_idx = NMTUS - 1;  /* should be 0 but there's a T3 bug */
@@ -1587,6 +1589,8 @@
 		cxgb_teardown_msix(sc);
 	ADAPTER_UNLOCK(sc);
 
+	callout_stop(&sc->cxgb_tick_ch);
+	callout_stop(&sc->sge_timer_ch);
 	callout_drain(&sc->cxgb_tick_ch);
 	callout_drain(&sc->sge_timer_ch);
 	
@@ -1761,7 +1765,6 @@
 	ADAPTER_LOCK(p->adapter);
 	clrbit(&p->adapter->open_device_map, p->port_id);
 
-	
 	if (p->adapter->open_device_map == 0) {
 		cxgb_down_locked(p->adapter);
 	} else 


More information about the p4-projects mailing list