[svn-commits] sruffell: linux/trunk r9880 - in /linux/trunk/drivers/dahdi: voicebus/ wctdm2...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Apr 4 11:25:02 CDT 2011
Author: sruffell
Date: Mon Apr 4 11:24:54 2011
New Revision: 9880
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9880
Log:
wctdm24xxp, wcte12xp: Add voicebus_quiesce function.
voicebus_quiesce is like voicebus_stop, except that it doesn't wait for any
information to come back from the card. This prevents kexec from blocking
waiting for information from a potentially dead card.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Michael Spiceland <mspiceland at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Modified:
linux/trunk/drivers/dahdi/voicebus/voicebus.c
linux/trunk/drivers/dahdi/voicebus/voicebus.h
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
linux/trunk/drivers/dahdi/wcte12xp/base.c
Modified: linux/trunk/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9880&r1=9879&r2=9880
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/trunk/drivers/dahdi/voicebus/voicebus.c Mon Apr 4 11:24:54 2011
@@ -1154,6 +1154,26 @@
}
EXPORT_SYMBOL(voicebus_stop);
+/**
+ * voicebus_quiesce - Halt the voicebus interface.
+ * @vb: The voicebus structure to quiet
+ *
+ * This ensures that the device is not engaged in any DMA transactions or
+ * interrupting. It does not grab any locks since it may be called by a dying
+ * kernel.
+ */
+void voicebus_quiesce(struct voicebus *vb)
+{
+ if (!vb)
+ return;
+
+ /* Reset the device */
+ __vb_disable_interrupts(vb);
+ __vb_setctl(vb, 0x0000, 0x1);
+ __vb_getctl(vb, 0x0000);
+}
+EXPORT_SYMBOL(voicebus_quiesce);
+
/*!
* \brief Prepare the interface for module unload.
*
Modified: linux/trunk/drivers/dahdi/voicebus/voicebus.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/voicebus.h?view=diff&rev=9880&r1=9879&r2=9880
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/voicebus.h (original)
+++ linux/trunk/drivers/dahdi/voicebus/voicebus.h Mon Apr 4 11:24:54 2011
@@ -177,6 +177,7 @@
void voicebus_release(struct voicebus *vb);
int voicebus_start(struct voicebus *vb);
void voicebus_stop(struct voicebus *vb);
+void voicebus_quiesce(struct voicebus *vb);
int voicebus_transmit(struct voicebus *vb, struct vbb *vbb);
int voicebus_set_minlatency(struct voicebus *vb, unsigned int milliseconds);
int voicebus_current_latency(struct voicebus *vb);
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9880&r1=9879&r2=9880
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Mon Apr 4 11:24:54 2011
@@ -4896,7 +4896,7 @@
static void wctdm_shutdown(struct pci_dev *pdev)
{
struct wctdm *wc = pci_get_drvdata(pdev);
- voicebus_stop(&wc->vb);
+ voicebus_quiesce(&wc->vb);
}
#endif
Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9880&r1=9879&r2=9880
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Mon Apr 4 11:24:54 2011
@@ -2369,11 +2369,11 @@
{ 0 }
};
-#if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2, 6, 12)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
static void te12xp_shutdown(struct pci_dev *pdev)
{
struct t1 *wc = pci_get_drvdata(pdev);
- voicebus_stop(&wc->vb);
+ voicebus_quiesce(&wc->vb);
}
#endif
@@ -2383,7 +2383,7 @@
.name = "wcte12xp",
.probe = te12xp_init_one,
.remove = __devexit_p(te12xp_remove_one),
-#if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2, 6, 12)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
.shutdown = te12xp_shutdown,
#endif
.id_table = te12xp_pci_tbl,
More information about the svn-commits
mailing list