[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-cmdlist r9840 - in /linux/team/sru...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 16 16:39:13 CDT 2011


Author: sruffell
Date: Wed Mar 16 16:39:08 2011
New Revision: 9840

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9840
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>

Modified:
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c
    linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wcte12xp/base.c

Modified: linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9840&r1=9839&r2=9840
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.c Wed Mar 16 16:39:08 2011
@@ -1155,6 +1155,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/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h?view=diff&rev=9840&r1=9839&r2=9840
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/voicebus/voicebus.h Wed Mar 16 16:39:08 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/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9840&r1=9839&r2=9840
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wctdm24xxp/base.c Wed Mar 16 16:39:08 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/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9840&r1=9839&r2=9840
==============================================================================
--- linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-cmdlist/drivers/dahdi/wcte12xp/base.c Wed Mar 16 16:39:08 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