Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jun 2009 00:47:28 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r193600 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb
Message-ID:  <200906070047.n570lSXQ076721@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sun Jun  7 00:47:28 2009
New Revision: 193600
URL: http://svn.freebsd.org/changeset/base/193600

Log:
  drain callouts on detach

Modified:
  user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_main.c
  user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c

Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_main.c	Sun Jun  7 00:27:45 2009	(r193599)
+++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_main.c	Sun Jun  7 00:47:28 2009	(r193600)
@@ -1033,10 +1033,15 @@ cxgb_port_detach(device_t dev)
 		cxgb_stop_locked(p);
 	PORT_UNLOCK(p);
 
+	for (i = p->first_qset; i < p->first_qset + p->nqsets; i++) {
+		struct sge_qset *qs = &sc->sge.qs[i];
+		struct sge_txq *txq = &qs->txq[TXQ_ETH];
+
+		callout_drain(&txq->txq_watchdog);
+		callout_drain(&txq->txq_timer);
+	}
 	ether_ifdetach(p->ifp);
-	printf("waiting for callout to stop ...");
 	DELAY(1000000);
-	printf("done\n");
 	/*
 	 * the lock may be acquired in ifdetach
 	 */

Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c	Sun Jun  7 00:27:45 2009	(r193599)
+++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c	Sun Jun  7 00:47:28 2009	(r193600)
@@ -1604,7 +1604,7 @@ cxgb_start_locked(struct sge_qset *qs)
 		/*
 		 * We sent via PIO, no longer need a copy
 		 */
-		if (m->head->m_nextpkt == NULL &&
+		if (m_head->m_nextpkt == NULL &&
 		    m_head->m_pkthdr.len <= PIO_LEN)
 			m_freem(m_head);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906070047.n570lSXQ076721>