svn commit: r193600 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb
Kip Macy
kmacy at FreeBSD.org
Sun Jun 7 00:47:29 UTC 2009
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);
More information about the svn-src-user
mailing list