[thirdparty-commits] rmudgett: branch mISDN/1.0 r105 - in /mISDN/branches/1.0: ./ drivers/isdn/har...

SVN commits to the Digium third-party software repository thirdparty-commits at lists.digium.com
Thu Apr 16 13:16:45 CDT 2009


Author: rmudgett
Date: Thu Apr 16 13:16:42 2009
New Revision: 105

URL: http://svn.digium.com/svn-view/thirdparty?view=rev&rev=105
Log:
Merged revisions 104 via svnmerge from 
https://origsvn.digium.com/svn/thirdparty/mISDN/trunk

........
  r104 | rmudgett | 2009-04-16 13:00:30 -0500 (Thu, 16 Apr 2009) | 4 lines
  
  Fix hfc_multi empty Tx FIFO issue and add debug information.
  
  JIRA ABE-1835
........

Modified:
    mISDN/branches/1.0/   (props changed)
    mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.c
    mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.h

Propchange: mISDN/branches/1.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Thu Apr 16 13:16:42 2009
@@ -1,1 +1,1 @@
-/mISDN/trunk:1-75,93-94
+/mISDN/trunk:1-75,93-94,104

Modified: mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.c?view=diff&rev=105&r1=104&r2=105
==============================================================================
--- mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.c (original)
+++ mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.c Thu Apr 16 13:16:42 2009
@@ -1402,8 +1402,10 @@
 /* fill fifo as much as possible */
 /*********************************/
 
+static unsigned char filldata[200];
+
 static void
-hfcmulti_tx(hfc_multi_t *hc, int ch, channel_t *chan)
+hfcmulti_tx(hfc_multi_t *hc, int ch, channel_t *chan, const char *str)
 {
 	int i, ii, temp, len;
 	int Zspace, z1, z2;
@@ -1486,6 +1488,12 @@
 	if (Zspace < 4) /* just to be safe */
 		return;
 
+	if ((z1 == z2) && test_bit(FLG_BCHANNEL, &chan->Flags)) {
+		if (debug & DEBUG_HFCMULTI_TXFIFO)
+			printk("[%d]: FIFO empty: %s and %s\n", chan->channel, str, len ? "have data" : "no data");
+
+		write_fifo_data(hc, filldata, sizeof(filldata));
+	}
 	/* if no data */
 	if (!len) {
 		if (z1 == z2) { /* empty */
@@ -1566,6 +1574,11 @@
 			chan->tx_idx = 0;
 			len = chan->tx_skb->len;
 			queue_ch_frame(chan, CONFIRM, hh->dinfo, NULL);
+			if (debug & DEBUG_HFCMULTI_TXFIFO) {
+				if (!len) {
+					printk("going to next frame\n");
+				}
+			}
 			goto next_frame;
 		} else {
 			test_and_clear_bit(FLG_TX_NEXT, &chan->Flags);
@@ -1822,7 +1835,7 @@
 	while(ch < 32) {
 		chan = hc->chan[ch].ch;
 		if (chan && hc->created[hc->chan[ch].port]) {
-			hfcmulti_tx(hc, ch, chan);
+			hfcmulti_tx(hc, ch, chan, __FUNCTION__);
 			/* fifo is started when switching to rx-fifo */
 			hfcmulti_rx(hc, ch, chan);
 			if (test_bit(FLG_DCHANNEL, &chan->Flags) &&
@@ -2103,7 +2116,7 @@
 						if (chan && hc->created[hc->chan[ch].port] &&
 							test_bit(FLG_ACTIVE, &chan->Flags)) {
 							//printk(KERN_DEBUG "txchan:%d\n",ch);
-							hfcmulti_tx(hc, ch, chan);
+							hfcmulti_tx(hc, ch, chan, __FUNCTION__);
 							/* start fifo */
 							HFC_outb_(hc, R_FIFO, 0);
 							HFC_wait_(hc);
@@ -2937,7 +2950,7 @@
 		spin_lock_irqsave(inst->hwlock, flags);
 		ret = channel_senddata(chan, hh->dinfo, skb);
 		if (ret > 0) { /* direct TX */
-			hfcmulti_tx(hc, chan->channel, chan);
+			hfcmulti_tx(hc, chan->channel, chan, __FUNCTION__);
 			/* start fifo */
 			HFC_outb(hc, R_FIFO, 0);
 			HFC_wait(hc);

Modified: mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.h
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.h?view=diff&rev=105&r1=104&r2=105
==============================================================================
--- mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.h (original)
+++ mISDN/branches/1.0/drivers/isdn/hardware/mISDN/hfc_multi.h Thu Apr 16 13:16:42 2009
@@ -31,6 +31,7 @@
 #define DEBUG_HFCMULTI_SYNC	0x0100
 #define DEBUG_HFCMULTI_DTMF	0x0200
 #define DEBUG_HFCMULTI_LOCK	0x8000
+#define DEBUG_HFCMULTI_TXFIFO	0x10000
 
 #define PCI_ENA_REGIO	0x01
 #define PCI_ENA_MEMIO	0x02




More information about the thirdparty-commits mailing list