diff options
author | fjoe <fjoe@FreeBSD.org> | 2012-05-30 16:40:11 +0800 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2012-05-30 16:40:11 +0800 |
commit | 090784f9e4d1f485afd1c38ff1f39a1b9f476053 (patch) | |
tree | 265d66e24d7628e6b99b4c6a3b8e491a82fbd846 /misc | |
parent | c41baab97580c5082fae7731f0fb6a8a17d4722a (diff) | |
download | freebsd-ports-gnome-090784f9e4d1f485afd1c38ff1f39a1b9f476053.tar.gz freebsd-ports-gnome-090784f9e4d1f485afd1c38ff1f39a1b9f476053.tar.zst freebsd-ports-gnome-090784f9e4d1f485afd1c38ff1f39a1b9f476053.zip |
- Fix wcte12xp unloading (implement flush_workqueue)
- Fix nethdlc -> bchan/dchan reconfiguration (unlock chan mtx
before destroying iface)
- Bump PORTREVISION
Diffstat (limited to 'misc')
-rw-r--r-- | misc/dahdi-kmod/Makefile | 2 | ||||
-rw-r--r-- | misc/dahdi-kmod/files/patch-dahdi-iface | 4 | ||||
-rw-r--r-- | misc/dahdi-kmod/files/patch-flush_workqueue | 91 |
3 files changed, 95 insertions, 2 deletions
diff --git a/misc/dahdi-kmod/Makefile b/misc/dahdi-kmod/Makefile index ffd4b1f93aea..6c07070a3f4a 100644 --- a/misc/dahdi-kmod/Makefile +++ b/misc/dahdi-kmod/Makefile @@ -7,7 +7,7 @@ PORTNAME= dahdi-kmod PORTVERSION= ${DAHDI_VERSION:S/-//g} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= misc kld MASTER_SITES= ${MASTER_SITE_LOCAL}\ http://downloads.digium.com/pub/telephony/firmware/releases/:firmware diff --git a/misc/dahdi-kmod/files/patch-dahdi-iface b/misc/dahdi-kmod/files/patch-dahdi-iface index 18fc559d026f..86501da5bfe7 100644 --- a/misc/dahdi-kmod/files/patch-dahdi-iface +++ b/misc/dahdi-kmod/files/patch-dahdi-iface @@ -867,13 +867,15 @@ Index: freebsd/drivers/dahdi/dahdi-base.c #endif write_lock_irqsave(&chan_lock, flags); if (test_bit(DAHDI_FLAGBIT_REGISTERED, &chan->flags)) { -@@ -4649,6 +4679,10 @@ +@@ -4649,6 +4679,12 @@ chans[ch.chan]->hdlcnetdev = NULL; chans[ch.chan]->flags &= ~DAHDI_FLAG_NETDEV; } +#elif defined(__FreeBSD__) + if (chans[ch.chan]->flags & DAHDI_FLAG_NETDEV) { ++ spin_unlock_irqrestore(&chans[ch.chan]->lock, flags); + dahdi_iface_destroy(chans[ch.chan]); ++ spin_lock_irqsave(&chans[ch.chan]->lock, flags); + } #else if (ch.sigtype == DAHDI_SIG_HDLCNET) { diff --git a/misc/dahdi-kmod/files/patch-flush_workqueue b/misc/dahdi-kmod/files/patch-flush_workqueue new file mode 100644 index 000000000000..b5033b27a81f --- /dev/null +++ b/misc/dahdi-kmod/files/patch-flush_workqueue @@ -0,0 +1,91 @@ +Index: freebsd/include/dahdi/compat/bsd.h +=================================================================== +--- freebsd/include/dahdi/compat/bsd.h (revision 10598) ++++ freebsd/include/dahdi/compat/bsd.h (working copy) +@@ -330,6 +330,7 @@ + + struct workqueue_struct *create_singlethread_workqueue(const char *name); + void destroy_workqueue(struct workqueue_struct *wq); ++void flush_workqueue(struct workqueue_struct *wq); + void queue_work(struct workqueue_struct *wq, struct work_struct *work); + + /* +Index: freebsd/freebsd/dahdi/bsd-compat.c +=================================================================== +--- freebsd/freebsd/dahdi/bsd-compat.c (revision 10598) ++++ freebsd/freebsd/dahdi/bsd-compat.c (working copy) +@@ -33,6 +33,8 @@ + #include <sys/bus.h> + #include <sys/callout.h> + #include <sys/firmware.h> ++#include <sys/param.h> ++#include <sys/proc.h> + #include <sys/syscallsubr.h> + #include <sys/systm.h> + #include <sys/taskqueue.h> +@@ -324,7 +326,31 @@ + free(wq, M_DAHDI); + } + ++static void ++_flush_workqueue_fn(void *context, int pending) ++{ ++ /* nothing to do */ ++} ++ ++static void ++_flush_taskqueue(struct taskqueue **tq) ++{ ++ struct task flushtask; ++ ++ PHOLD(curproc); ++ TASK_INIT(&flushtask, 0, _flush_workqueue_fn, NULL); ++ taskqueue_enqueue_fast(*tq, &flushtask); ++ taskqueue_drain(*tq, &flushtask); ++ PRELE(curproc); ++} ++ + void ++flush_workqueue(struct workqueue_struct *wq) ++{ ++ _flush_taskqueue(&wq->tq); ++} ++ ++void + queue_work(struct workqueue_struct *wq, struct work_struct *work) + { + work->tq = wq->tq; +Index: freebsd/drivers/dahdi/wcte12xp/base.c +=================================================================== +--- freebsd/drivers/dahdi/wcte12xp/base.c (revision 10598) ++++ freebsd/drivers/dahdi/wcte12xp/base.c (working copy) +@@ -2441,13 +2441,11 @@ + clear_bit(INITIALIZED, &wc->bit_flags); + + del_timer_sync(&wc->timer); +-#if !defined(__FreeBSD__) + flush_workqueue(wc->wq); + #ifdef VPM_SUPPORT + if (vpm) + flush_workqueue(vpm->wq); + #endif +-#endif + + voicebus_release(&wc->vb); + +Index: freebsd/drivers/dahdi/wctdm24xxp/xhfc.c +=================================================================== +--- freebsd/drivers/dahdi/wctdm24xxp/xhfc.c (revision 10598) ++++ freebsd/drivers/dahdi/wctdm24xxp/xhfc.c (working copy) +@@ -2129,11 +2129,7 @@ + down(&wc->syncsem); + b4s[i]->shutdown = 1; + up(&wc->syncsem); +-#if defined(__FreeBSD__) +- flush_work(&b4s[i]->xhfc_wq); +-#else + flush_workqueue(b4s[i]->xhfc_ws); +-#endif + } + } + } |