summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoe Rubinstein <nrubinstein@proformatique.com>2010-12-17 19:18:00 +0100
committerNoe Rubinstein <nrubinstein@proformatique.com>2010-12-17 19:18:00 +0100
commitc9485959f37fd395034a854e2aa8fd7034847075 (patch)
treea8923baa8dcf497121f6b9a359c5b5a129a2c666
parent7dff2fbad3cb10b55464c919442545c48332f12c (diff)
fix traces
-rw-r--r--xhfc/base.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/xhfc/base.c b/xhfc/base.c
index 6fa6766..3b1fcab 100644
--- a/xhfc/base.c
+++ b/xhfc/base.c
@@ -324,7 +324,7 @@ static void hdlc_signal_complete(struct xhfc_span *xhfc_span, u8 stat)
{
if (stat != 0x00) {
if (DBG_HDLC && DBG_SPAN(xhfc_span)) {
- printk(KERN_INFO DRIVER_NAME "(port %d) STAT=0x%02x indicates "
+ printk(KERN_NOTICE DRIVER_NAME "(port %d): STAT=0x%02x indicates "
"frame problem: %s\n", portno(xhfc_span),
stat,
(0xff == stat) ? "HDLC Abort" : "Bad FCS");
@@ -335,7 +335,7 @@ static void hdlc_signal_complete(struct xhfc_span *xhfc_span, u8 stat)
} else {
if (DBG_HDLC && DBG_SPAN(xhfc_span)) {
printk(KERN_INFO DRIVER_NAME
- "(port %d) Frame " /*"%d" */ "is good!\n",
+ "(port %d): Frame " /*"%d" */ "is good!\n",
portno(xhfc_span)
/*, xhfc_span->frames_in */ );
}
@@ -345,7 +345,7 @@ static void hdlc_signal_complete(struct xhfc_span *xhfc_span, u8 stat)
/*
* Inner loop for D-channel receive function. Retrieves HDLC data from the
- * hardware. If the hardware indicates that the frame is complete, we check
+ * hardware. If the hardware indicates that the frame is complete, check
* the HDLC engine's STAT byte and update DAHDI as needed.
*
* Returns the number of HDLC frames left in the FIFO. */
@@ -373,14 +373,11 @@ static int hdlc_rx_frame(struct xhfc_span *xhfc_span)
debug_fz(fifo, __func__, debugbuf);
if (!flen && !zlen) {
- if (DBG_VERBOSE_HDLC && DBG_SPAN(xhfc_span))
- printk(KERN_INFO DRIVER_NAME
- ": %s, nothing to receive (%ld)\n",
- debugbuf, xhfc_span->non_rx_cnt);
- xhfc_span->non_rx_cnt++;
+ printk(KERN_WARNING DRIVER_NAME ": %s, "
+ "nothing to receive (should not happen!)\n",
+ debugbuf);
return 0;
}
- xhfc_span->non_rx_cnt = 0;
if (DBG_VERBOSE_HDLC && DBG_SPAN(xhfc_span))
printk(KERN_INFO DRIVER_NAME ": %s\n", debugbuf);
@@ -653,7 +650,8 @@ irqreturn_t xhfc_interrupt(int irq, void *dev_id, struct pt_regs* ptregs)
/*****************************************************/
static void disable_interrupts(struct xhfc * xhfc)
{
- printk(KERN_INFO "%s %s\n", xhfc->name, __func__);
+ if(DBG)
+ printk(KERN_INFO "%s %s\n", xhfc->name, __func__);
write_xhfc(xhfc, R_IRQ_CTRL, 0);
read_xhfc(xhfc, R_CHIP_ID);
@@ -669,7 +667,8 @@ static void disable_interrupts(struct xhfc * xhfc)
static void enable_interrupts(struct xhfc * xhfc)
{
u8 r_irq_ctrl = 0;
- printk(KERN_INFO "%s %s\n", xhfc->name, __func__);
+ if(DBG)
+ printk(KERN_INFO "%s %s\n", xhfc->name, __func__);
set_mb(xhfc->running, 1);
@@ -985,7 +984,8 @@ int __devinit xhfc_init_one(struct pci_dev *pdev,
unsigned long base, size;
int rc = -ENOMEM;
- printk(KERN_DEBUG "entering xhfc_init_one\n");
+ if(DBG)
+ printk(KERN_DEBUG "entering xhfc_init_one\n");
/****************
@@ -1012,7 +1012,8 @@ int __devinit xhfc_init_one(struct pci_dev *pdev,
if (rc)
goto err_enable_device;
- printk(KERN_DEBUG "pci_enable_device succeeded\n");
+ if(DBG)
+ printk(KERN_DEBUG "pci_enable_device succeeded\n");
rc = pci_request_regions(pdev, DRIVER_NAME);
if (rc)
@@ -1186,7 +1187,8 @@ void __devexit xhfc_remove_one(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
kfree(pi);
- printk(KERN_DEBUG "%s: bye-bye\n", __func__);
+ if(DBG)
+ printk(KERN_DEBUG "%s: bye-bye\n", __func__);
}
/***************/