From 5a4adf8c493e33a8f3c7362b67761438facd7280 Mon Sep 17 00:00:00 2001 From: Noe Rubinstein Date: Wed, 4 May 2011 14:55:43 +0200 Subject: Potential fix for frame spam on halt --- xhfc/base.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'xhfc/base.c') diff --git a/xhfc/base.c b/xhfc/base.c index 4f8d881..0b70dbc 100644 --- a/xhfc/base.c +++ b/xhfc/base.c @@ -541,9 +541,10 @@ static int hdlc_tx_frame(struct xhfc_span *xhfc_span) printk(KERN_INFO DRIVER_NAME ": hdlc_tx_frame(span %d): DAHDI gave %d " - "bytes for FIFO %d (res = %d): %s\n", - dahdi_span->spanno, - size, fifo, res, debugbuf); + "bytes for FIFO %d (%d frames left; res = %d): " + "%s\n", dahdi_span->spanno, size, fifo, + atomic_read(&xhfc_span->hdlc_pending), + res, debugbuf); if (size && res != 0) printk(KERN_INFO DRIVER_NAME @@ -673,7 +674,8 @@ static void xhfc_rxtx(void *data) if ((s->span.flags & DAHDI_FLAG_RUNNING) && s->sigchan) { // XXX s->sigchan? dahdi_receive(&s->span); - dahdi_transmit(&s->span); + if(s->span.alarms == DAHDI_ALARM_NONE) + dahdi_transmit(&s->span); dahdi_ec_span(&s->span); } -- cgit v1.2.3