summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte11xp.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@digium.com>2008-08-03 16:47:46 +0000
committerRussell Bryant <russell@digium.com>2008-08-03 16:47:46 +0000
commitad59317fbfddd1d6624e8128f556d85e7e17d935 (patch)
treed76f5176789981ba3f8ee905a4ba8ae926ff6b95 /drivers/dahdi/wcte11xp.c
parent53bb164eda38b8591a88146fbf81652041eeb9b1 (diff)
Change all instances of printk in DAHDI to include a priority
(closes issue #11504) Reported by: tzafrir Patches: 20080717__issue11504_dahdi_printk_without_priority.diff uploaded by bbryant (license 36) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4685 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcte11xp.c')
-rw-r--r--drivers/dahdi/wcte11xp.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/drivers/dahdi/wcte11xp.c b/drivers/dahdi/wcte11xp.c
index c343ba4..3d8e542 100644
--- a/drivers/dahdi/wcte11xp.c
+++ b/drivers/dahdi/wcte11xp.c
@@ -308,7 +308,7 @@ static inline unsigned int t1_framer_in(struct t1 *wc, const unsigned int addr)
static inline void __t1_framer_out(struct t1 *wc, const unsigned int reg, const unsigned int val)
{
if (debug > 1)
- printk("Writing %02x to address %02x\n", val, reg);
+ printk(KERN_DEBUG "Writing %02x to address %02x\n", val, reg);
__select_framer(wc, reg);
/* Send address */
outb(val, wc->ioaddr + WC_USERREG + ((reg & 0xf) << 2));
@@ -320,13 +320,13 @@ static inline void __t1_framer_out(struct t1 *wc, const unsigned int reg, const
__t1_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff) | (1 << 10));
__t1_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
__t1_pci_out(wc, WC_LADDR, 0);
- if (debug) printk("Write complete\n");
+ if (debug) printk(KERN_DEBUG "Write complete\n");
#endif
#if 0
{ unsigned int tmp;
tmp = t1_framer_in(wc, unit, addr);
if (tmp != value) {
- printk("Expected %d from unit %d register %d but got %d instead\n", value, unit, addr, tmp);
+ printk(KERN_DEBUG "Expected %d from unit %d register %d but got %d instead\n", value, unit, addr, tmp);
} }
#endif
}
@@ -348,7 +348,7 @@ static void t1xxp_release(struct t1 *wc)
kfree(wc->chans[x]);
}
kfree(wc);
- printk("Freed a Wildcard\n");
+ printk(KERN_INFO "Freed a Wildcard\n");
}
static int t1xxp_close(struct dahdi_chan *chan)
@@ -371,7 +371,7 @@ static void t1xxp_enable_interrupts(struct t1 *wc)
outb(0x3c /* 0x3f */, wc->ioaddr + WC_MASK0);
/* No external interrupts */
outb(0x00, wc->ioaddr + WC_MASK1);
- if (debug) printk("Enabled interrupts!\n");
+ if (debug) printk(KERN_DEBUG "Enabled interrupts!\n");
}
static void t1xxp_start_dma(struct t1 *wc)
@@ -382,7 +382,7 @@ static void t1xxp_start_dma(struct t1 *wc)
schedule_timeout(1);
outb(DELAY | 0x01, wc->ioaddr + WC_CNTL);
outb(0x01, wc->ioaddr + WC_OPER);
- if (debug) printk("Started DMA\n");
+ if (debug) printk(KERN_DEBUG "Started DMA\n");
outb(0x03, wc->ioaddr + WC_OPER);
outb(0x01, wc->ioaddr + WC_OPER);
}
@@ -408,7 +408,7 @@ static void __t1xxp_set_clear(struct t1 *wc)
val |= 1 << (7 - (i % 8));
if ((i % 8)==7) {
if (debug > 1)
- printk("Putting %d in register %02x\n",
+ printk(KERN_DEBUG "Putting %d in register %02x\n",
val, 0x2f + j);
__t1_framer_out(wc, 0x2f + j, val);
val = 0;
@@ -452,37 +452,37 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd)
if (wc->spantype == TYPE_E1) {
switch(cmd) {
case DAHDI_MAINT_NONE:
- printk("XXX Turn off local and remote loops E1 XXX\n");
+ printk(KERN_INFO "XXX Turn off local and remote loops E1 XXX\n");
break;
case DAHDI_MAINT_LOCALLOOP:
- printk("XXX Turn on local loopback E1 XXX\n");
+ printk(KERN_INFO "XXX Turn on local loopback E1 XXX\n");
break;
case DAHDI_MAINT_REMOTELOOP:
- printk("XXX Turn on remote loopback E1 XXX\n");
+ printk(KERN_INFO "XXX Turn on remote loopback E1 XXX\n");
break;
case DAHDI_MAINT_LOOPUP:
- printk("XXX Send loopup code E1 XXX\n");
+ printk(KERN_INFO "XXX Send loopup code E1 XXX\n");
break;
case DAHDI_MAINT_LOOPDOWN:
- printk("XXX Send loopdown code E1 XXX\n");
+ printk(KERN_INFO "XXX Send loopdown code E1 XXX\n");
break;
case DAHDI_MAINT_LOOPSTOP:
- printk("XXX Stop sending loop codes E1 XXX\n");
+ printk(KERN_INFO "XXX Stop sending loop codes E1 XXX\n");
break;
default:
- printk("TE110P: Unknown E1 maint command: %d\n", cmd);
+ printk(KERN_NOTICE "TE110P: Unknown E1 maint command: %d\n", cmd);
break;
}
} else {
switch(cmd) {
case DAHDI_MAINT_NONE:
- printk("XXX Turn off local and remote loops T1 XXX\n");
+ printk(KERN_INFO "XXX Turn off local and remote loops T1 XXX\n");
break;
case DAHDI_MAINT_LOCALLOOP:
- printk("XXX Turn on local loop and no remote loop XXX\n");
+ printk(KERN_INFO "XXX Turn on local loop and no remote loop XXX\n");
break;
case DAHDI_MAINT_REMOTELOOP:
- printk("XXX Turn on remote loopup XXX\n");
+ printk(KERN_INFO "XXX Turn on remote loopup XXX\n");
break;
case DAHDI_MAINT_LOOPUP:
t1_framer_out(wc, 0x21, 0x50); /* FMR5: Nothing but RBS mode */
@@ -494,7 +494,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd)
t1_framer_out(wc, 0x21, 0x40); /* FMR5: Nothing but RBS mode */
break;
default:
- printk("TE110P: Unknown T1 maint command: %d\n", cmd);
+ printk(KERN_NOTICE "TE110P: Unknown T1 maint command: %d\n", cmd);
break;
}
}
@@ -508,7 +508,7 @@ static int t1xxp_rbsbits(struct dahdi_chan *chan, int bits)
struct t1 *wc = chan->pvt;
unsigned long flags;
- if(debug > 1) printk("Setting bits to %d on channel %s\n", bits, chan->name);
+ if(debug > 1) printk(KERN_DEBUG "Setting bits to %d on channel %s\n", bits, chan->name);
spin_lock_irqsave(&wc->lock, flags);
if (wc->spantype == TYPE_E1) { /* do it E1 way */
if (chan->chanpos == 16) {
@@ -549,7 +549,7 @@ static int t1xxp_rbsbits(struct dahdi_chan *chan, int bits)
}
spin_unlock_irqrestore(&wc->lock, flags);
if (debug > 1)
- printk("Finished setting RBS bits\n");
+ printk(KERN_DEBUG "Finished setting RBS bits\n");
return 0;
}
@@ -648,7 +648,7 @@ static void t1_check_sigbits(struct t1 *wc)
static void t4_serial_setup(struct t1 *wc)
{
- printk("TE110P: Setting up global serial parameters for %s %s\n",
+ printk(KERN_INFO "TE110P: Setting up global serial parameters for %s %s\n",
wc->spantype == TYPE_E1 ? (unchannelized ? "Unchannelized E1" : "E1") : "T1",
wc->spanflags & FLAG_FALC12 ? "FALC V1.2" : "FALC V2.2");
t1_framer_out(wc, 0x85, 0xe0); /* GPC1: Multiplex mode enabled, FSC is output, active low, RCLK from channel 0 */
@@ -696,7 +696,7 @@ static void t4_serial_setup(struct t1 *wc)
t1_framer_out(wc, 0x84, 0x31); /* PC5: XMFS active low, SCLKR is input, RCLK is output */
t1_framer_out(wc, 0x86, 0x03); /* PC6: CLK1 is Tx Clock output, CLK2 is 8.192 Mhz from DCO-R */
t1_framer_out(wc, 0x3b, 0x00); /* Clear LCR1 */
- printk("TE110P: Successfully initialized serial bus for card\n");
+ printk(KERN_INFO "TE110P: Successfully initialized serial bus for card\n");
}
static void __t1_configure_t1(struct t1 *wc, int lineconfig, int txlevel)
@@ -781,7 +781,7 @@ static void __t1_configure_t1(struct t1 *wc, int lineconfig, int txlevel)
__t1_framer_out(wc, 0x28, 0x01); /* XPM2 */
break;
}
- printk("TE110P: Span configured for %s/%s\n", framing, line);
+ printk(KERN_INFO "TE110P: Span configured for %s/%s\n", framing, line);
}
static void __t1_configure_e1(struct t1 *wc, int lineconfig)
@@ -858,7 +858,7 @@ static void __t1_configure_e1(struct t1 *wc, int lineconfig)
__t1_framer_out(wc, 0x26, 0x54); /* XPM0 */
__t1_framer_out(wc, 0x27, 0x02); /* XPM1 */
__t1_framer_out(wc, 0x28, 0x00); /* XPM2 */
- printk("TE110P: Span configured for %s/%s%s\n", framing, line, crc4);
+ printk(KERN_INFO "TE110P: Span configured for %s/%s%s\n", framing, line, crc4);
}
static void t1xxp_framer_start(struct t1 *wc, struct dahdi_span *span)
@@ -899,7 +899,7 @@ static int t1xxp_startup(struct dahdi_span *span)
/* Reset framer with proper parameters and start */
t1xxp_framer_start(wc, span);
- printk("Calling startup (flags is %d)\n", span->flags);
+ printk(KERN_INFO "Calling startup (flags is %d)\n", span->flags);
if (!alreadyrunning) {
/* Only if we're not already going */
@@ -1011,7 +1011,7 @@ static int t1xxp_software_init(struct t1 *wc)
wc->chans[x]->chanpos = x + 1;
}
if (dahdi_register(&wc->span, 0)) {
- printk("Unable to register span with DAHDI\n");
+ printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;
}
return 0;
@@ -1116,10 +1116,10 @@ static void t1xxp_receiveprep(struct t1 *wc, int ints)
oldcan = *canary;
if (((oldcan & 0xffff0000) >> 16) != CANARY) {
/* Check top part */
- if (debug) printk("Expecting top %04x, got %04x\n", CANARY, (oldcan & 0xffff0000) >> 16);
+ if (debug) printk(KERN_DEBUG "Expecting top %04x, got %04x\n", CANARY, (oldcan & 0xffff0000) >> 16);
wc->span.irqmisses++;
} else if ((oldcan & 0xffff) != ((wc->canary - 1) & 0xffff)) {
- if (debug) printk("Expecting bottom %d, got %d\n", wc->canary - 1, oldcan & 0xffff);
+ if (debug) printk(KERN_DEBUG "Expecting bottom %d, got %d\n", wc->canary - 1, oldcan & 0xffff);
wc->span.irqmisses++;
}
for (y=0;y<DAHDI_CHUNKSIZE;y++) {
@@ -1137,7 +1137,7 @@ static void t1xxp_receiveprep(struct t1 *wc, int ints)
control_set_reg(wc, WC_CLOCK, 0x06 | wc->sync | clockextra);
wc->clocktimeout = 100;
#if 1
- if (debug) printk("T1: Lost our place, resyncing\n");
+ if (debug) printk(KERN_DEBUG "T1: Lost our place, resyncing\n");
#endif
}
}
@@ -1146,7 +1146,7 @@ static void t1xxp_receiveprep(struct t1 *wc, int ints)
if (!wc->clocktimeout && !wc->span.alarms) {
if ((rxbuf[32 * y + ((3 + WC_OFFSET + wc->offset) & 0x1f)] & 0x7f) != 0x1b) {
if (wc->miss) {
- if (debug) printk("Double miss (%d, %d)...\n", wc->misslast, rxbuf[32 * y + ((3 + WC_OFFSET + wc->offset) & 0x1f)]);
+ if (debug) printk(KERN_DEBUG "Double miss (%d, %d)...\n", wc->misslast, rxbuf[32 * y + ((3 + WC_OFFSET + wc->offset) & 0x1f)]);
control_set_reg(wc, WC_CLOCK, 0x06 | wc->sync | clockextra);
wc->clocktimeout = 100;
} else {
@@ -1204,7 +1204,7 @@ static void t1_check_alarms(struct t1 *wc)
if (!(wc->spanflags & FLAG_NMF)) {
__t1_framer_out(wc, 0x20, 0x9f | 0x20); /* LIM0: Force RAI High */
wc->spanflags |= FLAG_NMF;
- printk("NMF workaround on!\n");
+ printk(KERN_DEBUG "NMF workaround on!\n");
}
__t1_framer_out(wc, 0x1e, 0xc3); /* Reset to CRC4 mode */
__t1_framer_out(wc, 0x1c, 0xf2); /* Force Resync */
@@ -1213,7 +1213,7 @@ static void t1_check_alarms(struct t1 *wc)
if ((wc->spanflags & FLAG_NMF)) {
__t1_framer_out(wc, 0x20, 0x9f); /* LIM0: Clear forced RAI */
wc->spanflags &= ~FLAG_NMF;
- printk("NMF workaround off!\n");
+ printk(KERN_DEBUG "NMF workaround off!\n");
}
}
} else {
@@ -1273,7 +1273,7 @@ static void t1_check_alarms(struct t1 *wc)
if (alarms && !(wc->spanflags & FLAG_SENDINGYELLOW)) {
unsigned char fmr4;
#if 1
- printk("wcte1xxp: Setting yellow alarm\n");
+ printk(KERN_INFO "wcte1xxp: Setting yellow alarm\n");
#endif
/* We manually do yellow alarm to handle RECOVER and NOTOPEN, otherwise it's auto anyway */
fmr4 = __t1_framer_in(wc, 0x20);
@@ -1282,7 +1282,7 @@ static void t1_check_alarms(struct t1 *wc)
} else if ((!alarms) && (wc->spanflags & FLAG_SENDINGYELLOW)) {
unsigned char fmr4;
#if 1
- printk("wcte1xxp: Clearing yellow alarm\n");
+ printk(KERN_INFO "wcte1xxp: Clearing yellow alarm\n");
#endif
/* We manually do yellow alarm to handle RECOVER */
fmr4 = __t1_framer_in(wc, 0x20);
@@ -1332,7 +1332,7 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
outb(ints, wc->ioaddr + WC_INTSTAT);
if (!wc->intcount) {
- if (debug) printk("Got interrupt: 0x%04x\n", ints);
+ if (debug) printk(KERN_DEBUG "Got interrupt: 0x%04x\n", ints);
}
wc->intcount++;
@@ -1371,10 +1371,10 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
}
if (ints & 0x10)
- printk("PCI Master abort\n");
+ printk(KERN_NOTICE "PCI Master abort\n");
if (ints & 0x20)
- printk("PCI Target abort\n");
+ printk(KERN_NOTICE "PCI Target abort\n");
return IRQ_RETVAL(1);
}
@@ -1417,7 +1417,7 @@ static int t1xxp_hardware_init(struct t1 *wc)
/* Second frame */
outl(wc->readdma + DAHDI_CHUNKSIZE * 32 * 2 - 4, wc->ioaddr + WC_DMARE); /* End */
- if (debug) printk("Setting up DMA (write/read = %08lx/%08lx)\n", (long)wc->writedma, (long)wc->readdma);
+ if (debug) printk(KERN_DEBUG "Setting up DMA (write/read = %08lx/%08lx)\n", (long)wc->writedma, (long)wc->readdma);
if (t1e1override > -1) {
if (t1e1override)
@@ -1432,7 +1432,7 @@ static int t1xxp_hardware_init(struct t1 *wc)
}
/* Check out the controller */
- if (debug) printk("Controller version: %02x\n", control_get_reg(wc, WC_VERSION));
+ if (debug) printk(KERN_DEBUG "Controller version: %02x\n", control_get_reg(wc, WC_VERSION));
control_set_reg(wc, WC_LEDTEST, 0x00);
@@ -1452,12 +1452,12 @@ static int t1xxp_hardware_init(struct t1 *wc)
for (x=0;x<256;x++) {
t1_framer_out(wc, 0x14, x);
if ((falcver = t1_framer_in(wc, 0x14)) != x)
- printk("Wrote '%x' but read '%x'\n", x, falcver);
+ printk(KERN_DEBUG "Wrote '%x' but read '%x'\n", x, falcver);
}
t1_framer_out(wc, 0x4a, 0xaa);
falcver = t1_framer_in(wc ,0x4a);
- printk("FALC version: %08x\n", falcver);
+ printk(KERN_INFO "FALC version: %08x\n", falcver);
if (!falcver)
wc->spanflags |= FLAG_FALC12;
@@ -1490,7 +1490,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic
/* 32 channels, Double-buffer, Read/Write */
(unsigned char *)pci_alloc_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 32 * 2 * 2, &wc->writedma);
if (!wc->writechunk) {
- printk("wcte11xp: Unable to allocate DMA-able memory\n");
+ printk(KERN_NOTICE "wcte11xp: Unable to allocate DMA-able memory\n");
return -ENOMEM;
}
@@ -1513,7 +1513,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic
pci_set_drvdata(pdev, wc);
if (request_irq(pdev->irq, t1xxp_interrupt, DAHDI_IRQ_SHARED_DISABLED, "wcte11xp", wc)) {
- printk("wcte11xp: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "wcte11xp: Unable to request IRQ %d\n", pdev->irq);
kfree(wc);
return -EIO;
}
@@ -1538,7 +1538,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic
/* Misc. software stuff */
t1xxp_software_init(wc);
- printk("Found a Wildcard: %s\n", wc->variety);
+ printk(KERN_INFO "Found a Wildcard: %s\n", wc->variety);
return 0;
}