summaryrefslogtreecommitdiff
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
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
-rw-r--r--drivers/dahdi/dahdi-base.c16
-rw-r--r--drivers/dahdi/dahdi_dummy.c2
-rw-r--r--drivers/dahdi/dahdi_dynamic.c36
-rw-r--r--drivers/dahdi/dahdi_dynamic_eth.c16
-rw-r--r--drivers/dahdi/dahdi_dynamic_loc.c14
-rw-r--r--drivers/dahdi/dahdi_echocan_kb1.c2
-rw-r--r--drivers/dahdi/dahdi_echocan_mg2.c2
-rw-r--r--drivers/dahdi/dahdi_echocan_sec.c2
-rw-r--r--drivers/dahdi/dahdi_echocan_sec2.c2
-rw-r--r--drivers/dahdi/dahdi_transcode.c26
-rw-r--r--drivers/dahdi/hpec/dahdi_echocan_hpec.c4
-rw-r--r--drivers/dahdi/pciradio.c50
-rw-r--r--drivers/dahdi/tor2.c78
-rw-r--r--drivers/dahdi/voicebus.c8
-rw-r--r--drivers/dahdi/wcfxo.c58
-rw-r--r--drivers/dahdi/wct1xxp.c48
-rw-r--r--drivers/dahdi/wct4xxp/base.c304
-rw-r--r--drivers/dahdi/wct4xxp/vpm450m.c34
-rw-r--r--drivers/dahdi/wctc4xxp/base.c91
-rw-r--r--drivers/dahdi/wctdm.c218
-rw-r--r--drivers/dahdi/wctdm24xxp/GpakApi.c6
-rw-r--r--drivers/dahdi/wctdm24xxp/GpakCust.c8
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c339
-rw-r--r--drivers/dahdi/wcte11xp.c88
-rw-r--r--drivers/dahdi/wcte12xp/base.c4
-rw-r--r--drivers/dahdi/wcte12xp/vpmadt032.c13
-rw-r--r--drivers/dahdi/wcte12xp/wcte12xp.h4
-rw-r--r--drivers/dahdi/xpp/card_fxs.c6
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c12
-rw-r--r--drivers/dahdi/xpp/xproto.c6
30 files changed, 754 insertions, 743 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 5d5e195..345a49f 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -1677,8 +1677,8 @@ static int dahdi_xmit(hdlc_device *hdlc, struct sk_buff *skb)
#ifdef CONFIG_DAHDI_DEBUG
module_printk(KERN_NOTICE, "Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf);
for (x=0;x<ss->writen[oldbuf];x++)
- printk("%02x ", ss->writebuf[oldbuf][x]);
- printk("\n");
+ module_printk(KERN_DEBUG,"%02x ", ss->writebuf[oldbuf][x]);
+ module_printk(KERN_DEBUG "\n");
#endif
retval = 0;
/* Free the SKB */
@@ -1778,8 +1778,8 @@ static int dahdi_ppp_xmit(struct ppp_channel *ppp, struct sk_buff *skb)
#ifdef CONFIG_DAHDI_DEBUG
module_printk(KERN_NOTICE, "Buffered %d bytes (skblen = %d) to go out in buffer %d\n", ss->writen[oldbuf], skb->len, oldbuf);
for (x=0;x<ss->writen[oldbuf];x++)
- printk("%02x ", ss->writebuf[oldbuf][x]);
- printk("\n");
+ module_printk(KERN_DEBUG, "%02x ", ss->writebuf[oldbuf][x]);
+ module_printk(KERN_DEBUG, "\n");
#endif
retval = 1;
}
@@ -1906,8 +1906,8 @@ static ssize_t dahdi_chan_read(struct file *file, char *usrbuf, size_t count, in
myamnt = chan->readn[res];
module_printk(KERN_NOTICE, "dahdi_chan_read(unit: %d, inwritebuf: %d, outwritebuf: %d amnt: %d\n",
unit, chan->inwritebuf, chan->outwritebuf, myamnt);
- printk("\t("); for (x = 0; x < myamnt; x++) printk((x ? " %02x" : "%02x"), (unsigned char)usrbuf[x]);
- printk(")\n");
+ module_printk(KERN_DEBUG, "\t("); for (x = 0; x < myamnt; x++) module_printk((KERN_DEBUG, x ? " %02x" : "%02x"), (unsigned char)usrbuf[x]);
+ module_printk(KERN_DEBUG, ")\n");
}
#endif
/* end addition */
@@ -2019,8 +2019,8 @@ static ssize_t dahdi_chan_write(struct file *file, const char *usrbuf, size_t co
int x;
module_printk(KERN_NOTICE, "dahdi_chan_write/in(unit: %d, res: %d, outwritebuf: %d amnt: %d, txdisable: %d)\n",
unit, res, chan->outwritebuf, amnt, chan->txdisable);
- printk("\t("); for (x = 0; x < amnt; x++) printk((x ? " %02x" : "%02x"), (unsigned char)usrbuf[x]);
- printk(")\n");
+ module_printk(KERN_DEBUG, "\t("); for (x = 0; x < amnt; x++) module_printk(KERN_DEBUG, (x ? " %02x" : "%02x"), (unsigned char)usrbuf[x]);
+ module_printk(KERN_DEBUG, ")\n");
}
#endif
diff --git a/drivers/dahdi/dahdi_dummy.c b/drivers/dahdi/dahdi_dummy.c
index 2e19959..c6f5955 100644
--- a/drivers/dahdi/dahdi_dummy.c
+++ b/drivers/dahdi/dahdi_dummy.c
@@ -321,7 +321,7 @@ void cleanup_module(void)
dahdi_unregister(&ztd->span);
kfree(ztd);
if (debug)
- printk("ztdummy: cleanup() finished\n");
+ printk(KERN_DEBUG "ztdummy: cleanup() finished\n");
}
diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c
index 44d43ec..729de00 100644
--- a/drivers/dahdi/dahdi_dynamic.c
+++ b/drivers/dahdi/dahdi_dynamic.c
@@ -157,9 +157,9 @@ static void checkmaster(void)
master->master = 1;
spin_unlock_irqrestore(&dlock, flags);
if (master)
- printk("TDMoX: New master: %s\n", master->span.name);
+ printk(KERN_INFO "TDMoX: New master: %s\n", master->span.name);
else
- printk("TDMoX: No master.\n");
+ printk(KERN_INFO "TDMoX: No master.\n");
}
static void ztd_sendmessage(struct dahdi_dynamic *z)
@@ -291,7 +291,7 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
spin_unlock_irqrestore(&dlock, flags);
newerr = ERR_LEN;
if (newerr != ztd->err) {
- printk("Span %s: Insufficient samples for header (only %d)\n", span->name, msglen);
+ printk(KERN_NOTICE "Span %s: Insufficient samples for header (only %d)\n", span->name, msglen);
}
ztd->err = newerr;
return;
@@ -302,7 +302,7 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
spin_unlock_irqrestore(&dlock, flags);
newerr = ERR_NSAMP | msg[0];
if (newerr != ztd->err) {
- printk("Span %s: Expected %d samples, but receiving %d\n", span->name, DAHDI_CHUNKSIZE, msg[0]);
+ printk(KERN_NOTICE "Span %s: Expected %d samples, but receiving %d\n", span->name, DAHDI_CHUNKSIZE, msg[0]);
}
ztd->err = newerr;
return;
@@ -320,7 +320,7 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
spin_unlock_irqrestore(&dlock, flags);
newerr = ERR_NCHAN | nchans;
if (newerr != ztd->err) {
- printk("Span %s: Expected %d channels, but receiving %d\n", span->name, span->channels, nchans);
+ printk(KERN_NOTICE "Span %s: Expected %d channels, but receiving %d\n", span->name, span->channels, nchans);
}
ztd->err = newerr;
return;
@@ -345,7 +345,7 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
spin_unlock_irqrestore(&dlock, flags);
newerr = ERR_LEN | xlen;
if (newerr != ztd->err) {
- printk("Span %s: Expected message size %d, but was %d instead\n", span->name, xlen, msglen);
+ printk(KERN_NOTICE "Span %s: Expected message size %d, but was %d instead\n", span->name, xlen, msglen);
}
ztd->err = newerr;
return;
@@ -402,7 +402,7 @@ void dahdi_dynamic_receive(struct dahdi_span *span, unsigned char *msg, int msgl
/* note if we had a missing packet */
if (rxpos != rxcnt)
- printk("Span %s: Expected seq no %d, but received %d instead\n", span->name, rxcnt, rxpos);
+ printk(KERN_NOTICE "Span %s: Expected seq no %d, but received %d instead\n", span->name, rxcnt, rxpos);
/* If this is our master span, then run everything */
if (master)
@@ -472,7 +472,7 @@ static int destroy_dynamic(struct dahdi_dynamic_span *zds)
/* Don't destroy span until it is in use */
if (z->usecount) {
spin_unlock_irqrestore(&dlock, flags);
- printk("Attempt to destroy dynamic span while it is in use\n");
+ printk(KERN_NOTICE "Attempt to destroy dynamic span while it is in use\n");
return -EBUSY;
}
/* Unlink it */
@@ -512,7 +512,7 @@ static int ztd_open(struct dahdi_chan *chan)
z->usecount++;
}
if(!try_module_get(THIS_MODULE))
- printk("TDMoX: Unable to increment module use count\n");
+ printk(KERN_NOTICE "TDMoX: Unable to increment module use count\n");
return 0;
}
@@ -542,11 +542,11 @@ static int create_dynamic(struct dahdi_dynamic_span *zds)
int bufsize;
if (zds->numchans < 1) {
- printk("Can't be less than 1 channel (%d)!\n", zds->numchans);
+ printk(KERN_NOTICE "Can't be less than 1 channel (%d)!\n", zds->numchans);
return -EINVAL;
}
if (zds->numchans >= DAHDI_DYNAMIC_MAX_CHANS) {
- printk("Can't create dynamic span with greater than %d channels. See ztdynamic.c and increase DAHDI_DYNAMIC_MAX_CHANS\n", zds->numchans);
+ printk(KERN_NOTICE "Can't create dynamic span with greater than %d channels. See ztdynamic.c and increase DAHDI_DYNAMIC_MAX_CHANS\n", zds->numchans);
return -EINVAL;
}
@@ -636,7 +636,7 @@ static int create_dynamic(struct dahdi_dynamic_span *zds)
/* Another race -- should let the module get unloaded while we
have it here */
if (!ztd) {
- printk("No such driver '%s' for dynamic span\n", zds->driver);
+ printk(KERN_NOTICE "No such driver '%s' for dynamic span\n", zds->driver);
dynamic_destroy(z);
return -EINVAL;
}
@@ -644,7 +644,7 @@ static int create_dynamic(struct dahdi_dynamic_span *zds)
/* Create the stuff */
z->pvt = ztd->create(&z->span, z->addr);
if (!z->pvt) {
- printk("Driver '%s' (%s) rejected address '%s'\n", ztd->name, ztd->desc, z->addr);
+ printk(KERN_NOTICE "Driver '%s' (%s) rejected address '%s'\n", ztd->name, ztd->desc, z->addr);
/* Creation failed */
return -EINVAL;
}
@@ -654,7 +654,7 @@ static int create_dynamic(struct dahdi_dynamic_span *zds)
/* Whee! We're created. Now register the span */
if (dahdi_register(&z->span, 0)) {
- printk("Unable to register span '%s'\n", z->span.name);
+ printk(KERN_NOTICE "Unable to register span '%s'\n", z->span.name);
dynamic_destroy(z);
return -EINVAL;
}
@@ -700,7 +700,7 @@ static int ztdynamic_ioctl(unsigned int cmd, unsigned long data)
if (copy_from_user(&zds, (struct dahdi_dynamic_span *)data, sizeof(zds)))
return -EFAULT;
if (debug)
- printk("Dynamic Create\n");
+ printk(KERN_DEBUG "Dynamic Create\n");
res = create_dynamic(&zds);
if (res < 0)
return res;
@@ -713,7 +713,7 @@ static int ztdynamic_ioctl(unsigned int cmd, unsigned long data)
if (copy_from_user(&zds, (struct dahdi_dynamic_span *)data, sizeof(zds)))
return -EFAULT;
if (debug)
- printk("Dynamic Destroy\n");
+ printk(KERN_DEBUG "Dynamic Destroy\n");
return destroy_dynamic(&zds);
}
@@ -822,7 +822,7 @@ int ztdynamic_init(void)
#ifdef ENABLE_TASKLETS
tasklet_init(&ztd_tlet, ztd_tasklet, 0);
#endif
- printk("DAHDI Dynamic Span support LOADED\n");
+ printk(KERN_INFO "DAHDI Dynamic Span support LOADED\n");
return 0;
}
@@ -836,7 +836,7 @@ void ztdynamic_cleanup(void)
#endif
dahdi_set_dynamic_ioctl(NULL);
del_timer(&alarmcheck);
- printk("DAHDI Dynamic Span support unloaded\n");
+ printk(KERN_INFO "DAHDI Dynamic Span support unloaded\n");
}
module_param(debug, int, 0600);
diff --git a/drivers/dahdi/dahdi_dynamic_eth.c b/drivers/dahdi/dahdi_dynamic_eth.c
index fd4a95f..7834ed5 100644
--- a/drivers/dahdi/dahdi_dynamic_eth.c
+++ b/drivers/dahdi/dahdi_dynamic_eth.c
@@ -290,7 +290,7 @@ static void ztdeth_destroy(void *pvt)
}
spin_unlock_irqrestore(&zlock, flags);
if (cur == z) { /* Successfully removed */
- printk("TDMoE: Removed interface for %s\n", z->span->name);
+ printk(KERN_INFO "TDMoE: Removed interface for %s\n", z->span->name);
kfree(z);
module_put(THIS_MODULE);
}
@@ -317,7 +317,7 @@ static void *ztdeth_create(struct dahdi_span *span, char *addr)
tmp2++;
dahdi_copy_string(z->ethdev, tmp, sizeof(z->ethdev));
} else {
- printk("Invalid TDMoE address (no device) '%s'\n", addr);
+ printk(KERN_NOTICE "Invalid TDMoE address (no device) '%s'\n", addr);
kfree(z);
return NULL;
}
@@ -345,12 +345,12 @@ static void *ztdeth_create(struct dahdi_span *span, char *addr)
tmp3 = strchr(tmp2, ':');
}
if (x != 6) {
- printk("TDMoE: Invalid MAC address in: %s\n", addr);
+ printk(KERN_NOTICE "TDMoE: Invalid MAC address in: %s\n", addr);
kfree(z);
return NULL;
}
} else {
- printk("TDMoE: Missing MAC address\n");
+ printk(KERN_NOTICE "TDMoE: Missing MAC address\n");
kfree(z);
return NULL;
}
@@ -364,7 +364,7 @@ static void *ztdeth_create(struct dahdi_span *span, char *addr)
if (*tmp3 >= '0' && *tmp3 <= '9') {
sub += (*tmp3 - '0') * mul;
} else {
- printk("TDMoE: Invalid subaddress\n");
+ printk(KERN_NOTICE "TDMoE: Invalid subaddress\n");
kfree(z);
return NULL;
}
@@ -379,7 +379,7 @@ static void *ztdeth_create(struct dahdi_span *span, char *addr)
#endif
z->ethdev);
if (!z->dev) {
- printk("TDMoE: Invalid device '%s'\n", z->ethdev);
+ printk(KERN_NOTICE "TDMoE: Invalid device '%s'\n", z->ethdev);
kfree(z);
return NULL;
}
@@ -388,14 +388,14 @@ static void *ztdeth_create(struct dahdi_span *span, char *addr)
for (x=0;x<5;x++)
sprintf(src + strlen(src), "%02x:", z->dev->dev_addr[x]);
sprintf(src + strlen(src), "%02x", z->dev->dev_addr[5]);
- printk("TDMoE: Added new interface for %s at %s (addr=%s, src=%s, subaddr=%d)\n", span->name, z->dev->name, addr, src, ntohs(z->subaddr));
+ printk(KERN_INFO "TDMoE: Added new interface for %s at %s (addr=%s, src=%s, subaddr=%d)\n", span->name, z->dev->name, addr, src, ntohs(z->subaddr));
spin_lock_irqsave(&zlock, flags);
z->next = zdevs;
zdevs = z;
spin_unlock_irqrestore(&zlock, flags);
if(!try_module_get(THIS_MODULE))
- printk("TDMoE: Unable to increment module use count\n");
+ printk(KERN_DEBUG "TDMoE: Unable to increment module use count\n");
}
return z;
}
diff --git a/drivers/dahdi/dahdi_dynamic_loc.c b/drivers/dahdi/dahdi_dynamic_loc.c
index 4b74f66..b37d6cf 100644
--- a/drivers/dahdi/dahdi_dynamic_loc.c
+++ b/drivers/dahdi/dahdi_dynamic_loc.c
@@ -152,7 +152,7 @@ static int digit2int(char d)
}
spin_unlock_irqrestore(&zlock, flags);
if (cur == z) {
- printk("TDMoL: Removed interface for %s, key %d id %d\n", z->span->name, z->key, z->id);
+ printk(KERN_INFO "TDMoL: Removed interface for %s, key %d id %d\n", z->span->name, z->key, z->id);
module_put(THIS_MODULE);
kfree(z);
}
@@ -194,12 +194,12 @@ static int digit2int(char d)
for (l = zdevs; l; l = l->next)
if (l->key == z->key) {
if (l->id == z->id) {
- printk ("TDMoL: Duplicate id (%d) for key %d\n", z->id, z->key);
+ printk(KERN_DEBUG "TDMoL: Duplicate id (%d) for key %d\n", z->id, z->key);
goto CLEAR_AND_DEL_FROM_PEERS;
}
if (monitor == -1) {
if (l->peer) {
- printk ("TDMoL: Span with key %d and id %d already has a R/W peer\n", z->key, z->id);
+ printk(KERN_DEBUG "TDMoL: Span with key %d and id %d already has a R/W peer\n", z->key, z->id);
goto CLEAR_AND_DEL_FROM_PEERS;
} else {
l->peer = z;
@@ -208,7 +208,7 @@ static int digit2int(char d)
}
if (monitor == l->id) {
if (l->monitor_rx_peer) {
- printk ("TDMoL: Span with key %d and id %d already has a monitoring peer\n", z->key, z->id);
+ printk(KERN_DEBUG "TDMoL: Span with key %d and id %d already has a monitoring peer\n", z->key, z->id);
goto CLEAR_AND_DEL_FROM_PEERS;
} else {
l->monitor_rx_peer = z;
@@ -219,9 +219,9 @@ static int digit2int(char d)
zdevs = z;
spin_unlock_irqrestore(&zlock, flags);
if(!try_module_get(THIS_MODULE))
- printk("TDMoL: Unable to increment module use count\n");
+ printk(KERN_DEBUG "TDMoL: Unable to increment module use count\n");
- printk("TDMoL: Added new interface for %s, key %d id %d\n", span->name, z->key, z->id);
+ printk(KERN_INFO "TDMoL: Added new interface for %s, key %d id %d\n", span->name, z->key, z->id);
}
return z;
@@ -236,7 +236,7 @@ CLEAR_AND_DEL_FROM_PEERS:
return NULL;
INVALID_ADDRESS:
- printk ("TDMoL: Invalid address %s\n", address);
+ printk (KERN_NOTICE "TDMoL: Invalid address %s\n", address);
return NULL;
}
diff --git a/drivers/dahdi/dahdi_echocan_kb1.c b/drivers/dahdi/dahdi_echocan_kb1.c
index 391ca51..5e52598 100644
--- a/drivers/dahdi/dahdi_echocan_kb1.c
+++ b/drivers/dahdi/dahdi_echocan_kb1.c
@@ -37,7 +37,7 @@ static int debug;
static int aggressive;
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
/* Uncomment to provide summary statistics for overall echo can performance every 4000 samples */
/* #define MEC2_STATS 4000 */
diff --git a/drivers/dahdi/dahdi_echocan_mg2.c b/drivers/dahdi/dahdi_echocan_mg2.c
index 9c7d8c6..111d542 100644
--- a/drivers/dahdi/dahdi_echocan_mg2.c
+++ b/drivers/dahdi/dahdi_echocan_mg2.c
@@ -344,7 +344,7 @@ static inline void init_cc(struct echo_can_state *ec, int N, int maxy, int maxu)
static void echo_can_free(struct echo_can_state *ec)
{
#if defined(DC_NORMALIZE) && defined(MEC2_DCBIAS_MESSAGE)
- printk("EC: DC bias calculated: %d V\n", ec->dc_estimate >> 15);
+ printk(KERN_INFO "EC: DC bias calculated: %d V\n", ec->dc_estimate >> 15);
#endif
kfree(ec);
}
diff --git a/drivers/dahdi/dahdi_echocan_sec.c b/drivers/dahdi/dahdi_echocan_sec.c
index dd0a7f4..52037da 100644
--- a/drivers/dahdi/dahdi_echocan_sec.c
+++ b/drivers/dahdi/dahdi_echocan_sec.c
@@ -50,7 +50,7 @@
static int debug;
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "arith.h"
diff --git a/drivers/dahdi/dahdi_echocan_sec2.c b/drivers/dahdi/dahdi_echocan_sec2.c
index 399d714..620bacf 100644
--- a/drivers/dahdi/dahdi_echocan_sec2.c
+++ b/drivers/dahdi/dahdi_echocan_sec2.c
@@ -49,7 +49,7 @@
static int debug;
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "fir.h"
diff --git a/drivers/dahdi/dahdi_transcode.c b/drivers/dahdi/dahdi_transcode.c
index 2d50138..ad222bc 100644
--- a/drivers/dahdi/dahdi_transcode.c
+++ b/drivers/dahdi/dahdi_transcode.c
@@ -113,7 +113,7 @@ int dahdi_transcoder_register(struct dahdi_transcoder *tc)
tc->next = trans;
trans = tc;
- printk("Registered codec translator '%s' with %d transcoders (srcs=%08x, dsts=%08x)\n",
+ printk(KERN_INFO "Registered codec translator '%s' with %d transcoders (srcs=%08x, dsts=%08x)\n",
tc->name, tc->numchannels, tc->srcfmts, tc->dstfmts);
res = 0;
spin_unlock(&translock);
@@ -143,7 +143,7 @@ int dahdi_transcoder_unregister(struct dahdi_transcoder *tc)
else
trans = tc->next;
tc->next = NULL;
- printk("Unregistered codec translator '%s' with %d transcoders (srcs=%08x, dsts=%08x)\n",
+ printk(KERN_INFO "Unregistered codec translator '%s' with %d transcoders (srcs=%08x, dsts=%08x)\n",
tc->name, tc->numchannels, tc->srcfmts, tc->dstfmts);
res = 0;
spin_unlock(&translock);
@@ -155,7 +155,7 @@ int dahdi_transcoder_unregister(struct dahdi_transcoder *tc)
int dahdi_transcoder_alert(struct dahdi_transcoder_channel *ztc)
{
if (debug)
- printk("DAHDI Transcoder Alert!\n");
+ printk(KERN_DEBUG "DAHDI Transcoder Alert!\n");
if (ztc->tch)
ztc->tch->status &= ~DAHDI_TC_FLAG_BUSY;
wake_up_interruptible(&ztc->ready);
@@ -182,7 +182,7 @@ static int dahdi_tc_open(struct inode *inode, struct file *file)
ztc->flags = DAHDI_TC_FLAG_TRANSIENT | DAHDI_TC_FLAG_BUSY;
ztc->tch = zth;
if (debug)
- printk("Allocated Transcoder Channel, header is at %p!\n", zth);
+ printk(KERN_DEBUG "Allocated Transcoder Channel, header is at %p!\n", zth);
zth->magic = DAHDI_TRANSCODE_MAGIC;
file->private_data = ztc;
for (page = virt_to_page(zth);
@@ -216,7 +216,7 @@ static void ztc_release(struct dahdi_transcoder_channel *ztc)
if (ztc->flags & DAHDI_TC_FLAG_TRANSIENT)
kfree(ztc);
if (debug)
- printk("Released Transcoder!\n");
+ printk(KERN_DEBUG "Released Transcoder!\n");
}
static int dahdi_tc_release(struct inode *inode, struct file *file)
@@ -327,7 +327,7 @@ static int dahdi_tc_ioctl(struct inode *inode, struct file *file, unsigned int c
return -EFAULT;
if (debug)
- printk("DAHDI Transcode ioctl op = %d!\n", op);
+ printk(KERN_DEBUG "DAHDI Transcode ioctl op = %d!\n", op);
switch(op) {
case DAHDI_TCOP_GETINFO:
@@ -377,13 +377,13 @@ static int dahdi_tc_mmap(struct file *file, struct vm_area_struct *vma)
/* Do not allow an offset */
if (vma->vm_pgoff) {
if (debug)
- printk("zttranscode: Attempted to mmap with offset!\n");
+ printk(KERN_DEBUG "zttranscode: Attempted to mmap with offset!\n");
return -EINVAL;
}
if ((vma->vm_end - vma->vm_start) != sizeof(struct dahdi_transcode_header)) {
if (debug)
- printk("zttranscode: Attempted to mmap with size %d != %zd!\n", (int) (vma->vm_end - vma->vm_start), sizeof(struct dahdi_transcode_header));
+ printk(KERN_DEBUG "zttranscode: Attempted to mmap with size %d != %zd!\n", (int) (vma->vm_end - vma->vm_start), sizeof(struct dahdi_transcode_header));
return -EINVAL;
}
@@ -399,12 +399,12 @@ static int dahdi_tc_mmap(struct file *file, struct vm_area_struct *vma)
#endif
if (res) {
if (debug)
- printk("zttranscode: remap failed!\n");
+ printk(KERN_DEBUG "zttranscode: remap failed!\n");
return -EAGAIN;
}
if (debug)
- printk("zttranscode: successfully mapped transcoder!\n");
+ printk(KERN_DEBUG "zttranscode: successfully mapped transcoder!\n");
return 0;
}
@@ -445,7 +445,7 @@ int dahdi_transcode_init(void)
int res;
if (dahdi_transcode_fops) {
- printk("Whoa, dahdi_transcode_fops already set?!\n");
+ printk(KERN_NOTICE "Whoa, dahdi_transcode_fops already set?!\n");
return -EBUSY;
}
@@ -454,7 +454,7 @@ int dahdi_transcode_init(void)
if ((res = dahdi_register_chardev(&transcode_chardev)))
return res;
- printk("DAHDI Transcoder support loaded\n");
+ printk(KERN_INFO "DAHDI Transcoder support loaded\n");
return 0;
}
@@ -465,7 +465,7 @@ void dahdi_transcode_cleanup(void)
dahdi_transcode_fops = NULL;
- printk("DAHDI Transcoder support unloaded\n");
+ printk(KERN_INFO "DAHDI Transcoder support unloaded\n");
}
module_param(debug, int, S_IRUGO | S_IWUSR);
diff --git a/drivers/dahdi/hpec/dahdi_echocan_hpec.c b/drivers/dahdi/hpec/dahdi_echocan_hpec.c
index 5da8c8c..eb0689d 100644
--- a/drivers/dahdi/hpec/dahdi_echocan_hpec.c
+++ b/drivers/dahdi/hpec/dahdi_echocan_hpec.c
@@ -31,7 +31,7 @@
static int debug;
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
#include "hpec_user.h"
#include "hpec.h"
@@ -51,7 +51,7 @@ static int __attribute__((regparm(0))) __attribute__((format (printf, 1, 2))) lo
va_start(args, format);
res = vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
- printk(buf);
+ printk(KERN_INFO "%s" buf);
#endif
return res;
diff --git a/drivers/dahdi/pciradio.c b/drivers/dahdi/pciradio.c
index 03ff4a8..007d71e 100644
--- a/drivers/dahdi/pciradio.c
+++ b/drivers/dahdi/pciradio.c
@@ -745,13 +745,13 @@ DAHDI_IRQ_HANDLER(pciradio_interrupt)
if (ints & 0x10) {
/* Stop DMA, wait for watchdog */
- printk("RADIO PCI Master abort\n");
+ printk(KERN_INFO "RADIO PCI Master abort\n");
pciradio_stop_dma(rad);
return IRQ_RETVAL(1);
}
if (ints & 0x20) {
- printk("RADIO PCI Target abort\n");
+ printk(KERN_INFO "RADIO PCI Target abort\n");
return IRQ_RETVAL(1);
}
@@ -906,14 +906,14 @@ DAHDI_IRQ_HANDLER(pciradio_interrupt)
if (debug)
{
if (rad->present_code[x])
- printk("Chan %d got rx (ctcss code %d)\n",x + 1,
+ printk(KERN_DEBUG "Chan %d got rx (ctcss code %d)\n",x + 1,
cttable_rx[rad->rxcode[x][rad->present_code[x]]].code);
else
- printk("Chan %d got rx\n",x + 1);
+ printk(KERN_DEBUG "Chan %d got rx\n",x + 1);
}
dahdi_hooksig(&rad->chans[x],DAHDI_RXSIG_OFFHOOK);
} else {
- if (debug) printk("Chan %d lost rx\n",x + 1);
+ if (debug) printk(KERN_DEBUG "Chan %d lost rx\n",x + 1);
dahdi_hooksig(&rad->chans[x],DAHDI_RXSIG_ONHOOK);
}
rad->encdec.req[x] = 1;
@@ -1426,7 +1426,7 @@ static int pciradio_open(struct dahdi_chan *chan)
static int pciradio_watchdog(struct dahdi_span *span, int event)
{
- printk("PCI RADIO: Restarting DMA\n");
+ printk(KERN_INFO "PCI RADIO: Restarting DMA\n");
pciradio_restart_dma(span->pvt);
return 0;
}
@@ -1454,11 +1454,11 @@ static int pciradio_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
rad->gottx[chan->chanpos - 1] = 0;
break;
default:
- printk("pciradio: Can't set tx state to %d\n", txsig);
+ printk(KERN_DEBUG "pciradio: Can't set tx state to %d\n", txsig);
break;
}
if (debug)
- printk("pciradio: Setting Radio hook state to %d on chan %d\n", txsig, chan->chanpos);
+ printk(KERN_DEBUG "pciradio: Setting Radio hook state to %d on chan %d\n", txsig, chan->chanpos);
return 0;
}
@@ -1491,7 +1491,7 @@ static int pciradio_initialize(struct pciradio *rad)
rad->span.pvt = rad;
if (dahdi_register(&rad->span, 0)) {
- printk("Unable to register span with DAHDI\n");
+ printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;
}
return 0;
@@ -1539,10 +1539,10 @@ unsigned long endjif;
endjif = jiffies + 10;
while (inb(rad->ioaddr + RAD_AUXR) & (XINIT | XDONE) && (jiffies <= endjif));
if (endjif < jiffies) {
- printk("Timeout waiting for INIT and DONE to go low\n");
+ printk(KERN_DEBUG "Timeout waiting for INIT and DONE to go low\n");
return -1;
}
- if (debug) printk("fwload: Init and done gone to low\n");
+ if (debug) printk(KERN_DEBUG "fwload: Init and done gone to low\n");
/* De-assert PGM */
rad->ios |= XPGM;
outb(rad->ios, rad->ioaddr + RAD_AUXD);
@@ -1550,10 +1550,10 @@ unsigned long endjif;
endjif = jiffies + 10;
while (!(inb(rad->ioaddr + RAD_AUXR) & XINIT) && (jiffies <= endjif));
if (endjif < jiffies) {
- printk("Timeout waiting for INIT to go high\n");
+ printk(KERN_DEBUG "Timeout waiting for INIT to go high\n");
return -1;
}
- if (debug) printk("fwload: Init went high (clearing done)\nNow loading...\n");
+ if (debug) printk(KERN_DEBUG "fwload: Init went high (clearing done)\nNow loading...\n");
/* Assert CS+Write */
rad->ios &= ~XCS;
outb(rad->ios, rad->ioaddr + RAD_AUXD);
@@ -1566,33 +1566,33 @@ unsigned long endjif;
/* if INIT drops, we're screwed, exit */
if (!(inb(rad->ioaddr + RAD_AUXR) & XINIT)) break;
}
- if (debug) printk("fwload: Transferred %d bytes into chip\n",x);
+ if (debug) printk(KERN_DEBUG "fwload: Transferred %d bytes into chip\n",x);
/* Wait for FIFO to clear */
endjif = jiffies + 2;
while (jiffies < endjif); /* wait */
- printk("Transfered %d bytes into chip\n",x);
+ printk(KERN_DEBUG "Transfered %d bytes into chip\n",x);
/* De-assert CS+Write */
rad->ios |= XCS;
outb(rad->ios, rad->ioaddr + RAD_AUXD);
- if (debug) printk("fwload: Loading done!\n");
+ if (debug) printk(KERN_INFO "fwload: Loading done!\n");
/* Wait for FIFO to clear */
endjif = jiffies + 2;
while (jiffies < endjif); /* wait */
if (!(inb(rad->ioaddr + RAD_AUXR) & XINIT))
{
- printk("Drove Init low!! CRC Error!!!\n");
+ printk(KERN_NOTICE "Drove Init low!! CRC Error!!!\n");
return -1;
}
if (!(inb(rad->ioaddr + RAD_AUXR) & XDONE))
{
- printk("Did not get DONE signal. Short file maybe??\n");
+ printk(KERN_INFO "Did not get DONE signal. Short file maybe??\n");
return -1;
}
wait_just_a_bit(2);
/* get the thingy started */
outb(0,rad->ioaddr + RAD_REGBASE);
outb(0,rad->ioaddr + RAD_REGBASE);
- printk("Xilinx Chip successfully loaded, configured and started!!\n");
+ printk(KERN_INFO "Xilinx Chip successfully loaded, configured and started!!\n");
wait_just_a_bit(HZ/4);
@@ -1706,7 +1706,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
for (x=0;x<RAD_MAX_IFACES;x++)
if (!ifaces[x]) break;
if (x >= RAD_MAX_IFACES) {
- printk("Too many interfaces\n");
+ printk(KERN_NOTICE "Too many interfaces\n");
return -EIO;
}
@@ -1734,7 +1734,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
32 bits. Allocate an extra set just for control too */
rad->writechunk = pci_alloc_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
if (!rad->writechunk) {
- printk("pciradio: Unable to allocate DMA-able memory\n");
+ printk(KERN_NOTICE "pciradio: Unable to allocate DMA-able memory\n");
if (rad->freeregion)
release_region(rad->ioaddr, 0xff);
return -ENOMEM;
@@ -1744,7 +1744,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
rad->readdma = rad->writedma + DAHDI_MAX_CHUNKSIZE * 8; /* in bytes */
if (pciradio_initialize(rad)) {
- printk("pciradio: Unable to intialize\n");
+ printk(KERN_INFO "pciradio: Unable to intialize\n");
/* Set Reset Low */
x=inb(rad->ioaddr + RAD_CNTL);
outb((~0x1)&x, rad->ioaddr + RAD_CNTL);
@@ -1788,7 +1788,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
}
if (request_irq(pdev->irq, pciradio_interrupt, DAHDI_IRQ_SHARED, "pciradio", rad)) {
- printk("pciradio: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "pciradio: Unable to request IRQ %d\n", pdev->irq);
if (rad->freeregion)
release_region(rad->ioaddr, 0xff);
pci_free_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, (void *)rad->writechunk, rad->writedma);
@@ -1804,7 +1804,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
/* Start DMA */
pciradio_start_dma(rad);
- printk("Found a PCI Radio Card\n");
+ printk(KERN_INFO "Found a PCI Radio Card\n");
res = 0;
} else
res = -ENOMEM;
@@ -1818,7 +1818,7 @@ static void pciradio_release(struct pciradio *rad)
if (rad->freeregion)
release_region(rad->ioaddr, 0xff);
kfree(rad);
- printk("Freed a PCI RADIO card\n");
+ printk(KERN_INFO "Freed a PCI RADIO card\n");
}
static void __devexit pciradio_remove_one(struct pci_dev *pdev)
diff --git a/drivers/dahdi/tor2.c b/drivers/dahdi/tor2.c
index 6f0943e..ddb0fac 100644
--- a/drivers/dahdi/tor2.c
+++ b/drivers/dahdi/tor2.c
@@ -200,7 +200,7 @@ static int tor2_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
struct tor2_span *p = span->pvt;
if (debug)
- printk("Tor2: Configuring span %d\n", span->spanno);
+ printk(KERN_INFO "Tor2: Configuring span %d\n", span->spanno);
span->syncsrc = p->tor->syncsrc;
@@ -233,9 +233,9 @@ static int tor2_chanconfig(struct dahdi_chan *chan, int sigtype)
alreadyrunning = chan->span->flags & DAHDI_FLAG_RUNNING;
if (debug) {
if (alreadyrunning)
- printk("Tor2: Reconfigured channel %d (%s) sigtype %d\n", chan->channo, chan->name, sigtype);
+ printk(KERN_INFO "Tor2: Reconfigured channel %d (%s) sigtype %d\n", chan->channo, chan->name, sigtype);
else
- printk("Tor2: Configured channel %d (%s) sigtype %d\n", chan->channo, chan->name, sigtype);
+ printk(KERN_INFO "Tor2: Configured channel %d (%s) sigtype %d\n", chan->channo, chan->name, sigtype);
}
/* nothing more to do if an E1 */
if (p->tor->cardtype == TYPE_E1) return 0;
@@ -312,7 +312,7 @@ static int __devinit tor2_launch(struct tor2 *tor)
{
if (tor->spans[0].flags & DAHDI_FLAG_REGISTERED)
return 0;
- printk("Tor2: Launching card: %d\n", tor->order);
+ printk(KERN_INFO "Tor2: Launching card: %d\n", tor->order);
if (dahdi_register(&tor->spans[0], 0)) {
printk(KERN_ERR "Unable to register span %s\n", tor->spans[0].name);
return -1;
@@ -424,14 +424,14 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
goto err_out_release_plx_region;
}
pci_set_drvdata(pdev, tor);
- printk("Detected %s at 0x%lx/0x%lx irq %d\n", tor->type,
+ printk(KERN_INFO "Detected %s at 0x%lx/0x%lx irq %d\n", tor->type,
tor->xilinx32_region, tor->xilinx8_region,tor->irq);
for (x = 0; x < MAX_TOR_CARDS; x++) {
if (!cards[x]) break;
}
if (x >= MAX_TOR_CARDS) {
- printk("No cards[] slot available!!\n");
+ printk(KERN_DEBUG "No cards[] slot available!!\n");
goto err_out_release_all;
}
tor->num = x;
@@ -452,21 +452,21 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
while (le32_to_cpu(*gpdata_io) & (GPIO_INIT | GPIO_DONE) && (jiffies <= endjif));
if (endjif < jiffies) {
- printk("Timeout waiting for INIT and DONE to go low\n");
+ printk(KERN_DEBUG "Timeout waiting for INIT and DONE to go low\n");
goto err_out_release_all;
}
- if (debug) printk("fwload: Init and done gone to low\n");
+ if (debug) printk(KERN_DEBUG "fwload: Init and done gone to low\n");
gpdata |= GPIO_PROGRAM;
*gpdata_io = cpu_to_le32(gpdata); /* de-activate the PROGRAM signal */
/* wait for INIT to go high (clearing done */
endjif = jiffies + 10;
while (!(le32_to_cpu(*gpdata_io) & GPIO_INIT) && (jiffies <= endjif));
if (endjif < jiffies) {
- printk("Timeout waiting for INIT to go high\n");
+ printk(KERN_DEBUG "Timeout waiting for INIT to go high\n");
goto err_out_release_all;
}
- if (debug) printk("fwload: Init went high (clearing done)\nNow loading...\n");
+ if (debug) printk(KERN_DEBUG "fwload: Init went high (clearing done)\nNow loading...\n");
/* assert WRITE signal */
gpdata &= ~GPIO_WRITE;
*gpdata_io = cpu_to_le32(gpdata);
@@ -479,29 +479,29 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
/* if INIT drops, we're screwed, exit */
if (!(le32_to_cpu(*gpdata_io) & GPIO_INIT)) break;
}
- if (debug) printk("fwload: Transferred %d bytes into chip\n",x);
+ if (debug) printk(KERN_DEBUG "fwload: Transferred %d bytes into chip\n",x);
/* Wait for FIFO to clear */
endjif = jiffies + 2;
while (jiffies < endjif); /* wait */
/* de-assert write signal */
gpdata |= GPIO_WRITE;
*gpdata_io = cpu_to_le32(gpdata);
- if (debug) printk("fwload: Loading done!\n");
+ if (debug) printk(KERN_DEBUG "fwload: Loading done!\n");
/* Wait for FIFO to clear */
endjif = jiffies + 2;
while (jiffies < endjif); /* wait */
if (!(le32_to_cpu(*gpdata_io) & GPIO_INIT))
{
- printk("Drove Init low!! CRC Error!!!\n");
+ printk(KERN_NOTICE "Drove Init low!! CRC Error!!!\n");
goto err_out_release_all;
}
if (!(le32_to_cpu(*gpdata_io) & GPIO_DONE))
{
- printk("Did not get DONE signal. Short file maybe??\n");
+ printk(KERN_DEBUG "Did not get DONE signal. Short file maybe??\n");
goto err_out_release_all;
}
- printk("Xilinx Chip successfully loaded, configured and started!!\n");
+ printk(KERN_INFO "Xilinx Chip successfully loaded, configured and started!!\n");
tor->mem8[SYNCREG] = 0;
tor->mem8[CTLREG] = 0;
@@ -537,11 +537,11 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
}
if (t1in(tor,1,0xf) & 0x80) {
- printk("Tormenta 2 Quad E1/PRA Card\n");
+ printk(KERN_INFO "Tormenta 2 Quad E1/PRA Card\n");
tor->cardtype = TYPE_E1;
tor->datxlt = datxlt_e1;
} else {
- printk("Tormenta 2 Quad T1/PRI Card\n");
+ printk(KERN_INFO "Tormenta 2 Quad T1/PRI Card\n");
tor->cardtype = TYPE_T1;
tor->datxlt = datxlt_t1;
}
@@ -558,7 +558,7 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
init_spans(tor);
tor->order = tor->mem8[SWREG];
- printk("Detected Card number: %d\n", tor->order);
+ printk(KERN_INFO "Detected Card number: %d\n", tor->order);
/* Launch cards as appropriate */
x = 0;
@@ -640,13 +640,13 @@ static struct pci_driver tor2_driver = {
static int __init tor2_init(void) {
int res;
res = dahdi_pci_module(&tor2_driver);
- printk("Registered Tormenta2 PCI\n");
+ printk(KERN_INFO "Registered Tormenta2 PCI\n");
return res;
}
static void __exit tor2_cleanup(void) {
pci_unregister_driver(&tor2_driver);
- printk("Unregistered Tormenta2\n");
+ printk(KERN_INFO "Unregistered Tormenta2\n");
}
static void set_clear(struct tor2 *tor)
@@ -661,7 +661,7 @@ static void set_clear(struct tor2 *tor)
if ((i % 8)==7) {
#if 0
- printk("Putting %d in register %02x on span %d\n",
+ printk(KERN_DEBUG "Putting %d in register %02x on span %d\n",
val, 0x39 + j, 1 + s);
#endif
t1out(tor,1 + s, 0x39 + j, val);
@@ -680,7 +680,7 @@ static int tor2_rbsbits(struct dahdi_chan *chan, int bits)
struct tor2_chan *p = chan->pvt;
unsigned long flags;
#if 0
- printk("Setting bits to %d on channel %s\n", bits, chan->name);
+ printk(KERN_DEBUG "Setting bits to %d on channel %s\n", bits, chan->name);
#endif
if (p->tor->cardtype == TYPE_E1) { /* do it E1 way */
if (chan->chanpos == 16) return 0;
@@ -752,7 +752,7 @@ static int tor2_shutdown(struct dahdi_span *span)
tspan = p->span + 1;
if (tspan < 0) {
- printk("Tor2: Span '%d' isn't us?\n", span->spanno);
+ printk(KERN_DEBUG "Tor2: Span '%d' isn't us?\n", span->spanno);
return -1;
}
@@ -778,7 +778,7 @@ static int tor2_shutdown(struct dahdi_span *span)
/* No longer in use, disable interrupts */
p->tor->mem8[CTLREG] = 0;
if (debug)
- printk("Span %d (%s) shutdown\n", span->spanno, span->name);
+ printk(KERN_DEBUG"Span %d (%s) shutdown\n", span->spanno, span->name);
return 0;
}
@@ -797,7 +797,7 @@ static int tor2_startup(struct dahdi_span *span)
tspan = p->span + 1;
if (tspan < 0) {
- printk("Tor2: Span '%d' isn't us?\n", span->spanno);
+ printk(KERN_DEBUG "Tor2: Span '%d' isn't us?\n", span->spanno);
return -1;
}
@@ -895,9 +895,9 @@ static int tor2_startup(struct dahdi_span *span)
if (debug) {
if (alreadyrunning)
- printk("Tor2: Reconfigured span %d (%s/%s%s) 120 Ohms\n", span->spanno, coding, framing, crcing);
+ printk(KERN_INFO "Tor2: Reconfigured span %d (%s/%s%s) 120 Ohms\n", span->spanno, coding, framing, crcing);
else
- printk("Tor2: Startup span %d (%s/%s%s) 120 Ohms\n", span->spanno, coding, framing, crcing);
+ printk(KERN_INFO "Tor2: Startup span %d (%s/%s%s) 120 Ohms\n", span->spanno, coding, framing, crcing);
}
} else { /* is a T1 card */
@@ -982,15 +982,15 @@ static int tor2_startup(struct dahdi_span *span)
if (debug) {
if (alreadyrunning)
- printk("Tor2: Reconfigured span %d (%s/%s) LBO: %s\n", span->spanno, coding, framing, dahdi_lboname(span->txlevel));
+ printk(KERN_INFO "Tor2: Reconfigured span %d (%s/%s) LBO: %s\n", span->spanno, coding, framing, dahdi_lboname(span->txlevel));
else
- printk("Tor2: Startup span %d (%s/%s) LBO: %s\n", span->spanno, coding, framing, dahdi_lboname(span->txlevel));
+ printk(KERN_INFO "Tor2: Startup span %d (%s/%s) LBO: %s\n", span->spanno, coding, framing, dahdi_lboname(span->txlevel));
}
}
- if (p->tor->syncs[0] == span->spanno) printk("SPAN %d: Primary Sync Source\n",span->spanno);
- if (p->tor->syncs[1] == span->spanno) printk("SPAN %d: Secondary Sync Source\n",span->spanno);
- if (p->tor->syncs[2] == span->spanno) printk("SPAN %d: Tertiary Sync Source\n",span->spanno);
- if (p->tor->syncs[3] == span->spanno) printk("SPAN %d: Quaternary Sync Source\n",span->spanno);
+ if (p->tor->syncs[0] == span->spanno) printk(KERN_INFO "SPAN %d: Primary Sync Source\n",span->spanno);
+ if (p->tor->syncs[1] == span->spanno) printk(KERN_INFO "SPAN %d: Secondary Sync Source\n",span->spanno);
+ if (p->tor->syncs[2] == span->spanno) printk(KERN_INFO "SPAN %d: Tertiary Sync Source\n",span->spanno);
+ if (p->tor->syncs[3] == span->spanno) printk(KERN_INFO "SPAN %d: Quaternary Sync Source\n",span->spanno);
return 0;
}
@@ -1017,7 +1017,7 @@ static int tor2_maint(struct dahdi_span *span, int cmd)
case DAHDI_MAINT_LOOPSTOP:
return -ENOSYS;
default:
- printk("Tor2: Unknown maint command: %d\n", cmd);
+ printk(KERN_NOTICE "Tor2: Unknown maint command: %d\n", cmd);
break;
}
return 0;
@@ -1049,7 +1049,7 @@ static int tor2_maint(struct dahdi_span *span, int cmd)
t1out(p->tor,tspan,0x30,0); /* stop sending loopup code */
break;
default:
- printk("Tor2: Unknown maint command: %d\n", cmd);
+ printk(KERN_NOTICE "Tor2: Unknown maint command: %d\n", cmd);
break;
}
return 0;
@@ -1149,7 +1149,7 @@ found:
syncnum = newsyncnum;
syncsrc = newsyncsrc;
syncspan = newsyncspan;
- if (debug) printk("New syncnum: %d, syncsrc: %d, syncspan: %d\n", syncnum, syncsrc, syncspan);
+ if (debug) printk(KERN_DEBUG "New syncnum: %d, syncsrc: %d, syncspan: %d\n", syncnum, syncsrc, syncspan);
}
}
#endif
@@ -1165,7 +1165,7 @@ found:
/* actually set the sync register */
tor->mem8[SYNCREG] = syncspan;
#endif
- if (debug) printk("Card %d, using sync span %d, master\n", tor->num, syncspan);
+ if (debug) printk(KERN_DEBUG "Card %d, using sync span %d, master\n", tor->num, syncspan);
tor->master = MASTER;
} else {
#if 1
@@ -1173,7 +1173,7 @@ found:
tor->mem8[SYNCREG] = SYNCEXTERN;
#endif
tor->master = 0;
- if (debug) printk("Card %d, using Timing Bus, NOT master\n", tor->num);
+ if (debug) printk(KERN_DEBUG "Card %d, using Timing Bus, NOT master\n", tor->num);
}
}
spin_unlock_irqrestore(&synclock, flags);
@@ -1204,7 +1204,7 @@ DAHDI_IRQ_HANDLER(tor2_intr)
#if 0
if (!tor->passno)
- printk("Interrupt handler\n");
+ printk(KERN_DEBUG "Interrupt handler\n");
#endif
/* do the transmit output */
diff --git a/drivers/dahdi/voicebus.c b/drivers/dahdi/voicebus.c
index 40494e5..ee6f057 100644
--- a/drivers/dahdi/voicebus.c
+++ b/drivers/dahdi/voicebus.c
@@ -681,14 +681,14 @@ show_buffer(struct voicebus *vb, void *vbb)
int x;
unsigned char *c;
c = vbb;
- printk("Packet %d\n", count);
+ printk(KERN_DEBUG "Packet %d\n", count);
for (x = 1; x <= vb->framesize; ++x) {
- printk("%02x ", c[x]);
+ printk(KERN_DEBUG "%02x ", c[x]);
if (x % 16 == 0) {
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
}
- printk("\n\n");
+ printk(KERN_DEBUG "\n\n");
}
#endif
diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c
index 466b9e0..f9b0a92 100644
--- a/drivers/dahdi/wcfxo.c
+++ b/drivers/dahdi/wcfxo.c
@@ -304,7 +304,7 @@ static inline void wcfxo_transmitprep(struct wcfxo *wc, unsigned char ints)
wc->ignoreread = 4;
break;
default:
- printk("wcfxo: Huh? No read or write??\n");
+ printk(KERN_DEBUG "wcfxo: Huh? No read or write??\n");
cmd = 0;
}
/* Setup the write chunk */
@@ -356,7 +356,7 @@ static inline void wcfxo_receiveprep(struct wcfxo *wc, unsigned char ints)
wc->regoffset = wc->regoffset % (sizeof(wecareregs) / sizeof(wecareregs[0]));
}
if (debug)
- printk("New regoffset: %d\n", wc->regoffset);
+ printk(KERN_DEBUG "New regoffset: %d\n", wc->regoffset);
}
/* Receive into the proper register */
wc->readregs[realreg] = realval;
@@ -387,14 +387,14 @@ static inline void wcfxo_receiveprep(struct wcfxo *wc, unsigned char ints)
if (!wc->ring && (wc->pegcount > PEGCOUNT)) {
/* It's ringing */
if (debug)
- printk("RING!\n");
+ printk(KERN_DEBUG "RING!\n");
dahdi_hooksig(wc->chan, DAHDI_RXSIG_RING);
wc->ring = 1;
}
if (wc->ring && !wc->pegcount) {
/* No more ring */
if (debug)
- printk("NO RING!\n");
+ printk(KERN_DEBUG "NO RING!\n");
dahdi_hooksig(wc->chan, DAHDI_RXSIG_OFFHOOK);
wc->ring = 0;
}
@@ -464,14 +464,14 @@ DAHDI_IRQ_HANDLER(wcfxo_interrupt)
}
if (ints & 0x10) {
- printk("FXO PCI Master abort\n");
+ printk(KERN_INFO "FXO PCI Master abort\n");
/* Stop DMA andlet the watchdog start it again */
wcfxo_stop_dma(wc);
return IRQ_RETVAL(1);
}
if (ints & 0x20) {
- printk("PCI Target abort\n");
+ printk(KERN_INFO "PCI Target abort\n");
return IRQ_RETVAL(1);
}
if (1 /* !(wc->report % 0xf) */) {
@@ -481,17 +481,17 @@ DAHDI_IRQ_HANDLER(wcfxo_interrupt)
wc->nobatttimer++;
#if 0
if (wc->battery)
- printk("Battery loss: %d (%d debounce)\n", b, wc->battdebounce);
+ printk(KERN_DEBUG "Battery loss: %d (%d debounce)\n", b, wc->battdebounce);
#endif
if (wc->battery && !wc->battdebounce) {
if (debug)
- printk("NO BATTERY!\n");
+ printk(KERN_DEBUG "NO BATTERY!\n");
wc->battery = 0;
#ifdef JAPAN
if ((!wc->ohdebounce) && wc->offhook) {
dahdi_hooksig(&wc->chan, DAHDI_RXSIG_ONHOOK);
if (debug)
- printk("Signalled On Hook\n");
+ printk(KERN_DEBUG "Signalled On Hook\n");
#ifdef ZERO_BATT_RING
wc->onhook++;
#endif
@@ -513,13 +513,13 @@ DAHDI_IRQ_HANDLER(wcfxo_interrupt)
} else if (b == 0xf) {
if (!wc->battery && !wc->battdebounce) {
if (debug)
- printk("BATTERY!\n");
+ printk(KERN_DEBUG "BATTERY!\n");
#ifdef ZERO_BATT_RING
if (wc->onhook) {
wc->onhook = 0;
dahdi_hooksig(&wc->chan, DAHDI_RXSIG_OFFHOOK);
if (debug)
- printk("Signalled Off Hook\n");
+ printk(KERN_DEBUG "Signalled Off Hook\n");
}
#else
dahdi_hooksig(wc->chan, DAHDI_RXSIG_OFFHOOK);
@@ -561,7 +561,7 @@ static int wcfxo_setreg(struct wcfxo *wc, unsigned char reg, unsigned char value
wc->wregcount++;
return 0;
}
- printk("wcfxo: Out of space to write register %02x with %02x\n", reg, value);
+ printk(KERN_NOTICE "wcfxo: Out of space to write register %02x with %02x\n", reg, value);
return -1;
}
@@ -576,7 +576,7 @@ static int wcfxo_open(struct dahdi_chan *chan)
static int wcfxo_watchdog(struct dahdi_span *span, int event)
{
- printk("FXO: Restarting DMA\n");
+ printk(KERN_INFO "FXO: Restarting DMA\n");
wcfxo_restart_dma(span->pvt);
return 0;
}
@@ -627,10 +627,10 @@ static int wcfxo_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
#endif
break;
default:
- printk("wcfxo: Can't set tx state to %d\n", txsig);
+ printk(KERN_NOTICE "wcfxo: Can't set tx state to %d\n", txsig);
}
if (debug)
- printk("Setting hook state to %d (%02x)\n", txsig, reg);
+ printk(KERN_DEBUG "Setting hook state to %d (%02x)\n", txsig, reg);
return 0;
}
@@ -663,7 +663,7 @@ static int wcfxo_initialize(struct wcfxo *wc)
wc->span.pvt = wc;
wc->chan->pvt = wc;
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;
@@ -787,7 +787,7 @@ static void wcfxo_set_daa_mode(struct wcfxo *wc)
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 + (DAHDI_CHUNKSIZE * HZ) / 800);
- printk("wcfxo: DAA mode is '%s'\n", fxo_modes[opermode].name);
+ printk(KERN_INFO "wcfxo: DAA mode is '%s'\n", fxo_modes[opermode].name);
}
static int wcfxo_init_daa(struct wcfxo *wc)
@@ -835,11 +835,11 @@ static int wcfxo_init_daa(struct wcfxo *wc)
reg15 = 0x0;
/* Go ahead and attenuate transmit signal by 6 db */
if (quiet) {
- printk("wcfxo: Attenuating transmit signal for quiet operation\n");
+ printk(KERN_INFO "wcfxo: Attenuating transmit signal for quiet operation\n");
reg15 |= (quiet & 0x3) << 4;
}
if (boost) {
- printk("wcfxo: Boosting receive signal\n");
+ printk(KERN_INFO "wcfxo: Boosting receive signal\n");
reg15 |= (boost & 0x3);
}
wcfxo_setreg(wc, WC_DAA_TXRX_GCTL, reg15);
@@ -867,9 +867,9 @@ static int wcfxo_init_daa(struct wcfxo *wc)
{ int x;
int y;
for (y=0;y<100;y++) {
- printk(" reg dump ====== %d ======\n", y);
+ printk(KERN_DEBUG " reg dump ====== %d ======\n", y);
for (x=0;x<sizeof(wecareregs) / sizeof(wecareregs[0]);x++) {
- printk("daa: Reg %d: %02x\n", wecareregs[x], wc->readregs[wecareregs[x]]);
+ printk(KERN_DEBUG "daa: Reg %d: %02x\n", wecareregs[x], wc->readregs[wecareregs[x]]);
}
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(100);
@@ -917,7 +917,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
32 bits. Allocate an extra set just for control too */
wc->writechunk = (int *)pci_alloc_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
if (!wc->writechunk) {
- printk("wcfxo: Unable to allocate DMA-able memory\n");
+ printk(KERN_NOTICE "wcfxo: Unable to allocate DMA-able memory\n");
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
return -ENOMEM;
@@ -927,7 +927,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
wc->readdma = wc->writedma + DAHDI_MAX_CHUNKSIZE * 16; /* in bytes */
if (wcfxo_initialize(wc)) {
- printk("wcfxo: Unable to intialize modem\n");
+ printk(KERN_NOTICE "wcfxo: Unable to intialize modem\n");
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc);
@@ -941,7 +941,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
pci_set_drvdata(pdev, wc);
if (request_irq(pdev->irq, wcfxo_interrupt, DAHDI_IRQ_SHARED, "wcfxo", wc)) {
- printk("wcfxo: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "wcfxo: Unable to request IRQ %d\n", pdev->irq);
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc);
@@ -959,7 +959,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
/* Initialize DAA (after it's started) */
if (wcfxo_init_daa(wc)) {
- printk("Failed to initailize DAA, giving up...\n");
+ printk(KERN_NOTICE "Failed to initailize DAA, giving up...\n");
wcfxo_stop_dma(wc);
wcfxo_disable_interrupts(wc);
dahdi_unregister(&wc->span);
@@ -974,7 +974,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
return -EIO;
}
wcfxo_set_daa_mode(wc);
- printk("Found a Wildcard FXO: %s\n", wc->variety);
+ printk(KERN_INFO "Found a Wildcard FXO: %s\n", wc->variety);
return 0;
}
@@ -985,7 +985,7 @@ static void wcfxo_release(struct wcfxo *wc)
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc);
- printk("Freed a Wildcard\n");
+ printk(KERN_INFO "Freed a Wildcard\n");
}
static void __devexit wcfxo_remove_one(struct pci_dev *pdev)
@@ -1038,9 +1038,9 @@ static int __init wcfxo_init(void)
int res;
int x;
if ((opermode >= sizeof(fxo_modes) / sizeof(fxo_modes[0])) || (opermode < 0)) {
- printk("Invalid/unknown operating mode specified. Please choose one of:\n");
+ printk(KERN_NOTICE "Invalid/unknown operating mode specified. Please choose one of:\n");
for (x=0;x<sizeof(fxo_modes) / sizeof(fxo_modes[0]); x++)
- printk("%d: %s\n", x, fxo_modes[x].name);
+ printk(KERN_INFO "%d: %s\n", x, fxo_modes[x].name);
return -ENODEV;
}
res = dahdi_pci_module(&wcfxo_driver);
diff --git a/drivers/dahdi/wct1xxp.c b/drivers/dahdi/wct1xxp.c
index 93827d5..b7a8e3b 100644
--- a/drivers/dahdi/wct1xxp.c
+++ b/drivers/dahdi/wct1xxp.c
@@ -278,7 +278,7 @@ static void t1xxp_release(struct t1xxp *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)
@@ -309,7 +309,7 @@ static void t1xxp_start_dma(struct t1xxp *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");
}
static void __t1xxp_stop_dma(struct t1xxp *wc)
@@ -331,7 +331,7 @@ static void __t1xxp_set_clear(struct t1xxp *wc)
/* No such thing under E1 */
if (wc->ise1) {
- printk("Can't set clear mode on an E1!\n");
+ printk(KERN_NOTICE "Can't set clear mode on an E1!\n");
return;
}
@@ -379,7 +379,7 @@ static void t1xxp_t1_framer_start(struct t1xxp *wc)
/* Set outgoing LBO */
__t1_set_reg(wc, 0x7c, wc->span.txlevel << 5);
- printk("Using %s/%s coding/framing\n", coding, framing);
+ printk(KERN_DEBUG "Using %s/%s coding/framing\n", coding, framing);
if (!alreadyrunning) {
/* Setup the clear channels */
__t1xxp_set_clear(wc);
@@ -447,7 +447,7 @@ static void t1xxp_e1_framer_start(struct t1xxp *wc)
__t1_set_reg(wc, 0x7c, wc->span.txlevel << 5);
#endif
- printk("Using %s/%s coding/framing%s 120 Ohms\n", coding, framing,crcing);
+ printk(KERN_DEBUG "Using %s/%s coding/framing%s 120 Ohms\n", coding, framing,crcing);
if (!alreadyrunning) {
__t1_set_reg(wc,0x1b,0x8a); /* CCR3: LIRST & TSCLKM */
@@ -491,7 +491,7 @@ static int t1xxp_framer_sanity_check(struct t1xxp *wc)
wc->ise1 = (res & 0x80) ? (1 << 4) : 0;
spin_unlock_irqrestore(&wc->lock, flags);
- printk("Framer: %s, Revision: %d (%s)\n", chips[chipid], res & 0xf, wc->ise1 ? "E1" : "T1");
+ printk(KERN_DEBUG "Framer: %s, Revision: %d (%s)\n", chips[chipid], res & 0xf, wc->ise1 ? "E1" : "T1");
return 0;
}
@@ -624,7 +624,7 @@ static int t1xxp_startup(struct dahdi_span *span)
t1xxp_e1_framer_start(wc);
else
t1xxp_t1_framer_start(wc);
- 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 */
@@ -673,7 +673,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd)
res = -ENOSYS;
break;
default:
- printk("wct1xxp/E1: Unknown maint command: %d\n", cmd);
+ printk(KERN_NOTICE "wct1xxp/E1: Unknown maint command: %d\n", cmd);
res = -EINVAL;
break;
}
@@ -705,7 +705,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd)
__t1_set_reg(wc,0x30,0); /* stop sending loopup code */
break;
default:
- printk("wct1xxp/T1: Unknown maint command: %d\n", cmd);
+ printk(KERN_NOTICE "wct1xxp/T1: Unknown maint command: %d\n", cmd);
res = -EINVAL;
}
}
@@ -794,7 +794,7 @@ static int t1xxp_software_init(struct t1xxp *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;
@@ -899,10 +899,10 @@ static void t1xxp_receiveprep(struct t1xxp *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++) {
@@ -920,7 +920,7 @@ static void t1xxp_receiveprep(struct t1xxp *wc, int ints)
control_set_reg(wc, WC_CLOCK, 0x02 | wc->sync | wc->ise1);
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
}
}
@@ -929,7 +929,7 @@ static void t1xxp_receiveprep(struct t1xxp *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, 0x02 | wc->sync | wc->ise1);
wc->clocktimeout = 100;
} else {
@@ -1087,7 +1087,7 @@ static void t1xxp_check_alarms(struct t1xxp *wc)
/* If receiving alarms, go into Yellow alarm state */
if (alarms && (!wc->span.alarms)) {
#if 0
- printk("Going into yellow alarm\n");
+ printk(KERN_DEBUG "Going into yellow alarm\n");
#endif
if (wc->ise1)
__t1_set_reg(wc, 0x21, 0x7f);
@@ -1131,7 +1131,7 @@ static void t1xxp_do_counters(struct t1xxp *wc)
wc->span.alarms &= ~(DAHDI_ALARM_RECOVER);
/* Clear yellow alarm */
#if 0
- printk("Coming out of alarm\n");
+ printk(KERN_DEBUG "Coming out of alarm\n");
#endif
if (wc->ise1)
__t1_set_reg(wc, 0x21, 0x5f);
@@ -1159,7 +1159,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++;
@@ -1197,10 +1197,10 @@ DAHDI_IRQ_HANDLER(t1xxp_interrupt)
}
if (ints & 0x10)
- printk("PCI Master abort\n");
+ printk(KERN_INFO "PCI Master abort\n");
if (ints & 0x20)
- printk("PCI Target abort\n");
+ printk(KERN_INFO "PCI Target abort\n");
return IRQ_RETVAL(1);
}
@@ -1241,10 +1241,10 @@ static int t1xxp_hardware_init(struct t1xxp *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);
/* 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);
@@ -1291,7 +1291,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("wct1xxp: Unable to allocate DMA-able memory\n");
+ printk(KERN_NOTICE "wct1xxp: Unable to allocate DMA-able memory\n");
return -ENOMEM;
}
@@ -1314,7 +1314,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, "t1xxp", wc)) {
- printk("t1xxp: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "t1xxp: Unable to request IRQ %d\n", pdev->irq);
kfree(wc);
return -EIO;
}
@@ -1343,7 +1343,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;
}
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index bd1b80a..ae03074 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -421,13 +421,13 @@ static inline void __t4_pci_out(struct t4 *wc, const unsigned int addr, const un
if (pedanticpci) {
tmp = __t4_pci_in(wc, WC_VERSION);
if ((tmp & 0xffff0000) != 0xc01a0000)
- printk("TE4XXP: Version Synchronization Error!\n");
+ printk(KERN_NOTICE "TE4XXP: Version Synchronization Error!\n");
}
#if 0
tmp = __t4_pci_in(wc, addr);
if ((value != tmp) && (addr != WC_LEDS) && (addr != WC_LDATA) &&
(addr != WC_GPIO) && (addr != WC_INTR))
- printk("Tried to load %08x into %08x, but got %08x instead\n", value, addr, tmp);
+ printk(KERN_DEBUG "Tried to load %08x into %08x, but got %08x instead\n", value, addr, tmp);
#endif
}
@@ -532,18 +532,18 @@ static inline void __t4_framer_out(struct t4 *wc, int unit, const unsigned int a
{
unit &= 0x3;
if (unlikely(debug & DEBUG_REGS))
- printk("Writing %02x to address %02x of unit %d\n", value, addr, unit);
+ printk(KERN_INFO "Writing %02x to address %02x of unit %d\n", value, addr, unit);
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
__t4_pci_out(wc, WC_LDATA, value);
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff) | WC_LFRMR_CS | WC_LWRITE);
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
- if (unlikely(debug & DEBUG_REGS)) printk("Write complete\n");
+ if (unlikely(debug & DEBUG_REGS)) printk(KERN_INFO "Write complete\n");
#if 0
if ((addr != FRMR_TXFIFO) && (addr != FRMR_CMDR) && (addr != 0xbc))
{ unsigned int tmp;
tmp = __t4_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
}
@@ -632,9 +632,9 @@ static inline unsigned int __t4_oct_in(struct t4 *wc, unsigned int addr)
#ifdef PEDANTIC_OCTASIC_CHECKING
while((__t4_raw_oct_in(wc, 0x0000) & (1 << 8)) && --count);
if (count != 1000)
- printk("Yah, read can be slow...\n");
+ printk(KERN_DEBUG "Yah, read can be slow...\n");
if (!count)
- printk("Read timed out!\n");
+ printk(KERN_NOTICE "Read timed out!\n");
#endif
return __t4_raw_oct_in(wc, 0x0004);
}
@@ -664,7 +664,7 @@ static inline void __t4_vpm_out(struct t4 *wc, int unit, const unsigned int addr
{
unit &= 0x7;
if (debug & DEBUG_REGS)
- printk("Writing %02x to address %02x of ec unit %d\n", value, addr, unit);
+ printk(KERN_DEBUG "Writing %02x to address %02x of ec unit %d\n", value, addr, unit);
__t4_pci_out(wc, WC_LADDR, (addr & 0xff));
__t4_pci_out(wc, WC_LDATA, value);
__t4_pci_out(wc, WC_LADDR, (unit << 12) | (addr & 0x1ff) | (1 << 11));
@@ -672,14 +672,14 @@ static inline void __t4_vpm_out(struct t4 *wc, int unit, const unsigned int addr
__t4_pci_out(wc, WC_LADDR, (unit << 12) | (addr & 0x1ff) | (1 << 11));
__t4_pci_out(wc, WC_LADDR, (unit << 12) | (addr & 0x1ff));
__t4_pci_out(wc, WC_LADDR, 0);
- if (debug & DEBUG_REGS) printk("Write complete\n");
+ if (debug & DEBUG_REGS) printk(KERN_DEBUG "Write complete\n");
#if 0
{ unsigned int tmp;
tmp = t4_vpm_in(wc, unit, addr);
if (tmp != value) {
- printk("Expected %d from unit %d echo register %d but got %d instead\n", value, unit, addr, tmp);
+ printk(KERN_DEBUG "Expected %d from unit %d echo register %d but got %d instead\n", value, unit, addr, tmp);
} }
#endif
}
@@ -696,9 +696,9 @@ static inline void __t4_oct_out(struct t4 *wc, unsigned int addr, unsigned int v
#ifdef PEDANTIC_OCTASIC_CHECKING
while((__t4_raw_oct_in(wc, 0x0000) & (1 << 8)) && --count);
if (count != 1000)
- printk("Yah, write can be slow\n");
+ printk(KERN_DEBUG "Yah, write can be slow\n");
if (!count)
- printk("Write timed out!\n");
+ printk(KERN_NOTICE "Write timed out!\n");
#endif
}
@@ -734,7 +734,7 @@ static void t4_check_vpm450(struct t4 *wc)
else
channel -= 1;
if (unlikely(debug))
- printk("Got tone %s of '%c' on channel %d of span %d\n",
+ printk(KERN_INFO "Got tone %s of '%c' on channel %d of span %d\n",
(start ? "START" : "STOP"), tone, channel, span + 1);
if (test_bit(channel, &wc->tspans[span]->dtmfmask) && (tone != 'u')) {
if (start) {
@@ -772,7 +772,7 @@ static void t4_check_vpm400(struct t4 *wc, unsigned int newio)
struct t4_span *ts;
if (debug && (newio != lastio))
- printk("Last was %08x, new is %08x\n", lastio, newio);
+ printk(KERN_DEBUG "Last was %08x, new is %08x\n", lastio, newio);
lastio = newio;
@@ -823,7 +823,7 @@ static void t4_check_vpm400(struct t4 *wc, unsigned int newio)
spin_unlock_irqrestore(&chan->lock, flags);
}
if (debug)
- printk("Digit Seen: %d, Span: %d, channel: %d, energy: %02x, 'channel %d' chip %d\n", digit, x % 4, base + 1, energy, channel, x);
+ printk(KERN_DEBUG "Digit Seen: %d, Span: %d, channel: %d, energy: %02x, 'channel %d' chip %d\n", digit, x % 4, base + 1, energy, channel, x);
}
regval = regval >> 1;
@@ -854,7 +854,7 @@ static void t4_check_vpm400(struct t4 *wc, unsigned int newio)
digit = ts->dtmfdigit[base];
ts->dtmfdigit[base] = 0;
if (debug)
- printk("Digit Gone: %d, Span: %d, channel: %d, energy: %02x, 'channel %d' chip %d\n", digit, x % 4, base + 1, energy, channel, x);
+ printk(KERN_DEBUG "Digit Gone: %d, Span: %d, channel: %d, energy: %02x, 'channel %d' chip %d\n", digit, x % 4, base + 1, energy, channel, x);
}
regval = regval >> 1;
@@ -870,7 +870,7 @@ static void hdlc_stop(struct t4 *wc, unsigned int span)
unsigned char imr0, imr1, mode;
int i = 0;
- if (debug & DEBUG_FRAMER) printk("Stopping HDLC controller on span %d\n", span+1);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Stopping HDLC controller on span %d\n", span+1);
/* Clear receive and transmit timeslots */
for (i = 0; i < 4; i++) {
@@ -911,11 +911,11 @@ static inline void t4_framer_cmd_wait(struct t4 *wc, unsigned int span, int cmd)
if (!(sis & 0x04))
break;
if (!loops++ && (debug & DEBUG_FRAMER)) {
- printk("!!!SIS Waiting before cmd %02x\n", cmd);
+ printk(KERN_NOTICE "!!!SIS Waiting before cmd %02x\n", cmd);
}
}
if (loops && (debug & DEBUG_FRAMER))
- printk("!!!SIS waited %d loops\n", loops);
+ printk(KERN_NOTICE "!!!SIS waited %d loops\n", loops);
t4_framer_out(wc, span, FRMR_CMDR, cmd);
}
@@ -927,7 +927,7 @@ static int hdlc_start(struct t4 *wc, unsigned int span, struct dahdi_chan *chan,
int offset = chan->chanpos;
unsigned long flags;
- if (debug & DEBUG_FRAMER) printk("Starting HDLC controller for channel %d span %d\n", offset, span+1);
+ if (debug & DEBUG_FRAMER) printk(KERN_INFO "Starting HDLC controller for channel %d span %d\n", offset, span+1);
if (mode != FRMR_MODE_NO_ADDR_CMP)
return -1;
@@ -988,7 +988,7 @@ static void __set_clear(struct t4 *wc, int span)
ts->notclear |= (1 << i);
if ((i % 8)==7) {
if (debug)
- printk("Putting %d in register %02x on span %d\n",
+ printk(KERN_DEBUG "Putting %d in register %02x on span %d\n",
val, 0x2f + j, span + 1);
__t4_framer_out(wc, span, 0x2f + j, val);
val = 0;
@@ -1036,19 +1036,19 @@ static int t4_dacs(struct dahdi_chan *dst, struct dahdi_chan *src)
if (ts->spanflags & FLAG_2NDGEN)
t4_tsi_unassign(wc, src->span->offset, src->chanpos);
if (debug)
- printk("Unassigning %d/%d by default and...\n", src->span->offset, src->chanpos);
+ printk(KERN_DEBUG "Unassigning %d/%d by default and...\n", src->span->offset, src->chanpos);
if (debug)
- printk("Unassigning %d/%d by default\n", dst->span->offset, dst->chanpos);
+ printk(KERN_DEBUG "Unassigning %d/%d by default\n", dst->span->offset, dst->chanpos);
return -1;
}
if (src) {
t4_tsi_assign(wc, src->span->offset, src->chanpos, dst->span->offset, dst->chanpos);
if (debug)
- printk("Assigning channel %d/%d -> %d/%d!\n", src->span->offset, src->chanpos, dst->span->offset, dst->chanpos);
+ printk(KERN_DEBUG "Assigning channel %d/%d -> %d/%d!\n", src->span->offset, src->chanpos, dst->span->offset, dst->chanpos);
} else {
t4_tsi_unassign(wc, dst->span->offset, dst->chanpos);
if (debug)
- printk("Unassigning channel %d/%d!\n", dst->span->offset, dst->chanpos);
+ printk(KERN_DEBUG "Unassigning channel %d/%d!\n", dst->span->offset, dst->chanpos);
}
return 0;
}
@@ -1108,7 +1108,7 @@ static int t4_echocan(struct dahdi_chan *chan, int eclen)
channel = channel << 2;
channel |= chan->span->offset;
if(debug & DEBUG_ECHOCAN)
- printk("echocan: Card is %d, Channel is %d, Span is %d, offset is %d length %d\n",
+ printk(KERN_DEBUG "echocan: Card is %d, Channel is %d, Span is %d, offset is %d length %d\n",
wc->num, chan->chanpos, chan->span->offset, channel, eclen);
vpm450m_setec(wc->vpm450m, channel, eclen);
// Mark msleep(10);
@@ -1116,7 +1116,7 @@ static int t4_echocan(struct dahdi_chan *chan, int eclen)
} else {
unit = t4_vpm_unit(chan->span->offset, channel);
if(debug & DEBUG_ECHOCAN)
- printk("echocan: Card is %d, Channel is %d, Span is %d, unit is %d, unit offset is %d length %d\n",
+ printk(KERN_DEBUG "echocan: Card is %d, Channel is %d, Span is %d, unit is %d, unit offset is %d length %d\n",
wc->num, chan->chanpos, chan->span->offset, unit, channel, eclen);
if (eclen)
t4_vpm_out(wc,unit,channel,0x3e);
@@ -1193,31 +1193,31 @@ static void inline t4_hdlc_xmit_fifo(struct t4 *wc, unsigned int span, struct t4
unsigned char buf[32];
res = dahdi_hdlc_getbuf(ts->sigchan, buf, &size);
- if (debug & DEBUG_FRAMER) printk("Got buffer sized %d and res %d for %d\n", size, res, span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Got buffer sized %d and res %d for %d\n", size, res, span);
if (size > 0) {
ts->sigactive = 1;
if (debug & DEBUG_FRAMER) {
- printk("TX(");
+ printk(KERN_DEBUG "TX(");
for (i = 0; i < size; i++)
- printk((i ? " %02x" : "%02x"), buf[i]);
- printk(")\n");
+ printk(KERN_DEBUG "%s%02x", i ? " " : "", buf[i]);
+ printk(KERN_DEBUG ")\n");
}
for (i = 0; i < size; i++)
t4_framer_out(wc, span, FRMR_TXFIFO, buf[i]);
if (res) /* End of message */ {
- if (debug & DEBUG_FRAMER) printk("transmiting XHF|XME\n");
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "transmiting XHF|XME\n");
t4_framer_cmd_wait(wc, span, FRMR_CMDR_XHF | FRMR_CMDR_XME);
#if 0
ts->sigactive = (__t4_framer_in(wc, span, FRMR_SIS) & FRMR_SIS_XFW) ? 0 : 1;
#endif
++ts->frames_out;
if ((debug & DEBUG_FRAMER) && !(ts->frames_out & 0x0f))
- printk("Transmitted %d frames on span %d\n", ts->frames_out, span);
+ printk(KERN_DEBUG "Transmitted %d frames on span %d\n", ts->frames_out, span);
} else { /* Still more to transmit */
- if (debug & DEBUG_FRAMER) printk("transmiting XHF\n");
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "transmiting XHF\n");
t4_framer_cmd_wait(wc, span, FRMR_CMDR_XHF);
}
}
@@ -1234,13 +1234,13 @@ static void t4_hdlc_hard_xmit(struct dahdi_chan *chan)
spin_lock_irqsave(&wc->reglock, flags);
if (!ts->sigchan) {
- printk("t4_hdlc_hard_xmit: Invalid (NULL) signalling channel\n");
+ printk(KERN_NOTICE "t4_hdlc_hard_xmit: Invalid (NULL) signalling channel\n");
spin_unlock_irqrestore(&wc->reglock, flags);
return;
}
spin_unlock_irqrestore(&wc->reglock, flags);
- if (debug & DEBUG_FRAMER) printk("t4_hdlc_hard_xmit on channel %s (sigchan %s), sigactive=%d\n", chan->name, ts->sigchan->name, ts->sigactive);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "t4_hdlc_hard_xmit on channel %s (sigchan %s), sigactive=%d\n", chan->name, ts->sigchan->name, ts->sigactive);
if ((ts->sigchan == chan) && !ts->sigactive)
t4_hdlc_xmit_fifo(wc, span, ts);
@@ -1254,37 +1254,37 @@ static int t4_maint(struct dahdi_span *span, int cmd)
if (ts->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("TE%dXXP: Unknown E1 maint command: %d\n", wc->numspans, cmd);
+ printk(KERN_NOTICE "TE%dXXP: Unknown E1 maint command: %d\n", wc->numspans, cmd);
break;
}
} else {
switch(cmd) {
case DAHDI_MAINT_NONE:
- printk("XXX Turn off local and remote loops T1 XXX\n");
+ printk(KERN_NOTICE "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_NOTICE "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_NOTICE "XXX Turn on remote loopup XXX\n");
break;
case DAHDI_MAINT_LOOPUP:
t4_framer_out(wc, span->offset, 0x21, 0x50); /* FMR5: Nothing but RBS mode */
@@ -1296,7 +1296,7 @@ static int t4_maint(struct dahdi_span *span, int cmd)
t4_framer_out(wc, span->offset, 0x21, 0x40); /* FMR5: Nothing but RBS mode */
break;
default:
- printk("TE%dXXP: Unknown T1 maint command: %d\n", wc->numspans, cmd);
+ printk(KERN_NOTICE "TE%dXXP: Unknown T1 maint command: %d\n", wc->numspans, cmd);
break;
}
}
@@ -1311,7 +1311,7 @@ static int t4_rbsbits(struct dahdi_chan *chan, int bits)
struct t4_span *ts = wc->tspans[chan->span->offset];
unsigned long flags;
- if(debug & DEBUG_RBS) printk("Setting bits to %d on channel %s\n", bits, chan->name);
+ if(debug & DEBUG_RBS) printk(KERN_DEBUG "Setting bits to %d on channel %s\n", bits, chan->name);
spin_lock_irqsave(&wc->reglock, flags);
k = chan->span->offset;
if (ts->spantype == TYPE_E1) { /* do it E1 way */
@@ -1353,7 +1353,7 @@ static int t4_rbsbits(struct dahdi_chan *chan, int bits)
}
spin_unlock_irqrestore(&wc->reglock, flags);
if (debug & DEBUG_RBS)
- printk("Finished setting RBS bits\n");
+ printk(KERN_DEBUG "Finished setting RBS bits\n");
return 0;
}
@@ -1367,11 +1367,11 @@ static int t4_shutdown(struct dahdi_span *span)
tspan = span->offset + 1;
if (tspan < 0) {
- printk("T%dXXP: Span '%d' isn't us?\n", wc->numspans, span->spanno);
+ printk(KERN_NOTICE "T%dXXP: Span '%d' isn't us?\n", wc->numspans, span->spanno);
return -1;
}
- if (debug & DEBUG_MAIN) printk("Shutting down span %d (%s)\n", span->spanno, span->name);
+ if (debug & DEBUG_MAIN) printk(KERN_DEBUG "Shutting down span %d (%s)\n", span->spanno, span->name);
/* Stop HDLC controller if runned */
if (ts->sigchan)
@@ -1392,7 +1392,7 @@ static int t4_shutdown(struct dahdi_span *span)
(!(wc->tspans[0]->span.flags & DAHDI_FLAG_RUNNING)) &&
(!(wc->tspans[1]->span.flags & DAHDI_FLAG_RUNNING)))) {
/* No longer in use, disable interrupts */
- printk("TE%dXXP: Disabling interrupts since there are no active spans\n", wc->numspans);
+ printk(KERN_INFO "TE%dXXP: Disabling interrupts since there are no active spans\n", wc->numspans);
set_bit(T4_STOP_DMA, &wc->checkflag);
} else
set_bit(T4_CHECK_TIMING, &wc->checkflag);
@@ -1405,7 +1405,7 @@ static int t4_shutdown(struct dahdi_span *span)
wc->spansstarted--;
if (debug & DEBUG_MAIN)
- printk("Span %d (%s) shutdown\n", span->spanno, span->name);
+ printk(KERN_DEBUG "Span %d (%s) shutdown\n", span->spanno, span->name);
return 0;
}
@@ -1415,9 +1415,9 @@ static int t4_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
struct t4_span *ts = span->pvt;
struct t4 *wc = ts->owner;
- printk("About to enter spanconfig!\n");
+ printk(KERN_INFO "About to enter spanconfig!\n");
if (debug & DEBUG_MAIN)
- printk("TE%dXXP: Configuring span %d\n", wc->numspans, span->spanno);
+ printk(KERN_DEBUG "TE%dXXP: Configuring span %d\n", wc->numspans, span->spanno);
if (lc->sync < 0)
lc->sync = 0;
@@ -1446,7 +1446,7 @@ static int t4_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
/* If we're already running, then go ahead and apply the changes */
if (span->flags & DAHDI_FLAG_RUNNING)
return t4_startup(span);
- printk("Done with spanconfig!\n");
+ printk(KERN_INFO "Done with spanconfig!\n");
return 0;
}
@@ -1460,9 +1460,9 @@ static int t4_chanconfig(struct dahdi_chan *chan, int sigtype)
alreadyrunning = ts->span.flags & DAHDI_FLAG_RUNNING;
if (debug & DEBUG_MAIN) {
if (alreadyrunning)
- printk("TE%dXXP: Reconfigured channel %d (%s) sigtype %d\n", wc->numspans, chan->channo, chan->name, sigtype);
+ printk(KERN_DEBUG "TE%dXXP: Reconfigured channel %d (%s) sigtype %d\n", wc->numspans, chan->channo, chan->name, sigtype);
else
- printk("TE%dXXP: Configured channel %d (%s) sigtype %d\n", wc->numspans, chan->channo, chan->name, sigtype);
+ printk(KERN_DEBUG "TE%dXXP: Configured channel %d (%s) sigtype %d\n", wc->numspans, chan->channo, chan->name, sigtype);
}
spin_lock_irqsave(&wc->reglock, flags);
@@ -1475,13 +1475,13 @@ static int t4_chanconfig(struct dahdi_chan *chan, int sigtype)
/* (re)configure signalling channel */
if ((sigtype == DAHDI_SIG_HARDHDLC) || (ts->sigchan == chan)) {
if (debug & DEBUG_FRAMER)
- printk("%sonfiguring hardware HDLC on %s\n", ((sigtype == DAHDI_SIG_HARDHDLC) ? "C" : "Unc"), chan->name);
+ printk(KERN_DEBUG "%sonfiguring hardware HDLC on %s\n", ((sigtype == DAHDI_SIG_HARDHDLC) ? "C" : "Unc"), chan->name);
if (alreadyrunning) {
if (ts->sigchan)
hdlc_stop(wc, ts->sigchan->span->offset);
if (sigtype == DAHDI_SIG_HARDHDLC) {
if (hdlc_start(wc, chan->span->offset, chan, ts->sigmode)) {
- printk("Error initializing signalling controller\n");
+ printk(KERN_NOTICE "Error initializing signalling controller\n");
return -1;
}
} else {
@@ -1620,7 +1620,7 @@ static void t4_serial_setup(struct t4 *wc, int unit)
{
if (!wc->globalconfig) {
wc->globalconfig = 1;
- printk("TE%dXXP: Setting up global serial parameters\n", wc->numspans);
+ printk(KERN_INFO "TE%dXXP: Setting up global serial parameters\n", wc->numspans);
t4_framer_out(wc, 0, 0x85, 0xe0); /* GPC1: Multiplex mode enabled, FSC is output, active low, RCLK from channel 0 */
t4_framer_out(wc, 0, 0x08, 0x01); /* IPC: Interrupt push/pull active low */
@@ -1665,7 +1665,7 @@ static void t4_serial_setup(struct t4 *wc, int unit)
t4_framer_out(wc, unit, 0x83, 0x35); /* PC4: Some more unused stuff */
t4_framer_out(wc, unit, 0x84, 0x01); /* PC5: XMFS active low, SCLKR is input, RCLK is output */
if (debug & DEBUG_MAIN)
- printk("Successfully initialized serial bus for unit %d\n", unit);
+ printk(KERN_DEBUG "Successfully initialized serial bus for unit %d\n", unit);
}
static int syncsrc = 0;
@@ -1714,10 +1714,10 @@ static void __t4_set_timing_source(struct t4 *wc, int unit, int master, int slav
}
} else {
if (debug & DEBUG_MAIN)
- printk("TE%dXXP: Timing source already set to %d\n", wc->numspans, unit);
+ printk(KERN_DEBUG "TE%dXXP: Timing source already set to %d\n", wc->numspans, unit);
}
#if 0
- printk("wct4xxp: Timing source set to %d\n",unit);
+ printk(KERN_DEBUG "wct4xxp: Timing source set to %d\n",unit);
#endif
}
@@ -1726,7 +1726,7 @@ static inline void __t4_update_timing(struct t4 *wc)
int i;
/* update sync src info */
if (wc->syncsrc != syncsrc) {
- printk("Swapping card %d from %d to %d\n", wc->num, wc->syncsrc, syncsrc);
+ printk(KERN_INFO "Swapping card %d from %d to %d\n", wc->num, wc->syncsrc, syncsrc);
wc->syncsrc = syncsrc;
/* Update sync sources */
for (i = 0; i < wc->numspans; i++) {
@@ -1734,10 +1734,10 @@ static inline void __t4_update_timing(struct t4 *wc)
}
if (syncnum == wc->num) {
__t4_set_timing_source(wc, syncspan-1, 1, 0);
- if (debug) printk("Card %d, using sync span %d, master\n", wc->num, syncspan);
+ if (debug) printk(KERN_DEBUG "Card %d, using sync span %d, master\n", wc->num, syncspan);
} else {
__t4_set_timing_source(wc, syncspan-1, 0, 1);
- if (debug) printk("Card %d, using Timing Bus, NOT master\n", wc->num);
+ if (debug) printk(KERN_DEBUG "Card %d, using Timing Bus, NOT master\n", wc->num);
}
}
}
@@ -1784,7 +1784,7 @@ static int __t4_findsync(struct t4 *wc)
}
found:
if ((syncnum != newsyncnum) || (syncsrc != newsyncsrc) || (newsyncspan != syncspan)) {
- if (debug) printk("New syncnum: %d (was %d), syncsrc: %d (was %d), syncspan: %d (was %d)\n", newsyncnum, syncnum, newsyncsrc, syncsrc, newsyncspan, syncspan);
+ if (debug) printk(KERN_DEBUG "New syncnum: %d (was %d), syncsrc: %d (was %d), syncspan: %d (was %d)\n", newsyncnum, syncnum, newsyncsrc, syncsrc, newsyncspan, syncspan);
syncnum = newsyncnum;
syncsrc = newsyncsrc;
syncspan = newsyncspan;
@@ -1802,7 +1802,7 @@ found:
static void __t4_set_timing_source_auto(struct t4 *wc)
{
int x;
- printk("timing source auto card %d!\n", wc->num);
+ printk(KERN_INFO "timing source auto card %d!\n", wc->num);
clear_bit(T4_CHECK_TIMING, &wc->checkflag);
if (timingcable) {
__t4_findsync(wc);
@@ -1901,7 +1901,7 @@ static void __t4_configure_t1(struct t4 *wc, int unit, int lineconfig, int txlev
__t4_framer_out(wc, unit, 0x17, 0xf4); /* IMR3: We care about AIS and friends */
__t4_framer_out(wc, unit, 0x18, 0x3f); /* IMR4: We care about slips on transmit */
- printk("TE%dXXP: Span %d configured for %s/%s\n", wc->numspans, unit + 1, framing, line);
+ printk(KERN_INFO "TE%dXXP: Span %d configured for %s/%s\n", wc->numspans, unit + 1, framing, line);
}
static void __t4_configure_e1(struct t4 *wc, int unit, int lineconfig)
@@ -1980,7 +1980,7 @@ static void __t4_configure_e1(struct t4 *wc, int unit, int lineconfig)
__t4_framer_out(wc, unit, 0x17, 0xc4 | imr3extra); /* IMR3: We care about AIS and friends */
__t4_framer_out(wc, unit, 0x18, 0x3f); /* IMR4: We care about slips on transmit */
- printk("TE%dXXP: Span %d configured for %s/%s%s\n", wc->numspans, unit + 1, framing, line, crc4);
+ printk(KERN_INFO "TE%dXXP: Span %d configured for %s/%s%s\n", wc->numspans, unit + 1, framing, line, crc4);
}
static int t4_startup(struct dahdi_span *span)
@@ -1994,10 +1994,10 @@ static int t4_startup(struct dahdi_span *span)
struct t4_span *ts = span->pvt;
struct t4 *wc = ts->owner;
- printk("About to enter startup!\n");
+ printk(KERN_INFO "About to enter startup!\n");
tspan = span->offset + 1;
if (tspan < 0) {
- printk("TE%dXXP: Span '%d' isn't us?\n", wc->numspans, span->spanno);
+ printk(KERN_INFO "TE%dXXP: Span '%d' isn't us?\n", wc->numspans, span->spanno);
return -1;
}
@@ -2057,7 +2057,7 @@ static int t4_startup(struct dahdi_span *span)
spin_unlock_irqrestore(&wc->reglock, flags);
if (hdlc_start(wc, span->offset, sigchan, ts->sigmode)) {
- printk("Error initializing signalling controller\n");
+ printk(KERN_NOTICE "Error initializing signalling controller\n");
return -1;
}
spin_lock_irqsave(&wc->reglock, flags);
@@ -2068,11 +2068,11 @@ static int t4_startup(struct dahdi_span *span)
t4_check_alarms(wc, span->offset);
t4_check_sigbits(wc, span->offset);
- if (wc->tspans[0]->sync == span->spanno) printk("SPAN %d: Primary Sync Source\n",span->spanno);
- if (wc->tspans[1]->sync == span->spanno) printk("SPAN %d: Secondary Sync Source\n",span->spanno);
+ if (wc->tspans[0]->sync == span->spanno) printk(KERN_INFO "SPAN %d: Primary Sync Source\n",span->spanno);
+ if (wc->tspans[1]->sync == span->spanno) printk(KERN_INFO "SPAN %d: Secondary Sync Source\n",span->spanno);
if (wc->numspans == 4) {
- if (wc->tspans[2]->sync == span->spanno) printk("SPAN %d: Tertiary Sync Source\n",span->spanno);
- if (wc->tspans[3]->sync == span->spanno) printk("SPAN %d: Quaternary Sync Source\n",span->spanno);
+ if (wc->tspans[2]->sync == span->spanno) printk(KERN_INFO "SPAN %d: Tertiary Sync Source\n",span->spanno);
+ if (wc->tspans[3]->sync == span->spanno) printk(KERN_INFO "SPAN %d: Quaternary Sync Source\n",span->spanno);
}
#ifdef VPM_SUPPORT
if (!alreadyrunning && !wc->vpm) {
@@ -2084,7 +2084,7 @@ static int t4_startup(struct dahdi_span *span)
t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
}
#endif
- printk("Completed startup!\n");
+ printk(KERN_INFO "Completed startup!\n");
return 0;
}
@@ -2107,7 +2107,7 @@ static inline void e1_check(struct t4 *wc, int span, int val)
if (wc->numspans == 4)
wc->tspans[2]->e1check = wc->tspans[3]->e1check = 0;
if (debug & DEBUG_MAIN)
- printk("Detected loss of E1 alignment on span %d!\n", span);
+ printk(KERN_DEBUG "Detected loss of E1 alignment on span %d!\n", span);
t4_reset_dma(wc);
}
}
@@ -2138,7 +2138,7 @@ static void t4_receiveprep(struct t4 *wc, int irq)
for (x=0;x<wc->numspans;x++)
wc->tspans[x]->irqmisses++;
if (debug & DEBUG_MAIN)
- printk("TE%dXXP: Double/missed interrupt detected\n", wc->numspans);
+ printk(KERN_DEBUG "TE%dXXP: Double/missed interrupt detected\n", wc->numspans);
}
for (x=0;x<DAHDI_CHUNKSIZE;x++) {
for (z=0;z<24;z++) {
@@ -2331,7 +2331,7 @@ static void t4_check_sigbits(struct t4 *wc, int span)
struct t4_span *ts = wc->tspans[span];
if (debug & DEBUG_RBS)
- printk("Checking sigbits on span %d\n", span + 1);
+ printk(KERN_DEBUG "Checking sigbits on span %d\n", span + 1);
if (!(ts->span.flags & DAHDI_FLAG_RUNNING))
return;
@@ -2427,7 +2427,7 @@ static void t4_check_alarms(struct t4 *wc, int span)
if (!(ts->spanflags & FLAG_NMF)) {
__t4_framer_out(wc, span, 0x20, 0x9f | 0x20); /* LIM0: Force RAI High */
ts->spanflags |= FLAG_NMF;
- printk("NMF workaround on!\n");
+ printk(KERN_DEBUG "NMF workaround on!\n");
}
__t4_framer_out(wc, span, 0x1e, 0xc3); /* Reset to CRC4 mode */
__t4_framer_out(wc, span, 0x1c, 0xf2); /* Force Resync */
@@ -2436,7 +2436,7 @@ static void t4_check_alarms(struct t4 *wc, int span)
if ((ts->spanflags & FLAG_NMF)) {
__t4_framer_out(wc, span, 0x20, 0x9f); /* LIM0: Clear forced RAI */
ts->spanflags &= ~FLAG_NMF;
- printk("NMF workaround off!\n");
+ printk(KERN_DEBUG "NMF workaround off!\n");
}
}
} else {
@@ -2495,7 +2495,7 @@ static void t4_check_alarms(struct t4 *wc, int span)
if (alarms && !(ts->spanflags & FLAG_SENDINGYELLOW)) {
unsigned char fmr4;
#if 1
- printk("wct%dxxp: Setting yellow alarm on span %d\n", wc->numspans, span + 1);
+ printk(KERN_INFO "wct%dxxp: Setting yellow alarm on span %d\n", wc->numspans, span + 1);
#endif
/* We manually do yellow alarm to handle RECOVER and NOTOPEN, otherwise it's auto anyway */
fmr4 = __t4_framer_in(wc, span, 0x20);
@@ -2504,7 +2504,7 @@ static void t4_check_alarms(struct t4 *wc, int span)
} else if ((!alarms) && (ts->spanflags & FLAG_SENDINGYELLOW)) {
unsigned char fmr4;
#if 1
- printk("wct%dxxp: Clearing yellow alarm on span %d\n", wc->numspans, span + 1);
+ printk(KERN_INFO "wct%dxxp: Clearing yellow alarm on span %d\n", wc->numspans, span + 1);
#endif
/* We manually do yellow alarm to handle RECOVER */
fmr4 = __t4_framer_in(wc, span, 0x20);
@@ -2619,7 +2619,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
unsigned long flags;
if (debug & DEBUG_FRAMER)
- printk("framer interrupt span %d:%d!\n", wc->num, span + 1);
+ printk(KERN_DEBUG "framer interrupt span %d:%d!\n", wc->num, span + 1);
/* 1st gen cards isn't used interrupts */
gis = t4_framer_in(wc, span, FRMR_GIS);
@@ -2630,7 +2630,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
isr4 = (gis & FRMR_GIS_ISR4) ? t4_framer_in(wc, span, FRMR_ISR4) : 0;
if (debug & DEBUG_FRAMER)
- printk("gis: %02x, isr0: %02x, isr1: %02x, isr2: %02x, isr3: %02x, isr4: %02x\n", gis, isr0, isr1, isr2, isr3, isr4);
+ printk(KERN_DEBUG "gis: %02x, isr0: %02x, isr1: %02x, isr2: %02x, isr3: %02x, isr4: %02x\n", gis, isr0, isr1, isr2, isr3, isr4);
if (isr0)
t4_check_sigbits(wc, span);
@@ -2650,13 +2650,13 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
if (debug & DEBUG_MAIN) {
if (isr3 & 0x02)
- printk("TE%d10P: RECEIVE slip NEGATIVE on span %d\n", wc->numspans, span + 1);
+ printk(KERN_DEBUG "TE%d10P: RECEIVE slip NEGATIVE on span %d\n", wc->numspans, span + 1);
if (isr3 & 0x01)
- printk("TE%d10P: RECEIVE slip POSITIVE on span %d\n", wc->numspans, span + 1);
+ printk(KERN_DEBUG "TE%d10P: RECEIVE slip POSITIVE on span %d\n", wc->numspans, span + 1);
if (isr4 & 0x80)
- printk("TE%dXXP: TRANSMIT slip POSITIVE on span %d\n", wc->numspans, span + 1);
+ printk(KERN_DEBUG "TE%dXXP: TRANSMIT slip POSITIVE on span %d\n", wc->numspans, span + 1);
if (isr4 & 0x40)
- printk("TE%d10P: TRANSMIT slip NEGATIVE on span %d\n", wc->numspans, span + 1);
+ printk(KERN_DEBUG "TE%d10P: TRANSMIT slip NEGATIVE on span %d\n", wc->numspans, span + 1);
}
} else
ts->span.timingslips = 0;
@@ -2673,7 +2673,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
if (isr0 & FRMR_ISR0_RME) {
readsize = (t4_framer_in(wc, span, FRMR_RBCH) << 8) | t4_framer_in(wc, span, FRMR_RBCL);
- if (debug & DEBUG_FRAMER) printk("Received data length is %d (%d)\n", readsize, readsize & FRMR_RBCL_MAX_SIZE);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Received data length is %d (%d)\n", readsize, readsize & FRMR_RBCL_MAX_SIZE);
/* RPF isn't set on last part of frame */
if ((readsize > 0) && ((readsize &= FRMR_RBCL_MAX_SIZE) == 0))
readsize = 32;
@@ -2684,7 +2684,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
int i;
unsigned char readbuf[readsize];
- if (debug & DEBUG_FRAMER) printk("Framer %d: Got RPF/RME! readsize is %d\n", sigchan->span->offset, readsize);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Framer %d: Got RPF/RME! readsize is %d\n", sigchan->span->offset, readsize);
for (i = 0; i < readsize; i++)
readbuf[i] = t4_framer_in(wc, span, FRMR_RXFIFO);
@@ -2693,10 +2693,10 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
t4_framer_cmd_wait(wc, span, FRMR_CMDR_RMC);
if (debug & DEBUG_FRAMER) {
- printk("RX(");
+ printk(KERN_DEBUG "RX(");
for (i = 0; i < readsize; i++)
- printk((i ? " %02x" : "%02x"), readbuf[i]);
- printk(")\n");
+ printk(KERN_DEBUG "%s%02x", i ? " " : "", readbuf[i]);
+ printk(KERN_DEBUG ")\n");
}
if (isr0 & FRMR_ISR0_RME) {
@@ -2714,24 +2714,24 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
++ts->frames_in;
if ((debug & DEBUG_FRAMER) && !(ts->frames_in & 0x0f))
- printk("Received %d frames on span %d\n", ts->frames_in, span);
- if (debug & DEBUG_FRAMER) printk("Received HDLC frame %d. RSIS = 0x%x (%x)\n", ts->frames_in, rsis, rsis_reg);
+ printk(KERN_DEBUG "Received %d frames on span %d\n", ts->frames_in, span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Received HDLC frame %d. RSIS = 0x%x (%x)\n", ts->frames_in, rsis, rsis_reg);
if (!(rsis & FRMR_RSIS_CRC16)) {
- if (debug & DEBUG_FRAMER) printk("CRC check failed %d\n", span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "CRC check failed %d\n", span);
dahdi_hdlc_abort(sigchan, DAHDI_EVENT_BADFCS);
} else if (rsis & FRMR_RSIS_RAB) {
- if (debug & DEBUG_FRAMER) printk("ABORT of current frame due to overflow %d\n", span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "ABORT of current frame due to overflow %d\n", span);
dahdi_hdlc_abort(sigchan, DAHDI_EVENT_ABORT);
} else if (rsis & FRMR_RSIS_RDO) {
- if (debug & DEBUG_FRAMER) printk("HDLC overflow occured %d\n", span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "HDLC overflow occured %d\n", span);
dahdi_hdlc_abort(sigchan, DAHDI_EVENT_OVERRUN);
} else if (!(rsis & FRMR_RSIS_VFR)) {
- if (debug & DEBUG_FRAMER) printk("Valid Frame check failed on span %d\n", span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Valid Frame check failed on span %d\n", span);
dahdi_hdlc_abort(sigchan, DAHDI_EVENT_ABORT);
} else {
dahdi_hdlc_putbuf(sigchan, readbuf, readsize - 1);
dahdi_hdlc_finish(sigchan);
- if (debug & DEBUG_FRAMER) printk("Received valid HDLC frame on span %d\n", span);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Received valid HDLC frame on span %d\n", span);
}
#if 0
debug = olddebug;
@@ -2742,18 +2742,18 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
/* Transmit side */
if (isr1 & FRMR_ISR1_XDU) {
- if (debug & DEBUG_FRAMER) printk("XDU: Resetting signal controler!\n");
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "XDU: Resetting signal controler!\n");
t4_framer_cmd_wait(wc, span, FRMR_CMDR_SRES);
} else if (isr1 & FRMR_ISR1_XPR) {
if (debug & DEBUG_FRAMER)
- printk("Sigchan %d is %p\n", sigchan->chanpos, sigchan);
+ printk(KERN_DEBUG "Sigchan %d is %p\n", sigchan->chanpos, sigchan);
- if (debug & DEBUG_FRAMER) printk("Framer %d: Got XPR!\n", sigchan->span->offset);
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "Framer %d: Got XPR!\n", sigchan->span->offset);
t4_hdlc_xmit_fifo(wc, span, ts);
}
if (isr1 & FRMR_ISR1_ALLS) {
- if (debug & DEBUG_FRAMER) printk("ALLS received\n");
+ if (debug & DEBUG_FRAMER) printk(KERN_DEBUG "ALLS received\n");
}
}
@@ -2770,7 +2770,7 @@ DAHDI_IRQ_HANDLER(t4_interrupt)
#if 0
if (wc->intcount < 20)
- printk("Pre-interrupt\n");
+ printk(KERN_DEBUG "Pre-interrupt\n");
#endif
/* Make sure it's really for us */
@@ -2792,14 +2792,14 @@ DAHDI_IRQ_HANDLER(t4_interrupt)
__t4_pci_out(wc, WC_INTR, 0);
if (!wc->spansstarted) {
- printk("Not prepped yet!\n");
+ printk(KERN_NOTICE "Not prepped yet!\n");
return IRQ_NONE;
}
wc->intcount++;
#if 0
if (wc->intcount < 20)
- printk("Got interrupt, status = %08x\n", status);
+ printk(KERN_DEBUG "Got interrupt, status = %08x\n", status);
#endif
if (status & 0x3) {
@@ -2810,10 +2810,10 @@ DAHDI_IRQ_HANDLER(t4_interrupt)
#if 0
if ((wc->intcount < 10) || !(wc->intcount % 1000)) {
status2 = t4_framer_in(wc, 0, FRMR_CIS);
- printk("Status2: %04x\n", status2);
+ printk(KERN_DEBUG "Status2: %04x\n", status2);
for (x = 0;x<wc->numspans;x++) {
status2 = t4_framer_in(wc, x, FRMR_FRS0);
- printk("FRS0/%d: %04x\n", x, status2);
+ printk(KERN_DEBUG "FRS0/%d: %04x\n", x, status2);
}
}
#endif
@@ -2898,7 +2898,7 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
#endif
if (unlikely(!wc->spansstarted)) {
- printk("Not prepped yet!\n");
+ printk(KERN_INFO "Not prepped yet!\n");
return IRQ_NONE;
}
@@ -2906,7 +2906,7 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
if (unlikely((wc->intcount < 20) && debug))
- printk("2G: Got interrupt, status = %08x, CIS = %04x\n", status, t4_framer_in(wc, 0, FRMR_CIS));
+ printk(KERN_INFO "2G: Got interrupt, status = %08x, CIS = %04x\n", status, t4_framer_in(wc, 0, FRMR_CIS));
if (likely(status & 0x2)) {
#ifdef ENABLE_WORKQUEUES
@@ -3022,7 +3022,7 @@ static void t4_vpm_set_dtmf_threshold(struct t4 *wc, unsigned int threshold)
t4_vpm_out(wc, x, 0xC4, (threshold >> 8) & 0xFF);
t4_vpm_out(wc, x, 0xC5, (threshold & 0xFF));
}
- printk("VPM: DTMF threshold set to %d\n", threshold);
+ printk(KERN_INFO "VPM: DTMF threshold set to %d\n", threshold);
}
static unsigned int t4_vpm_mask(int chip)
@@ -3091,7 +3091,7 @@ static void t4_vpm450_init(struct t4 *wc)
#endif
if (!vpmsupport) {
- printk("VPM450: Support Disabled\n");
+ printk(KERN_INFO "VPM450: Support Disabled\n");
return;
}
@@ -3102,9 +3102,9 @@ static void t4_vpm450_init(struct t4 *wc)
check1 = __t4_raw_oct_in(wc, 0x0004);
check2 = __t4_raw_oct_in(wc, 0x000a);
if (debug)
- printk("OCT Result: %04x/%04x\n", __t4_raw_oct_in(wc, 0x0004), __t4_raw_oct_in(wc, 0x000a));
+ printk(KERN_DEBUG "OCT Result: %04x/%04x\n", __t4_raw_oct_in(wc, 0x0004), __t4_raw_oct_in(wc, 0x000a));
if (__t4_raw_oct_in(wc, 0x0004) != 0x1234) {
- printk("VPM450: Not Present\n");
+ printk(KERN_NOTICE "VPM450: Not Present\n");
return;
}
@@ -3119,7 +3119,7 @@ static void t4_vpm450_init(struct t4 *wc)
#if defined(HOTPLUG_FIRMWARE)
if ((request_firmware(&firmware, oct064_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("VPM450: firmware %s not available from userspace\n", oct064_firmware);
+ printk(KERN_NOTICE "VPM450: firmware %s not available from userspace\n", oct064_firmware);
return;
}
#else
@@ -3137,7 +3137,7 @@ static void t4_vpm450_init(struct t4 *wc)
#if defined(HOTPLUG_FIRMWARE)
if ((request_firmware(&firmware, oct128_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("VPM450: firmware %s not available from userspace\n", oct128_firmware);
+ printk(KERN_NOTICE "VPM450: firmware %s not available from userspace\n", oct128_firmware);
return;
}
#else
@@ -3152,12 +3152,12 @@ static void t4_vpm450_init(struct t4 *wc)
#endif
break;
default:
- printk("Unsupported channel capacity found on VPM module (%d).\n", vpm_capacity);
+ printk(KERN_NOTICE "Unsupported channel capacity found on VPM module (%d).\n", vpm_capacity);
return;
}
if (!(wc->vpm450m = init_vpm450m(wc, laws, wc->numspans, firmware))) {
- printk("VPM450: Failed to initialize\n");
+ printk(KERN_NOTICE "VPM450: Failed to initialize\n");
if (firmware != &embedded_firmware)
release_firmware(firmware);
return;
@@ -3167,12 +3167,12 @@ static void t4_vpm450_init(struct t4 *wc)
release_firmware(firmware);
if (vpmdtmfsupport == -1) {
- printk("VPM450: hardware DTMF disabled.\n");
+ printk(KERN_NOTICE "VPM450: hardware DTMF disabled.\n");
vpmdtmfsupport = 0;
}
wc->vpm = T4_VPM_PRESENT;
- printk("VPM450: Present and operational servicing %d span(s)\n", wc->numspans);
+ printk(KERN_INFO "VPM450: Present and operational servicing %d span(s)\n", wc->numspans);
}
@@ -3184,7 +3184,7 @@ static void t4_vpm400_init(struct t4 *wc)
unsigned int i, x, y, gen2vpm=0;
if (!vpmsupport) {
- printk("VPM400: Support Disabled\n");
+ printk(KERN_INFO "VPM400: Support Disabled\n");
return;
}
@@ -3194,7 +3194,7 @@ static void t4_vpm400_init(struct t4 *wc)
case 1:
break;
default:
- printk("VPM400: %d is not a valid vpmspans value, using 4\n", vpmspans);
+ printk(KERN_NOTICE "VPM400: %d is not a valid vpmspans value, using 4\n", vpmspans);
vpmspans = 4;
}
@@ -3205,18 +3205,18 @@ static void t4_vpm400_init(struct t4 *wc)
ver = t4_vpm_in(wc, x, 0x1a0); /* revision */
if ((ver != 0x26) && (ver != 0x33)) {
- printk("VPM400: %s\n", x ? "Inoperable" : "Not Present");
+ printk(KERN_NOTICE "VPM400: %s\n", x ? "Inoperable" : "Not Present");
return;
}
if (ver == 0x33) {
if (x && !gen2vpm) {
- printk("VPM400: Inconsistent\n");
+ printk(KERN_NOTICE "VPM400: Inconsistent\n");
return;
}
ts->spanflags |= FLAG_VPM2GEN;
gen2vpm++;
} else if (gen2vpm) {
- printk("VPM400: Inconsistent\n");
+ printk(KERN_NOTICE "VPM400: Inconsistent\n");
return;
}
@@ -3249,11 +3249,11 @@ static void t4_vpm400_init(struct t4 *wc)
reg &= 0xE0;
if (ts->spantype == TYPE_E1) {
if (x < vpmspans)
- printk("VPM400: Span %d A-law mode\n", spanno);
+ printk(KERN_INFO "VPM400: Span %d A-law mode\n", spanno);
reg |= 0x01;
} else {
if (x < vpmspans)
- printk("VPM400: Span %d U-law mode\n", spanno);
+ printk(KERN_INFO "VPM400: Span %d U-law mode\n", spanno);
reg &= ~0x01;
}
t4_vpm_out(wc,x,0x20,(reg | 0x20));
@@ -3309,10 +3309,10 @@ static void t4_vpm400_init(struct t4 *wc)
}
if (vpmdtmfsupport == -1) {
- printk("VPM400: hardware DTMF enabled.\n");
+ printk(KERN_INFO "VPM400: hardware DTMF enabled.\n");
vpmdtmfsupport = 0;
}
- printk("VPM400%s: Present and operational servicing %d span(s)\n", (gen2vpm ? " (2nd Gen)" : ""), wc->numspans);
+ printk(KERN_INFO "VPM400%s: Present and operational servicing %d span(s)\n", (gen2vpm ? " (2nd Gen)" : ""), wc->numspans);
wc->vpm = T4_VPM_PRESENT;
}
@@ -3366,7 +3366,7 @@ static void t4_tsi_unassign(struct t4 *wc, int tospan, int tochan)
wc->dmactrl |= (0x00004000 | (tots << 7));
__t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
if (debug & DEBUG_TSI)
- printk("Sending '%08x\n", wc->dmactrl);
+ printk(KERN_DEBUG "Sending '%08x\n", wc->dmactrl);
wc->dmactrl &= ~0x00007fff;
__t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
spin_unlock_irqrestore(&wc->reglock, flags);
@@ -3377,9 +3377,9 @@ static int t4_hardware_init_1(struct t4 *wc, unsigned int cardflags)
unsigned int version;
version = t4_pci_in(wc, WC_VERSION);
- printk("TE%dXXP version %08x, burst %s\n", wc->numspans, version, (!(cardflags & FLAG_BURST) && noburst) ? "OFF" : "ON");
+ printk(KERN_INFO "TE%dXXP version %08x, burst %s\n", wc->numspans, version, (!(cardflags & FLAG_BURST) && noburst) ? "OFF" : "ON");
#ifdef ENABLE_WORKQUEUES
- printk("TE%dXXP running with work queues.\n", wc->numspans);
+ printk(KERN_INFO "TE%dXXP running with work queues.\n", wc->numspans);
#endif
/* Make sure DMA engine is not running and interrupts are acknowledged */
@@ -3419,7 +3419,7 @@ static int t4_hardware_init_2(struct t4 *wc)
if (t4_pci_in(wc, WC_VERSION) >= 0xc01a0165) {
wc->tspans[0]->spanflags |= FLAG_OCTOPT;
- printk("Octasic optimized!\n");
+ printk(KERN_INFO "Octasic optimized!\n");
}
/* Setup LEDS, take out of reset */
t4_pci_out(wc, WC_LEDS, 0x000000ff);
@@ -3427,10 +3427,10 @@ static int t4_hardware_init_2(struct t4 *wc)
t4_framer_out(wc, 0, 0x4a, 0xaa);
falcver = t4_framer_in(wc, 0 ,0x4a);
- printk("FALC version: %08x, Board ID: %02x\n", falcver, wc->order);
+ printk(KERN_INFO "FALC version: %08x, Board ID: %02x\n", falcver, wc->order);
for (x=0;x< 11;x++)
- printk("Reg %d: 0x%08x\n", x, t4_pci_in(wc, x));
+ printk(KERN_INFO "Reg %d: 0x%08x\n", x, t4_pci_in(wc, x));
return 0;
}
@@ -3440,7 +3440,7 @@ static int __devinit t4_launch(struct t4 *wc)
unsigned long flags;
if (wc->tspans[0]->span.flags & DAHDI_FLAG_REGISTERED)
return 0;
- printk("TE%dXXP: Launching card: %d\n", wc->numspans, wc->order);
+ printk(KERN_INFO "TE%dXXP: Launching card: %d\n", wc->numspans, wc->order);
/* Setup serial parameters and system interface */
for (x=0;x<wc->numspans;x++)
@@ -3539,12 +3539,12 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
wc->last0 = 1;
#if 0
if (!request_mem_region(wc->memaddr, wc->memlen, wc->variety))
- printk("wct4: Unable to request memory region :(, using anyway...\n");
+ printk(KERN_INFO "wct4: Unable to request memory region :(, using anyway...\n");
#endif
if (pci_request_regions(pdev, wc->variety))
- printk("wct%dxxp: Unable to request regions\n", wc->numspans);
+ printk(KERN_INFO "wct%dxxp: Unable to request regions\n", wc->numspans);
- printk("Found TE%dXXP at base address %08lx, remapped to %p\n", wc->numspans, wc->memaddr, wc->membase);
+ printk(KERN_INFO "Found TE%dXXP at base address %08lx, remapped to %p\n", wc->numspans, wc->memaddr, wc->membase);
wc->dev = pdev;
@@ -3552,7 +3552,7 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
/* 32 channels, Double-buffer, Read/Write, 4 spans */
(unsigned int *)pci_alloc_consistent(pdev, basesize * 2, &wc->writedma);
if (!wc->writechunk) {
- printk("wct%dxxp: Unable to allocate DMA-able memory\n", wc->numspans);
+ printk(KERN_NOTICE "wct%dxxp: Unable to allocate DMA-able memory\n", wc->numspans);
return -ENOMEM;
}
@@ -3587,7 +3587,7 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
}
if (x >= MAX_T4_CARDS) {
- printk("No cards[] slot available!!\n");
+ printk(KERN_NOTICE "No cards[] slot available!!\n");
kfree(wc);
return -ENOMEM;
}
@@ -3643,14 +3643,14 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
if (request_irq(pdev->irq, (dt->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 : t4_interrupt, DAHDI_IRQ_SHARED_DISABLED, (wc->numspans == 2) ? "wct2xxp" : "wct4xxp", wc))
#else
if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN)) {
- printk("This driver does not support 1st gen modules\n");
+ printk(KERN_NOTICE "This driver does not support 1st gen modules\n");
free_wc(wc);
return -ENODEV;
}
if (request_irq(pdev->irq, t4_interrupt_gen2, DAHDI_IRQ_SHARED_DISABLED, "t4xxp", wc))
#endif
{
- printk("t4xxp: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "t4xxp: Unable to request IRQ %d\n", pdev->irq);
free_wc(wc);
return -EIO;
}
@@ -3675,7 +3675,7 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
break;
}
- printk("Found a Wildcard: %s\n", wc->variety);
+ printk(KERN_INFO "Found a Wildcard: %s\n", wc->variety);
wc->gpio = 0x00000000;
t4_pci_out(wc, WC_GPIO, wc->gpio);
t4_gpio_setdir(wc, (1 << 17), (1 << 17));
@@ -3686,9 +3686,9 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
__t4_raw_oct_out(wc, 0x0004, x);
__t4_raw_oct_out(wc, 0x000a, x ^ 0xffff);
if (__t4_raw_oct_in(wc, 0x0004) != x)
- printk("Register 4 failed %04x\n", x);
+ printk(KERN_DEBUG "Register 4 failed %04x\n", x);
if (__t4_raw_oct_in(wc, 0x000a) != (x ^ 0xffff))
- printk("Register 10 failed %04x\n", x);
+ printk(KERN_DEBUG "Register 10 failed %04x\n", x);
}
#endif
@@ -3716,7 +3716,7 @@ static int t4_hardware_stop(struct t4 *wc)
t4_pci_out(wc, WC_GPIO, wc->gpio);
t4_pci_out(wc, WC_LEDS, 0x00000000);
- printk("\nStopped TE%dXXP, Turned off DMA\n", wc->numspans);
+ printk(KERN_NOTICE "\nStopped TE%dXXP, Turned off DMA\n", wc->numspans);
return 0;
}
diff --git a/drivers/dahdi/wct4xxp/vpm450m.c b/drivers/dahdi/wct4xxp/vpm450m.c
index 674dd49..2302e41 100644
--- a/drivers/dahdi/wct4xxp/vpm450m.c
+++ b/drivers/dahdi/wct4xxp/vpm450m.c
@@ -57,7 +57,7 @@ UINT32 Oct6100UserCreateSerializeObject(tPOCT6100_CREATE_SERIALIZE_OBJECT f_pCre
UINT32 Oct6100UserDestroySerializeObject(tPOCT6100_DESTROY_SERIALIZE_OBJECT f_pDestroy)
{
#ifdef OCTASIC_DEBUG
- printk("I should never be called! (destroy serialize object)\n");
+ printk(KERN_DEBUG "I should never be called! (destroy serialize object)\n");
#endif
return cOCT6100_ERR_OK;
}
@@ -218,7 +218,7 @@ static void vpm450m_setecmode(struct vpm450m *vpm450m, int channel, int mode)
return;
modify = kmalloc(sizeof(tOCT6100_CHANNEL_MODIFY), GFP_ATOMIC);
if (!modify) {
- printk("wct4xxp: Unable to allocate memory for setec!\n");
+ printk(KERN_NOTICE "wct4xxp: Unable to allocate memory for setec!\n");
return;
}
Oct6100ChannelModifyDef(modify);
@@ -226,10 +226,10 @@ static void vpm450m_setecmode(struct vpm450m *vpm450m, int channel, int mode)
modify->ulChannelHndl = vpm450m->aulEchoChanHndl[channel];
ulResult = Oct6100ChannelModify(vpm450m->pApiInstance, modify);
if (ulResult != GENERIC_OK) {
- printk("Failed to apply echo can changes on channel %d!\n", channel);
+ printk(KERN_NOTICE "Failed to apply echo can changes on channel %d!\n", channel);
} else {
#ifdef OCTASIC_DEBUG
- printk("Echo can on channel %d set to %d\n", channel, mode);
+ printk(KERN_DEBUG "Echo can on channel %d set to %d\n", channel, mode);
#endif
vpm450m->ecmode[channel] = mode;
}
@@ -243,7 +243,7 @@ void vpm450m_setdtmf(struct vpm450m *vpm450m, int channel, int detect, int mute)
modify = kmalloc(sizeof(tOCT6100_CHANNEL_MODIFY), GFP_KERNEL);
if (!modify) {
- printk("wct4xxp: Unable to allocate memory for setdtmf!\n");
+ printk(KERN_NOTICE "wct4xxp: Unable to allocate memory for setdtmf!\n");
return;
}
Oct6100ChannelModifyDef(modify);
@@ -271,9 +271,9 @@ void vpm450m_setdtmf(struct vpm450m *vpm450m, int channel, int detect, int mute)
ulResult = Oct6100ChannelModify(vpm450m->pApiInstance, modify);
if (ulResult != GENERIC_OK) {
- printk("Failed to apply dtmf mute changes on channel %d!\n", channel);
+ printk(KERN_NOTICE "Failed to apply dtmf mute changes on channel %d!\n", channel);
}
-/* printk("VPM450m: Setting DTMF on channel %d: %s / %s\n", channel, (detect ? "DETECT" : "NO DETECT"), (mute ? "MUTE" : "NO MUTE")); */
+/* printk(KERN_DEBUG "VPM450m: Setting DTMF on channel %d: %s / %s\n", channel, (detect ? "DETECT" : "NO DETECT"), (mute ? "MUTE" : "NO MUTE")); */
kfree(modify);
}
@@ -291,7 +291,7 @@ void vpm450m_setec(struct vpm450m *vpm450m, int channel, int eclen)
} else
vpm450m_setecmode(vpm450m, channel, cOCT6100_ECHO_OP_MODE_DIGITAL);
}
-/* printk("VPM450m: Setting EC on channel %d to %d\n", channel, eclen); */
+/* printk(KERN_DEBUG "VPM450m: Setting EC on channel %d to %d\n", channel, eclen); */
}
int vpm450m_checkirq(struct vpm450m *vpm450m)
@@ -372,7 +372,7 @@ int vpm450m_getdtmf(struct vpm450m *vpm450m, int *channel, int *tone, int *start
break;
default:
#ifdef OCTASIC_DEBUG
- printk("Unknown tone value %08x\n", tonefound.ulToneDetected);
+ printk(KERN_DEBUG "Unknown tone value %08x\n", tonefound.ulToneDetected);
#endif
*tone = 'u';
break;
@@ -399,7 +399,7 @@ unsigned int get_vpm450m_capacity(void *wc)
ulResult = Oct6100ApiGetCapacityPins(&CapacityPins);
if (ulResult != cOCT6100_ERR_OK) {
- printk("Failed to get chip capacity, code %08x!\n", ulResult);
+ printk(KERN_DEBUG "Failed to get chip capacity, code %08x!\n", ulResult);
return 0;
}
@@ -442,7 +442,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
vpm450m->ecmode[x] = -1;
vpm450m->numchans = numspans * 32;
- printk("VPM450: echo cancellation for %d channels\n", vpm450m->numchans);
+ printk(KERN_INFO "VPM450: echo cancellation for %d channels\n", vpm450m->numchans);
Oct6100ChipOpenDef(ChipOpen);
@@ -469,7 +469,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
ulResult = Oct6100GetInstanceSize(ChipOpen, &InstanceSize);
if (ulResult != cOCT6100_ERR_OK) {
- printk("Failed to get instance size, code %08x!\n", ulResult);
+ printk(KERN_NOTICE "Failed to get instance size, code %08x!\n", ulResult);
kfree(vpm450m);
kfree(ChipOpen);
kfree(ChannelOpen);
@@ -479,7 +479,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
vpm450m->pApiInstance = vmalloc(InstanceSize.ulApiInstanceSize);
if (!vpm450m->pApiInstance) {
- printk("Out of memory (can't allocate %d bytes)!\n", InstanceSize.ulApiInstanceSize);
+ printk(KERN_NOTICE "Out of memory (can't allocate %d bytes)!\n", InstanceSize.ulApiInstanceSize);
kfree(vpm450m);
kfree(ChipOpen);
kfree(ChannelOpen);
@@ -496,7 +496,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
#endif
ulResult = Oct6100ChipOpen(vpm450m->pApiInstance, ChipOpen);
if (ulResult != cOCT6100_ERR_OK) {
- printk("Failed to open chip, code %08x!\n", ulResult);
+ printk(KERN_NOTICE "Failed to open chip, code %08x!\n", ulResult);
#ifdef CONFIG_4KSTACKS
local_irq_restore(flags);
#endif
@@ -541,7 +541,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
ulResult = Oct6100ChannelOpen(vpm450m->pApiInstance, ChannelOpen);
if (ulResult != GENERIC_OK) {
- printk("Failed to open channel %d!\n", x);
+ printk(KERN_NOTICE "Failed to open channel %d!\n", x);
}
for (y=0;y<sizeof(tones) / sizeof(tones[0]); y++) {
tOCT6100_TONE_DETECTION_ENABLE enable;
@@ -549,7 +549,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
enable.ulChannelHndl = vpm450m->aulEchoChanHndl[x];
enable.ulToneNumber = tones[y];
if (Oct6100ToneDetectionEnable(vpm450m->pApiInstance, &enable) != GENERIC_OK)
- printk("Failed to enable tone detection on channel %d for tone %d!\n", x, y);
+ printk(KERN_NOTICE "Failed to enable tone detection on channel %d for tone %d!\n", x, y);
}
}
}
@@ -570,7 +570,7 @@ void release_vpm450m(struct vpm450m *vpm450m)
Oct6100ChipCloseDef(&ChipClose);
ulResult = Oct6100ChipClose(vpm450m->pApiInstance, &ChipClose);
if (ulResult != cOCT6100_ERR_OK) {
- printk("Failed to close chip, code %08x!\n", ulResult);
+ printk(KERN_NOTICE "Failed to close chip, code %08x!\n", ulResult);
}
vfree(vpm450m->pApiInstance);
kfree(vpm450m);
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 426fcb2..9d9a1ed 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -283,7 +283,7 @@
down(&wc->cmdqsem); \
wc->last_command_sent = hex; \
if ( (((wc->cmdq_wndx + 1) % MAX_COMMANDS) == wc->cmdq_rndx) && debug ) \
- printk("wcdte error: cmdq is full.\n"); \
+ printk(KERN_NOTICE "wcdte error: cmdq is full.\n"); \
else { \
unsigned char fifo[OTHER_CMD_LEN] = command; \
int i; \
@@ -438,7 +438,7 @@ static int __dump_descriptors(struct wcdte *wc)
if (debug_des_cnt == 0)
return 1;
- printk("Transmit Descriptors (wc->tdbl = %d)\n", wc->tdbl);
+ printk(KERN_DEBUG "Transmit Descriptors (wc->tdbl = %d)\n", wc->tdbl);
for (i = 0; i < ERING_SIZE; i++)
{
writechunk = (volatile unsigned char *)(wc->writechunk);
@@ -446,9 +446,9 @@ static int __dump_descriptors(struct wcdte *wc)
o2 = i * 4;
if (i == wc->tdbl)
- printk("->");
+ printk(KERN_DEBUG "->");
else
- printk(" ");
+ printk(KERN_DEBUG " ");
if ((le32_to_cpu(wc->descripchunk[o2]) & 0x80000000))
printk("AN983 owns : ");
else
@@ -459,7 +459,7 @@ static int __dump_descriptors(struct wcdte *wc)
printk("\n");
}
- printk("Receive Descriptors (wc->rdbl = %d)\n", wc->rdbl);
+ printk(KERN_DEBUG "Receive Descriptors (wc->rdbl = %d)\n", wc->rdbl);
for (i = 0; i < ERING_SIZE; i++)
{
readchunk = (volatile unsigned char *)wc->readchunk;
@@ -468,9 +468,9 @@ static int __dump_descriptors(struct wcdte *wc)
o2 += ERING_SIZE * 4;
if (i == wc->rdbl)
- printk("->");
+ printk(KERN_DEBUG "->");
else
- printk(" ");
+ printk(KERN_DEBUG " ");
if ((le32_to_cpu(wc->descripchunk[o2]) & 0x80000000))
printk("AN983 owns : ");
else
@@ -642,7 +642,7 @@ static inline int __transmit_demand(struct wcdte *wc)
if (debug_packets && (writechunk[12] == 0x88) && (writechunk[13] == 0x9B))
{
- printk("wcdte debug: TX: ");
+ printk(KERN_DEBUG "wcdte debug: TX: ");
for (i=0; i<debug_packets; i++)
printk("%02X ", writechunk[i]);
printk("\n");
@@ -828,7 +828,7 @@ static int dte_operation(struct dahdi_transcoder_channel *ztc, int op)
down(&wc->cmdqsem);
if ( (((wc->cmdq_wndx + 1) % MAX_COMMANDS) == wc->cmdq_rndx) && debug )
- printk("wcdte error: cmdq is full.\n");
+ printk(KERN_NOTICE "wcdte error: cmdq is full.\n");
else
{
wc->cmdq[wc->cmdq_wndx].cmdlen = CMD_MSG_IP_UDP_RTP_LEN+inbytes;
@@ -886,7 +886,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
{
if (debug_packets)
{
- printk("wcdte debug: RX: ");
+ printk(KERN_DEBUG "wcdte debug: RX: ");
for (i=0; i<debug_packets; i++)
printk("%02X ", readchunk[i]);
printk("\n");
@@ -901,7 +901,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
down(&wc->cmdqsem);
if ((readchunk[17] & 0x40) == 0) {
if ( (((wc->cmdq_wndx + 1) % MAX_COMMANDS) == wc->cmdq_rndx) && debug )
- printk("wcdte error: cmdq is full (rndx = %d, wndx = %d).\n", wc->cmdq_rndx, wc->cmdq_wndx);
+ printk(KERN_NOTICE "wcdte error: cmdq is full (rndx = %d, wndx = %d).\n", wc->cmdq_rndx, wc->cmdq_wndx);
else
{
unsigned char fifo[OTHER_CMD_LEN] = CMD_MSG_ACK(rseq++, rchannel);
@@ -922,7 +922,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
wake_up(&wc->regq);
} else {
if (debug)
- printk("wcdte error: unexpected command response received (sent: %04X, received: %04X)\n", wc->last_command_sent, rcommand);
+ printk(KERN_DEBUG "wcdte error: unexpected command response received (sent: %04X, received: %04X)\n", wc->last_command_sent, rcommand);
}
up(&wc->cmdqsem);
}
@@ -939,7 +939,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
if ((readchunk[22] == 0x75) && (readchunk[23] = 0xC1))
{
if (debug)
- printk("wcdte error: received alert (0x%02X%02X) from dsp\n", readchunk[29], readchunk[28]);
+ printk(KERN_DEBUG "wcdte error: received alert (0x%02X%02X) from dsp\n", readchunk[29], readchunk[28]);
if (debug_des) {
down(&wc->cmdqsem);
__dump_descriptors(wc);
@@ -948,6 +948,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
}
if (wc->dumping && (readchunk[22] == 0x04) && (readchunk[23] = 0x14)) {
+ printk(KERN_DEBUG);
for (i = 27; i < 227; i++)
printk("%02X ", readchunk[i]);
printk("\n");
@@ -968,7 +969,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
if (ztc_ndx >= wc->numchannels)
{
if (debug)
- printk("wcdte error: Invalid channel number received (ztc_ndx = %d) (numchannels = %d)\n", ztc_ndx, wc->numchannels);
+ printk(KERN_DEBUG "wcdte error: Invalid channel number received (ztc_ndx = %d) (numchannels = %d)\n", ztc_ndx, wc->numchannels);
rcodec = DTE_FORMAT_UNDEF;
}
@@ -981,7 +982,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
if (zth == NULL)
{
if (debug)
- printk("wcdte error: Tried to put DTE data into a freed zth header! (ztc_ndx = %d, ztc->chan_built = %d)\n", ztc_ndx, ztc->chan_built);
+ printk(KERN_DEBUG "wcdte error: Tried to put DTE data into a freed zth header! (ztc_ndx = %d, ztc->chan_built = %d)\n", ztc_ndx, ztc->chan_built);
if (debug_des) {
down(&wc->cmdqsem);
__dump_descriptors(wc);
@@ -1004,7 +1005,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
if (zth == NULL)
{
if (debug)
- printk("wcdte error: Tried to put DTE data into a freed zth header! (ztc_ndx = %d, ztc->chan_built = %d)\n", ztc_ndx, ztc->chan_built);
+ printk(KERN_DEBUG "wcdte error: Tried to put DTE data into a freed zth header! (ztc_ndx = %d, ztc->chan_built = %d)\n", ztc_ndx, ztc->chan_built);
if (debug_des) {
down(&wc->cmdqsem);
__dump_descriptors(wc);
@@ -1025,7 +1026,7 @@ static inline void wcdte_receiveprep(struct wcdte *wc, int dbl)
} else {
rtp_eseq = (st->last_dte_seqno + 1) & 0xFFFF;
if ( (rtp_rseq != rtp_eseq) && debug )
- printk("wcdte error: Bad seqno from DTE! [%04X][%d][%d][%d]\n", (readchunk[37] | (readchunk[36] << 8)), rchannel, rtp_rseq, st->last_dte_seqno);
+ printk(KERN_NOTICE "wcdte error: Bad seqno from DTE! [%04X][%d][%d][%d]\n", (readchunk[37] | (readchunk[36] << 8)), rchannel, rtp_rseq, st->last_dte_seqno);
st->last_dte_seqno = rtp_rseq;
}
@@ -1197,28 +1198,28 @@ DAHDI_IRQ_HANDLER(wcdte_interrupt)
}
if ((ints & 0x00008000) && debug)
- printk("wcdte: Abnormal Interrupt: ");
+ printk(KERN_DEBUG "wcdte: Abnormal Interrupt: \n");
if ((ints & 0x00002000) && debug)
- printk("wcdte: Fatal Bus Error INT\n");
+ printk(KERN_DEBUG "wcdte: Fatal Bus Error INT\n");
if ((ints & 0x00000100) && debug)
- printk("wcdte: Receive Stopped INT\n");
+ printk(KERN_DEBUG "wcdte: Receive Stopped INT\n");
if ((ints & 0x00000080) && debug)
- printk("wcdte: Receive Desciptor Unavailable INT\n");
+ printk(KERN_DEBUG "wcdte: Receive Desciptor Unavailable INT\n");
if ((ints & 0x00000020) && debug)
- printk("wcdte: Transmit Under-flow INT\n");
+ printk(KERN_DEBUG "wcdte: Transmit Under-flow INT\n");
if ((ints & 0x00000008) && debug)
- printk("wcdte: Jabber Timer Time-out INT\n");
+ printk(KERN_DEBUG "wcdte: Jabber Timer Time-out INT\n");
if ((ints & 0x00000004) && debug)
- printk("wcdte: Transmit Descriptor Unavailable INT\n");
+ printk(KERN_DEBUG "wcdte: Transmit Descriptor Unavailable INT\n");
if ((ints & 0x00000002) && debug)
- printk("wcdte: Transmit Processor Stopped INT\n");
+ printk(KERN_DEBUG "wcdte: Transmit Processor Stopped INT\n");
return IRQ_RETVAL(1);
@@ -1334,13 +1335,13 @@ static int wcdte_waitfor_csmencaps(struct wcdte *wc, unsigned int mask, int wait
if (ret < 0)
{
if (debug)
- printk("wcdte error: Wait interrupted, need to stop boot (ret = %d)\n", ret);
+ printk(KERN_DEBUG "wcdte error: Wait interrupted, need to stop boot (ret = %d)\n", ret);
return(1);
}
if (ret == 0)
{
if (debug)
- printk("wcdte error: Waitfor CSMENCAPS response timed out (ret = %d) (cmd_snt = %04X)\n", ret, wc->last_command_sent);
+ printk(KERN_DEBUG "wcdte error: Waitfor CSMENCAPS response timed out (ret = %d) (cmd_snt = %04X)\n", ret, wc->last_command_sent);
if (debug_des) {
down(&wc->cmdqsem);
__dump_descriptors(wc);
@@ -1431,7 +1432,7 @@ static int wcdte_boot_processor(struct wcdte *wc, const struct firmware *firmwar
/* Turn off auto negotiation */
wcdte_write_phy(wc, 0, 0x2100);
if (debug)
- printk("wcdte: PHY register 0 = %X", wcdte_read_phy(wc, 0));
+ printk(KERN_DEBUG "wcdte: PHY register 0 = %X", wcdte_read_phy(wc, 0));
/* Set reset */
wcdte_setctl(wc, 0x00A0, 0x04000000);
@@ -1452,7 +1453,7 @@ static int wcdte_boot_processor(struct wcdte *wc, const struct firmware *firmwar
if (delay_count >= 5000)
{
- printk("wcdte error: Failed to link to DTE processor!\n");
+ printk(KERN_NOTICE "wcdte error: Failed to link to DTE processor!\n");
return(1);
}
} while ((reg & 0xE0000000) != 0xE0000000);
@@ -1466,7 +1467,7 @@ static int wcdte_boot_processor(struct wcdte *wc, const struct firmware *firmwar
reg = wcdte_getctl(wc, 0x00fc);
if (debug)
- printk("wcdte: LINK STATUS: reg(0xfc) = %X\n", reg);
+ printk(KERN_DEBUG "wcdte: LINK STATUS: reg(0xfc) = %X\n", reg);
reg = wcdte_getctl(wc, 0x00A0);
@@ -1481,7 +1482,7 @@ static int wcdte_boot_processor(struct wcdte *wc, const struct firmware *firmwar
down(&wc->cmdqsem);
if ( (((wc->cmdq_wndx + 1) % MAX_COMMANDS) == wc->cmdq_rndx) && debug )
- printk("wcdte error: cmdq is full.\n");
+ printk(KERN_NOTICE "wcdte error: cmdq is full.\n");
else
{
wc->cmdq[wc->cmdq_wndx].cmdlen = length;
@@ -1515,7 +1516,7 @@ static int wcdte_boot_processor(struct wcdte *wc, const struct firmware *firmwar
/* Turn on booted LED */
wcdte_setctl(wc, 0x00A0, 0x04080000);
if(debug)
- printk("wcdte: Successfully booted DTE processor.\n");
+ printk(KERN_DEBUG "wcdte: Successfully booted DTE processor.\n");
return(0);
}
@@ -1673,7 +1674,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
for (x=0;x<WC_MAX_IFACES;x++)
if (!ifaces[x]) break;
if (x >= WC_MAX_IFACES) {
- printk("wcdte: Too many interfaces\n");
+ printk(KERN_NOTICE "wcdte: Too many interfaces\n");
return -EIO;
}
@@ -1717,7 +1718,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
/* Allocate enought memory for all TX buffers, RX buffers, and descriptors */
wc->writechunk = (int *)pci_alloc_consistent(pdev, PCI_WINDOW_SIZE, &wc->writedma);
if (!wc->writechunk) {
- printk("wcdte error: Unable to allocate DMA-able memory\n");
+ printk(KERN_NOTICE "wcdte error: Unable to allocate DMA-able memory\n");
if (wc->freeregion)
release_region(wc->iobase, 0xff);
return -ENOMEM;
@@ -1746,7 +1747,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
#if defined(HOTPLUG_FIRMWARE)
if ((request_firmware(&firmware, tc400m_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("TC400M: firmware %s not available from userspace\n", tc400m_firmware);
+ printk(KERN_NOTICE "TC400M: firmware %s not available from userspace\n", tc400m_firmware);
return -EIO;
}
#else
@@ -1824,7 +1825,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
dahdi_transcoder_register(uencode);
dahdi_transcoder_register(udecode);
- printk("DAHDI DTE (%s) Transcoder support LOADED (firm ver = %d.%d)\n", wc->complexname, dte_firmware_ver, dte_firmware_ver_minor);
+ printk(KERN_INFO "DAHDI DTE (%s) Transcoder support LOADED (firm ver = %d.%d)\n", wc->complexname, dte_firmware_ver, dte_firmware_ver_minor);
/* Enable bus mastering */
@@ -1834,7 +1835,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
pci_set_drvdata(pdev, wc);
if (request_irq(pdev->irq, wcdte_interrupt, DAHDI_IRQ_SHARED, "tc400b", wc)) {
- printk("wcdte error: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "wcdte error: Unable to request IRQ %d\n", pdev->irq);
if (wc->freeregion)
release_region(wc->iobase, 0xff);
pci_free_consistent(pdev, PCI_WINDOW_SIZE, (void *)wc->writechunk, wc->writedma);
@@ -1897,12 +1898,12 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
reg = wcdte_getctl(wc, 0x00fc);
if (debug)
- printk("wcdte debug: (post-boot) Reg fc is %08x\n", reg);
+ printk(KERN_DEBUG "wcdte debug: (post-boot) Reg fc is %08x\n", reg);
- printk("Found and successfully installed a Wildcard TC: %s \n", wc->variety);
+ printk(KERN_INFO "Found and successfully installed a Wildcard TC: %s \n", wc->variety);
if (debug) {
- printk("TC400B operating in DEBUG mode\n");
- printk("debug_des = %d, debug_des_cnt = %d, force_alert = %d,\n debug_notimeout = %d, debug_packets = %d\n",
+ printk(KERN_DEBUG "TC400B operating in DEBUG mode\n");
+ printk(KERN_DEBUG "debug_des = %d, debug_des_cnt = %d, force_alert = %d,\n debug_notimeout = %d, debug_packets = %d\n",
debug_des, debug_des_cnt, force_alert, debug_notimeout, debug_packets);
}
res = 0;
@@ -1929,8 +1930,8 @@ static void __devexit wcdte_remove_one(struct pci_dev *pdev)
if (wc) {
if (debug)
{
- printk("wcdte debug: wc->ztsnd_rtx = %d\n", wc->ztsnd_rtx);
- printk("wcdte debug: wc->ztsnd_0010_rtx = %d\n", wc->ztsnd_0010_rtx);
+ printk(KERN_DEBUG "wcdte debug: wc->ztsnd_rtx = %d\n", wc->ztsnd_rtx);
+ printk(KERN_DEBUG "wcdte debug: wc->ztsnd_0010_rtx = %d\n", wc->ztsnd_0010_rtx);
for(i = 0; i < wc->numchannels; i++)
{
@@ -1940,8 +1941,8 @@ static void __devexit wcdte_remove_one(struct pci_dev *pdev)
ztc_de = &(wc->udecode->channels[i]);
st_de = ztc_de->pvt;
- printk("wcdte debug: en[%d] snt = %d, rcv = %d [%d]\n", i, st_en->packets_sent, st_en->packets_received, st_en->packets_sent - st_en->packets_received);
- printk("wcdte debug: de[%d] snt = %d, rcv = %d [%d]\n", i, st_de->packets_sent, st_de->packets_received, st_de->packets_sent - st_de->packets_received);
+ printk(KERN_DEBUG "wcdte debug: en[%d] snt = %d, rcv = %d [%d]\n", i, st_en->packets_sent, st_en->packets_received, st_en->packets_sent - st_en->packets_received);
+ printk(KERN_DEBUG "wcdte debug: de[%d] snt = %d, rcv = %d [%d]\n", i, st_de->packets_sent, st_de->packets_received, st_de->packets_sent - st_de->packets_received);
}
}
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index ad2cbb1..a19ff01 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -344,13 +344,13 @@ static inline void ring_check(struct wctdm *wc, int card)
/* Look for pegging to indicate ringing */
sample = DAHDI_XLAW(wc->chans[card].readchunk[x], (&(wc->chans[card])));
if ((sample > 10000) && (wc->mod[card].fxo.peg != 1)) {
- if (debug > 1) printk("High peg!\n");
+ if (debug > 1) printk(KERN_DEBUG "High peg!\n");
if ((wc->mod[card].fxo.pegtimer < PEGTIME) && (wc->mod[card].fxo.pegtimer > MINPEGTIME))
wc->mod[card].fxo.pegcount++;
wc->mod[card].fxo.pegtimer = 0;
wc->mod[card].fxo.peg = 1;
} else if ((sample < -10000) && (wc->mod[card].fxo.peg != -1)) {
- if (debug > 1) printk("Low peg!\n");
+ if (debug > 1) printk(KERN_DEBUG "Low peg!\n");
if ((wc->mod[card].fxo.pegtimer < (PEGTIME >> 2)) && (wc->mod[card].fxo.pegtimer > (MINPEGTIME >> 2)))
wc->mod[card].fxo.pegcount++;
wc->mod[card].fxo.pegtimer = 0;
@@ -368,7 +368,7 @@ static inline void ring_check(struct wctdm *wc, int card)
if (!wc->mod[card].fxo.ring && (wc->mod[card].fxo.pegcount > PEGCOUNT)) {
/* It's ringing */
if (debug)
- printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "RING on %d/%d!\n", wc->span.spanno, card + 1);
if (!wc->mod[card].fxo.offhook)
dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_RING);
wc->mod[card].fxo.ring = 1;
@@ -376,7 +376,7 @@ static inline void ring_check(struct wctdm *wc, int card)
if (wc->mod[card].fxo.ring && !wc->mod[card].fxo.pegcount) {
/* No more ring */
if (debug)
- printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO RING on %d/%d!\n", wc->span.spanno, card + 1);
dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
wc->mod[card].fxo.ring = 0;
}
@@ -604,7 +604,7 @@ static int __wait_access(struct wctdm *wc, int card)
}
- if(count > (MAX-1)) printk(" ##### Loop error (%02x) #####\n", data);
+ if(count > (MAX-1)) printk(KERN_NOTICE " ##### Loop error (%02x) #####\n", data);
return 0;
}
@@ -667,7 +667,7 @@ static int wctdm_proslic_getreg_indirect(struct wctdm *wc, int card, unsigned ch
p = "failed to wait\n";
spin_unlock_irqrestore(&wc->lock, flags);
if (p)
- printk(p);
+ printk(KERN_NOTICE "%s", p);
return res;
}
@@ -693,14 +693,14 @@ static int wctdm_proslic_verify_indirect_regs(struct wctdm *wc, int card)
for (i=0; i<sizeof(indirect_regs) / sizeof(indirect_regs[0]); i++)
{
if((j = wctdm_proslic_getreg_indirect(wc, card, (unsigned char) indirect_regs[i].address)) < 0) {
- printk("Failed to read indirect register %d\n", i);
+ printk(KERN_NOTICE "Failed to read indirect register %d\n", i);
return -1;
}
initial= indirect_regs[i].initial;
if ( j != initial && (!(wc->flags[card] & FLAG_3215) || (indirect_regs[i].altaddr != 255)))
{
- printk("!!!!!!! %s iREG %X = %X should be %X\n",
+ printk(KERN_NOTICE "!!!!!!! %s iREG %X = %X should be %X\n",
indirect_regs[i].name,indirect_regs[i].address,j,initial );
passed = 0;
}
@@ -708,9 +708,9 @@ static int wctdm_proslic_verify_indirect_regs(struct wctdm *wc, int card)
if (passed) {
if (debug)
- printk("Init Indirect Registers completed successfully.\n");
+ printk(KERN_DEBUG "Init Indirect Registers completed successfully.\n");
} else {
- printk(" !!!!! Init Indirect Registers UNSUCCESSFULLY.\n");
+ printk(KERN_NOTICE " !!!!! Init Indirect Registers UNSUCCESSFULLY.\n");
return -1;
}
return 0;
@@ -724,17 +724,17 @@ static inline void wctdm_proslic_recheck_sanity(struct wctdm *wc, int card)
if (!res && (res != wc->mod[card].fxs.lasttxhook)) {
res = wctdm_getreg(wc, card, 8);
if (res) {
- printk("Ouch, part reset, quickly restoring reality (%d)\n", card);
+ printk(KERN_NOTICE "Ouch, part reset, quickly restoring reality (%d)\n", card);
wctdm_init_proslic(wc, card, 1, 0, 1);
} else {
if (wc->mod[card].fxs.palarms++ < MAX_ALARMS) {
- printk("Power alarm on module %d, resetting!\n", card + 1);
+ printk(KERN_NOTICE "Power alarm on module %d, resetting!\n", card + 1);
if (wc->mod[card].fxs.lasttxhook == 4)
wc->mod[card].fxs.lasttxhook = 1;
wctdm_setreg(wc, card, 64, wc->mod[card].fxs.lasttxhook);
} else {
if (wc->mod[card].fxs.palarms == MAX_ALARMS)
- printk("Too many power alarms on card %d, NOT resetting!\n", card + 1);
+ printk(KERN_NOTICE "Too many power alarms on card %d, NOT resetting!\n", card + 1);
}
}
}
@@ -756,7 +756,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if ((b & 0x2) || !(b & 0x8)) {
/* Not good -- don't look at anything else */
if (debug)
- printk("Poopy (%02x) on card %d!\n", b, card + 1);
+ printk(KERN_DEBUG "Poopy (%02x) on card %d!\n", b, card + 1);
poopy++;
}
b &= 0x9b;
@@ -778,7 +778,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (!fxo->wasringing) {
fxo->wasringing = 1;
if (debug)
- printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "RING on %d/%d!\n", wc->span.spanno, card + 1);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING);
}
fxo->lastrdtx = res;
@@ -787,7 +787,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if ((fxo->ringdebounce == 0) && fxo->wasringing) {
fxo->wasringing = 0;
if (debug)
- printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO RING on %d/%d!\n", wc->span.spanno, card + 1);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
}
}
@@ -804,7 +804,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
fxo->wasringing = 1;
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING);
if (debug)
- printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "RING on %d/%d!\n", wc->span.spanno, card + 1);
}
fxo->ringdebounce = DAHDI_CHUNKSIZE * ringdebounce;
}
@@ -815,7 +815,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
fxo->wasringing = 0;
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
if (debug)
- printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO RING on %d/%d!\n", wc->span.spanno, card + 1);
}
fxo->ringdebounce = 0;
}
@@ -845,12 +845,12 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (--fxo->battdebounce == 0) {
fxo->battery = BATTERY_LOST;
if (debug)
- printk("NO BATTERY on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO BATTERY on %d/%d!\n", wc->span.spanno, card + 1);
#ifdef JAPAN
if (!wc->ohdebounce && wc->offhook) {
dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_ONHOOK);
if (debug)
- printk("Signalled On Hook\n");
+ printk(KERN_DEBUG "Signalled On Hook\n");
#ifdef ZERO_BATT_RING
wc->onhook++;
#endif
@@ -887,14 +887,14 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (--fxo->battdebounce == 0) {
fxo->battery = BATTERY_PRESENT;
if (debug)
- printk("BATTERY on %d/%d (%s)!\n", wc->span.spanno, card + 1,
+ printk(KERN_DEBUG "BATTERY on %d/%d (%s)!\n", wc->span.spanno, card + 1,
(b < 0) ? "-" : "+");
#ifdef ZERO_BATT_RING
if (wc->onhook) {
wc->onhook = 0;
dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
if (debug)
- printk("Signalled Off Hook\n");
+ printk(KERN_DEBUG "Signalled Off Hook\n");
}
#else
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
@@ -935,7 +935,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (--fxo->polaritydebounce == 0) {
if (fxo->lastpol != fxo->polarity) {
if (debug)
- printk("%lu Polarity reversed (%d -> %d)\n", jiffies,
+ printk(KERN_DEBUG "%lu Polarity reversed (%d -> %d)\n", jiffies,
fxo->polarity,
fxo->lastpol);
if (fxo->polarity)
@@ -961,17 +961,17 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
/* Reset the debounce (must be multiple of 4ms) */
wc->mod[card].fxs.debounce = 8 * (4 * 8);
#if 0
- printk("Resetting debounce card %d hook %d, %d\n", card, hook, wc->mod[card].fxs.debounce);
+ printk(KERN_DEBUG "Resetting debounce card %d hook %d, %d\n", card, hook, wc->mod[card].fxs.debounce);
#endif
} else {
if (wc->mod[card].fxs.debounce > 0) {
wc->mod[card].fxs.debounce-= 16 * DAHDI_CHUNKSIZE;
#if 0
- printk("Sustaining hook %d, %d\n", hook, wc->mod[card].fxs.debounce);
+ printk(KERN_DEBUG "Sustaining hook %d, %d\n", hook, wc->mod[card].fxs.debounce);
#endif
if (!wc->mod[card].fxs.debounce) {
#if 0
- printk("Counted down debounce, newhook: %d...\n", hook);
+ printk(KERN_DEBUG "Counted down debounce, newhook: %d...\n", hook);
#endif
wc->mod[card].fxs.debouncehook = hook;
}
@@ -980,7 +980,7 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
#if 1
if (debug)
#endif
- printk("wctdm: Card %d Going off hook\n", card);
+ printk(KERN_DEBUG "wctdm: Card %d Going off hook\n", card);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
if (robust)
wctdm_init_proslic(wc, card, 1, 0, 1);
@@ -991,7 +991,7 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
#if 1
if (debug)
#endif
- printk("wctdm: Card %d Going on hook\n", card);
+ printk(KERN_DEBUG "wctdm: Card %d Going on hook\n", card);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_ONHOOK);
wc->mod[card].fxs.oldrxhook = 0;
}
@@ -1016,13 +1016,13 @@ DAHDI_IRQ_HANDLER(wctdm_interrupt)
if (ints & 0x10) {
/* Stop DMA, wait for watchdog */
- printk("TDM PCI Master abort\n");
+ printk(KERN_INFO "TDM PCI Master abort\n");
wctdm_stop_dma(wc);
return IRQ_RETVAL(1);
}
if (ints & 0x20) {
- printk("PCI Target abort\n");
+ printk(KERN_INFO "PCI Target abort\n");
return IRQ_RETVAL(1);
}
@@ -1116,7 +1116,7 @@ static int wctdm_voicedaa_insane(struct wctdm *wc, int card)
return -2;
blah = wctdm_getreg(wc, card, 11);
if (debug)
- printk("VoiceDAA System: %02x\n", blah & 0xf);
+ printk(KERN_DEBUG "VoiceDAA System: %02x\n", blah & 0xf);
return 0;
}
@@ -1127,11 +1127,11 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card)
blah = wctdm_getreg(wc, card, 0);
if (debug)
- printk("ProSLIC on module %d, product %d, version %d\n", card, (blah & 0x30) >> 4, (blah & 0xf));
+ printk(KERN_DEBUG "ProSLIC on module %d, product %d, version %d\n", card, (blah & 0x30) >> 4, (blah & 0xf));
#if 0
if ((blah & 0x30) >> 4) {
- printk("ProSLIC on module %d is not a 3210.\n", card);
+ printk(KERN_DEBUG "ProSLIC on module %d is not a 3210.\n", card);
return -1;
}
#endif
@@ -1140,7 +1140,7 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card)
return -1;
}
if ((blah & 0xf) < 2) {
- printk("ProSLIC 3210 version %d is too old\n", blah & 0xf);
+ printk(KERN_NOTICE "ProSLIC 3210 version %d is too old\n", blah & 0xf);
return -1;
}
if (wctdm_getreg(wc, card, 1) & 0x80)
@@ -1149,30 +1149,30 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card)
blah = wctdm_getreg(wc, card, 8);
if (blah != 0x2) {
- printk("ProSLIC on module %d insane (1) %d should be 2\n", card, blah);
+ printk(KERN_NOTICE "ProSLIC on module %d insane (1) %d should be 2\n", card, blah);
return -1;
} else if ( insane_report)
- printk("ProSLIC on module %d Reg 8 Reads %d Expected is 0x2\n",card,blah);
+ printk(KERN_NOTICE "ProSLIC on module %d Reg 8 Reads %d Expected is 0x2\n",card,blah);
blah = wctdm_getreg(wc, card, 64);
if (blah != 0x0) {
- printk("ProSLIC on module %d insane (2)\n", card);
+ printk(KERN_NOTICE "ProSLIC on module %d insane (2)\n", card);
return -1;
} else if ( insane_report)
- printk("ProSLIC on module %d Reg 64 Reads %d Expected is 0x0\n",card,blah);
+ printk(KERN_NOTICE "ProSLIC on module %d Reg 64 Reads %d Expected is 0x0\n",card,blah);
blah = wctdm_getreg(wc, card, 11);
if (blah != 0x33) {
- printk("ProSLIC on module %d insane (3)\n", card);
+ printk(KERN_NOTICE "ProSLIC on module %d insane (3)\n", card);
return -1;
} else if ( insane_report)
- printk("ProSLIC on module %d Reg 11 Reads %d Expected is 0x33\n",card,blah);
+ printk(KERN_NOTICE "ProSLIC on module %d Reg 11 Reads %d Expected is 0x33\n",card,blah);
/* Just be sure it's setup right. */
wctdm_setreg(wc, card, 30, 0);
if (debug)
- printk("ProSLIC on module %d seems sane.\n", card);
+ printk(KERN_DEBUG "ProSLIC on module %d seems sane.\n", card);
return 0;
}
@@ -1196,11 +1196,11 @@ static int wctdm_proslic_powerleak_test(struct wctdm *wc, int card)
}
if (vbat < 0x06) {
- printk("Excessive leakage detected on module %d: %d volts (%02x) after %d ms\n", card,
+ printk(KERN_NOTICE "Excessive leakage detected on module %d: %d volts (%02x) after %d ms\n", card,
376 * vbat / 1000, vbat, (int)((jiffies - origjiffies) * 1000 / HZ));
return -1;
} else if (debug) {
- printk("Post-leakage voltage: %d volts\n", 376 * vbat / 1000);
+ printk(KERN_NOTICE "Post-leakage voltage: %d volts\n", 376 * vbat / 1000);
}
return 0;
}
@@ -1233,13 +1233,13 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
if (vbat < 0xc0) {
if (wc->proslic_power == PROSLIC_POWER_UNKNOWN)
- printk("ProSLIC on module %d failed to powerup within %d ms (%d mV only)\n\n -- DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM400P??\n",
+ printk(KERN_NOTICE "ProSLIC on module %d failed to powerup within %d ms (%d mV only)\n\n -- DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM400P??\n",
card, (int)(((jiffies - origjiffies) * 1000 / HZ)),
vbat * 375);
wc->proslic_power = PROSLIC_POWER_WARNED;
return -1;
} else if (debug) {
- printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
+ printk(KERN_DEBUG "ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ)));
}
wc->proslic_power = PROSLIC_POWER_ON;
@@ -1250,10 +1250,10 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
if ( loopcurrent > 41 ) {
lim = 0;
if (debug)
- printk("Loop current out of range! Setting to default 20mA!\n");
+ printk(KERN_DEBUG "Loop current out of range! Setting to default 20mA!\n");
}
else if (debug)
- printk("Loop current set to %dmA!\n",(lim*3)+20);
+ printk(KERN_DEBUG "Loop current set to %dmA!\n",(lim*3)+20);
wctdm_setreg(wc,card,LOOP_I_LIMIT,lim);
/* Engage DC-DC converter */
@@ -1262,7 +1262,7 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
origjiffies = jiffies;
while(0x80 & wctdm_getreg(wc, card, 93)) {
if ((jiffies - origjiffies) > 2 * HZ) {
- printk("Timeout waiting for DC-DC calibration on module %d\n", card);
+ printk(KERN_DEBUG "Timeout waiting for DC-DC calibration on module %d\n", card);
return -1;
}
}
@@ -1273,7 +1273,7 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
/* Just check to be sure */
vbat = wctdm_getreg(wc, card, 82);
- printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
+ printk(KERN_DEBUG "ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ)));
#endif
#endif
@@ -1369,16 +1369,16 @@ static int wctdm_proslic_calibrate(struct wctdm *wc, int card)
origjiffies = jiffies;
while(wctdm_getreg(wc, card, 96)) {
if ((jiffies - origjiffies) > 2 * HZ) {
- printk("Timeout waiting for calibration of module %d\n", card);
+ printk(KERN_NOTICE "Timeout waiting for calibration of module %d\n", card);
return -1;
}
}
if (debug) {
/* Print calibration parameters */
- printk("Calibration Vector Regs 98 - 107: \n");
+ printk(KERN_DEBUG "Calibration Vector Regs 98 - 107: \n");
for (x=98;x<108;x++) {
- printk("%d: %02x\n", x, wctdm_getreg(wc, card, x));
+ printk(KERN_DEBUG "%d: %02x\n", x, wctdm_getreg(wc, card, x));
}
}
return 0;
@@ -1403,12 +1403,12 @@ static void wait_just_a_bit(int foo)
static int wctdm_set_hwgain(struct wctdm *wc, int card, __s32 gain, __u32 tx)
{
if (!(wc->modtype[card] == MOD_TYPE_FXO)) {
- printk("Cannot adjust gain. Unsupported module type!\n");
+ printk(KERN_NOTICE "Cannot adjust gain. Unsupported module type!\n");
return -1;
}
if (tx) {
if (debug)
- printk("setting FXO tx gain for card=%d to %d\n", card, gain);
+ printk(KERN_DEBUG "setting FXO tx gain for card=%d to %d\n", card, gain);
if (gain >= -150 && gain <= 0) {
wctdm_setreg(wc, card, 38, 16 + (gain/-10));
wctdm_setreg(wc, card, 40, 16 + (-gain%10));
@@ -1416,12 +1416,12 @@ static int wctdm_set_hwgain(struct wctdm *wc, int card, __s32 gain, __u32 tx)
wctdm_setreg(wc, card, 38, gain/10);
wctdm_setreg(wc, card, 40, (gain%10));
} else {
- printk("FXO tx gain is out of range (%d)\n", gain);
+ printk(KERN_INFO "FXO tx gain is out of range (%d)\n", gain);
return -1;
}
} else { /* rx */
if (debug)
- printk("setting FXO rx gain for card=%d to %d\n", card, gain);
+ printk(KERN_DEBUG "setting FXO rx gain for card=%d to %d\n", card, gain);
if (gain >= -150 && gain <= 0) {
wctdm_setreg(wc, card, 39, 16+ (gain/-10));
wctdm_setreg(wc, card, 41, 16 + (-gain%10));
@@ -1429,7 +1429,7 @@ static int wctdm_set_hwgain(struct wctdm *wc, int card, __s32 gain, __u32 tx)
wctdm_setreg(wc, card, 39, gain/10);
wctdm_setreg(wc, card, 41, (gain%10));
} else {
- printk("FXO rx gain is out of range (%d)\n", gain);
+ printk(KERN_INFO "FXO rx gain is out of range (%d)\n", gain);
return -1;
}
}
@@ -1514,11 +1514,11 @@ static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int manual,
wait_just_a_bit(HZ/10);
if (!(wctdm_getreg(wc, card, 11) & 0xf0)) {
- printk("VoiceDAA did not bring up ISO link properly!\n");
+ printk(KERN_NOTICE "VoiceDAA did not bring up ISO link properly!\n");
return -1;
}
if (debug)
- printk("ISO-Cap is now up, line side: %02x rev %02x\n",
+ printk(KERN_DEBUG "ISO-Cap is now up, line side: %02x rev %02x\n",
wctdm_getreg(wc, card, 11) >> 4,
(wctdm_getreg(wc, card, 13) >> 2) & 0xf);
/* Enable on-hook line monitor */
@@ -1530,12 +1530,12 @@ static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int manual,
/* NZ -- crank the tx gain up by 7 dB */
if (!strcmp(fxo_modes[_opermode].name, "NEWZEALAND")) {
- printk("Adjusting gain\n");
+ printk(KERN_INFO "Adjusting gain\n");
wctdm_set_hwgain(wc, card, 7, 1);
}
if(debug)
- printk("DEBUG fxotxgain:%i.%i fxorxgain:%i.%i\n", (wctdm_getreg(wc, card, 38)/16)?-(wctdm_getreg(wc, card, 38) - 16) : wctdm_getreg(wc, card, 38), (wctdm_getreg(wc, card, 40)/16)? -(wctdm_getreg(wc, card, 40) - 16):wctdm_getreg(wc, card, 40), (wctdm_getreg(wc, card, 39)/16)? -(wctdm_getreg(wc, card, 39) - 16) : wctdm_getreg(wc, card, 39),(wctdm_getreg(wc, card, 41)/16)?-(wctdm_getreg(wc, card, 41) - 16):wctdm_getreg(wc, card, 41));
+ printk(KERN_DEBUG "DEBUG fxotxgain:%i.%i fxorxgain:%i.%i\n", (wctdm_getreg(wc, card, 38)/16)?-(wctdm_getreg(wc, card, 38) - 16) : wctdm_getreg(wc, card, 38), (wctdm_getreg(wc, card, 40)/16)? -(wctdm_getreg(wc, card, 40) - 16):wctdm_getreg(wc, card, 40), (wctdm_getreg(wc, card, 39)/16)? -(wctdm_getreg(wc, card, 39) - 16) : wctdm_getreg(wc, card, 39),(wctdm_getreg(wc, card, 41)/16)?-(wctdm_getreg(wc, card, 41) - 16):wctdm_getreg(wc, card, 41));
return 0;
@@ -1595,7 +1595,7 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
/* Power up the DC-DC converter */
if (wctdm_powerup_proslic(wc, card, fast)) {
- printk("Unable to do INITIAL ProSLIC powerup on module %d\n", card);
+ printk(KERN_NOTICE "Unable to do INITIAL ProSLIC powerup on module %d\n", card);
return -1;
}
@@ -1603,40 +1603,40 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
/* Check for power leaks */
if (wctdm_proslic_powerleak_test(wc, card)) {
- printk("ProSLIC module %d failed leakage test. Check for short circuit\n", card);
+ printk(KERN_NOTICE "ProSLIC module %d failed leakage test. Check for short circuit\n", card);
}
/* Power up again */
if (wctdm_powerup_proslic(wc, card, fast)) {
- printk("Unable to do FINAL ProSLIC powerup on module %d\n", card);
+ printk(KERN_NOTICE "Unable to do FINAL ProSLIC powerup on module %d\n", card);
return -1;
}
#ifndef NO_CALIBRATION
/* Perform calibration */
if(manual) {
if (wctdm_proslic_manual_calibrate(wc, card)) {
- //printk("Proslic failed on Manual Calibration\n");
+ //printk(KERN_NOTICE "Proslic failed on Manual Calibration\n");
if (wctdm_proslic_manual_calibrate(wc, card)) {
- printk("Proslic Failed on Second Attempt to Calibrate Manually. (Try -DNO_CALIBRATION in Makefile)\n");
+ printk(KERN_NOTICE "Proslic Failed on Second Attempt to Calibrate Manually. (Try -DNO_CALIBRATION in Makefile)\n");
return -1;
}
- printk("Proslic Passed Manual Calibration on Second Attempt\n");
+ printk(KERN_NOTICE "Proslic Passed Manual Calibration on Second Attempt\n");
}
}
else {
if(wctdm_proslic_calibrate(wc, card)) {
- //printk("ProSlic died on Auto Calibration.\n");
+ //printk(KERN_NOTICE "ProSlic died on Auto Calibration.\n");
if (wctdm_proslic_calibrate(wc, card)) {
- printk("Proslic Failed on Second Attempt to Auto Calibrate\n");
+ printk(KERN_NOTICE "Proslic Failed on Second Attempt to Auto Calibrate\n");
return -1;
}
- printk("Proslic Passed Auto Calibration on Second Attempt\n");
+ printk(KERN_NOTICE "Proslic Passed Auto Calibration on Second Attempt\n");
}
}
/* Perform DC-DC calibration */
wctdm_setreg(wc, card, 93, 0x99);
r19 = wctdm_getreg(wc, card, 107);
if ((r19 < 0x2) || (r19 > 0xd)) {
- printk("DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19);
+ printk(KERN_NOTICE "DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19);
wctdm_setreg(wc, card, 107, 0x8);
}
@@ -1721,24 +1721,24 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
wctdm_setreg(wc, card, 74, 0x3f);
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x247))
return -1;
- printk("Boosting fast ringer on slot %d (89V peak)\n", card + 1);
+ printk(KERN_INFO "Boosting fast ringer on slot %d (89V peak)\n", card + 1);
} else if (lowpower) {
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x14b))
return -1;
- printk("Reducing fast ring power on slot %d (50V peak)\n", card + 1);
+ printk(KERN_INFO "Reducing fast ring power on slot %d (50V peak)\n", card + 1);
} else
- printk("Speeding up ringer on slot %d (25Hz)\n", card + 1);
+ printk(KERN_INFO "Speeding up ringer on slot %d (25Hz)\n", card + 1);
} else {
/* Beef up Ringing voltage to 89V */
if (boostringer) {
wctdm_setreg(wc, card, 74, 0x3f);
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x1d1))
return -1;
- printk("Boosting ringer on slot %d (89V peak)\n", card + 1);
+ printk(KERN_INFO "Boosting ringer on slot %d (89V peak)\n", card + 1);
} else if (lowpower) {
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x108))
return -1;
- printk("Reducing ring power on slot %d (50V peak)\n", card + 1);
+ printk(KERN_INFO "Reducing ring power on slot %d (50V peak)\n", card + 1);
}
}
@@ -1771,7 +1771,7 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
}
if(debug)
- printk("DEBUG: fxstxgain:%s fxsrxgain:%s\n",((wctdm_getreg(wc, card, 9)/8) == 1)?"3.5":(((wctdm_getreg(wc,card,9)/4) == 1)?"-3.5":"0.0"),((wctdm_getreg(wc, card, 9)/2) == 1)?"3.5":((wctdm_getreg(wc,card,9)%2)?"-3.5":"0.0"));
+ printk(KERN_DEBUG "DEBUG: fxstxgain:%s fxsrxgain:%s\n",((wctdm_getreg(wc, card, 9)/8) == 1)?"3.5":(((wctdm_getreg(wc,card,9)/4) == 1)?"-3.5":"0.0"),((wctdm_getreg(wc, card, 9)/2) == 1)?"3.5":((wctdm_getreg(wc,card,9)%2)?"-3.5":"0.0"));
wctdm_setreg(wc, card, 64, 0x01);
return 0;
@@ -1857,16 +1857,16 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
if (regop.indirect) {
if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS)
return -EINVAL;
- printk("Setting indirect %d to 0x%04x on %d\n", regop.reg, regop.val, chan->chanpos);
+ printk(KERN_INFO "Setting indirect %d to 0x%04x on %d\n", regop.reg, regop.val, chan->chanpos);
wctdm_proslic_setreg_indirect(wc, chan->chanpos - 1, regop.reg, regop.val);
} else {
regop.val &= 0xff;
- printk("Setting direct %d to %04x on %d\n", regop.reg, regop.val, chan->chanpos);
+ printk(KERN_INFO "Setting direct %d to %04x on %d\n", regop.reg, regop.val, chan->chanpos);
wctdm_setreg(wc, chan->chanpos - 1, regop.reg, regop.val);
}
break;
case WCTDM_SET_ECHOTUNE:
- printk("-- Setting echo registers: \n");
+ printk(KERN_INFO "-- Setting echo registers: \n");
if (copy_from_user(&echoregs, (struct wctdm_echo_coefs*)data, sizeof(echoregs)))
return -EFAULT;
@@ -1884,7 +1884,7 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
wctdm_setreg(wc, chan->chanpos - 1, 51, echoregs.coef7);
wctdm_setreg(wc, chan->chanpos - 1, 52, echoregs.coef8);
- printk("-- Set echo registers successfully\n");
+ printk(KERN_INFO "-- Set echo registers successfully\n");
break;
} else {
@@ -1899,7 +1899,7 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
wctdm_set_hwgain(wc, chan->chanpos-1, hwgain.newgain, hwgain.tx);
if (debug)
- printk("Setting hwgain on channel %d to %d for %s direction\n",
+ printk(KERN_DEBUG "Setting hwgain on channel %d to %d for %s direction\n",
chan->chanpos-1, hwgain.newgain, hwgain.tx ? "tx" : "rx");
break;
default:
@@ -1923,7 +1923,7 @@ static int wctdm_open(struct dahdi_chan *chan)
static int wctdm_watchdog(struct dahdi_span *span, int event)
{
- printk("TDM: Restarting DMA\n");
+ printk(KERN_INFO "TDM: Restarting DMA\n");
wctdm_restart_dma(span->pvt);
return 0;
}
@@ -1962,7 +1962,7 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
wctdm_setreg(wc, chan->chanpos - 1, 5, 0x8);
break;
default:
- printk("wcfxo: Can't set tx state to %d\n", txsig);
+ printk(KERN_NOTICE "wcfxo: Can't set tx state to %d\n", txsig);
}
} else {
switch(txsig) {
@@ -1995,10 +1995,10 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
wc->mod[chan->chanpos-1].fxs.lasttxhook = 0;
break;
default:
- printk("wctdm: Can't set tx state to %d\n", txsig);
+ printk(KERN_NOTICE "wctdm: Can't set tx state to %d\n", txsig);
}
if (debug)
- printk("Setting FXS hook state to %d (%02x)\n", txsig, reg);
+ printk(KERN_DEBUG "Setting FXS hook state to %d (%02x)\n", txsig, reg);
#if 1
wctdm_setreg(wc, chan->chanpos - 1, 64, wc->mod[chan->chanpos-1].fxs.lasttxhook);
@@ -2019,7 +2019,7 @@ static int wctdm_initialize(struct wctdm *wc)
wc->span.manufacturer = "Digium";
dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype));
if (alawoverride) {
- printk("ALAW override parameter detected. Device will be operating in ALAW\n");
+ printk(KERN_INFO "ALAW override parameter detected. Device will be operating in ALAW\n");
wc->span.deflaw = DAHDI_LAW_ALAW;
} else
wc->span.deflaw = DAHDI_LAW_MULAW;
@@ -2043,7 +2043,7 @@ static int wctdm_initialize(struct wctdm *wc)
wc->span.pvt = wc;
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;
@@ -2081,7 +2081,7 @@ static int wctdm_hardware_init(struct wctdm *wc)
ver = __wctdm_getcreg(wc, WC_VER);
failed = 0;
if (ver != 0x59) {
- printk("Freshmaker version: %02x\n", ver);
+ printk(KERN_INFO "Freshmaker version: %02x\n", ver);
for (x=0;x<255;x++) {
/* Test registers */
if (ver >= 0x70) {
@@ -2092,21 +2092,21 @@ static int wctdm_hardware_init(struct wctdm *wc)
y = __wctdm_getcreg(wc, WC_TEST);
}
if (x != y) {
- printk("%02x != %02x\n", x, y);
+ printk(KERN_INFO "%02x != %02x\n", x, y);
failed++;
}
}
if (!failed) {
- printk("Freshmaker passed register test\n");
+ printk(KERN_INFO "Freshmaker passed register test\n");
} else {
- printk("Freshmaker failed register test\n");
+ printk(KERN_NOTICE "Freshmaker failed register test\n");
return -1;
}
/* Go to half-duty FSYNC */
__wctdm_setcreg(wc, WC_SYNC, 0x01);
y = __wctdm_getcreg(wc, WC_SYNC);
} else {
- printk("No freshmaker chip\n");
+ printk(KERN_INFO "No freshmaker chip\n");
}
/* Reset PCI Interface chip and registers (and serial) */
@@ -2160,10 +2160,10 @@ static int wctdm_hardware_init(struct wctdm *wc)
wc->cardflag |= (1 << x);
if (debug) {
readi = wctdm_getreg(wc,x,LOOP_I_LIMIT);
- printk("Proslic module %d loop current is %dmA\n",x,
+ printk(KERN_DEBUG "Proslic module %d loop current is %dmA\n",x,
((readi*3)+20));
}
- printk("Module %d: Installed -- AUTO FXS/DPO\n",x);
+ printk(KERN_INFO "Module %d: Installed -- AUTO FXS/DPO\n",x);
} else {
if(ret!=-2) {
sane=1;
@@ -2172,19 +2172,19 @@ static int wctdm_hardware_init(struct wctdm *wc)
wc->cardflag |= (1 << x);
if (debug) {
readi = wctdm_getreg(wc,x,LOOP_I_LIMIT);
- printk("Proslic module %d loop current is %dmA\n",x,
+ printk(KERN_DEBUG "Proslic module %d loop current is %dmA\n",x,
((readi*3)+20));
}
- printk("Module %d: Installed -- MANUAL FXS\n",x);
+ printk(KERN_INFO "Module %d: Installed -- MANUAL FXS\n",x);
} else {
- printk("Module %d: FAILED FXS (%s)\n", x, fxshonormode ? fxo_modes[_opermode].name : "FCC");
+ printk(KERN_NOTICE "Module %d: FAILED FXS (%s)\n", x, fxshonormode ? fxo_modes[_opermode].name : "FCC");
wc->chans[x]->sigcap = __DAHDI_SIG_FXO | DAHDI_SIG_BROKEN;
}
} else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) {
wc->cardflag |= (1 << x);
- printk("Module %d: Installed -- AUTO FXO (%s mode)\n",x, fxo_modes[_opermode].name);
+ printk(KERN_INFO "Module %d: Installed -- AUTO FXO (%s mode)\n",x, fxo_modes[_opermode].name);
} else
- printk("Module %d: Not installed\n", x);
+ printk(KERN_NOTICE "Module %d: Not installed\n", x);
}
#endif
}
@@ -2249,7 +2249,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
for (x=0;x<WC_MAX_IFACES;x++)
if (!ifaces[x]) break;
if (x >= WC_MAX_IFACES) {
- printk("Too many interfaces\n");
+ printk(KERN_NOTICE "Too many interfaces\n");
return -EIO;
}
@@ -2281,7 +2281,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
32 bits. Allocate an extra set just for control too */
wc->writechunk = pci_alloc_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
if (!wc->writechunk) {
- printk("wctdm: Unable to allocate DMA-able memory\n");
+ printk(KERN_NOTICE "wctdm: Unable to allocate DMA-able memory\n");
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
return -ENOMEM;
@@ -2291,7 +2291,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
wc->readdma = wc->writedma + DAHDI_MAX_CHUNKSIZE * 8; /* in bytes */
if (wctdm_initialize(wc)) {
- printk("wctdm: Unable to intialize FXS\n");
+ printk(KERN_NOTICE "wctdm: Unable to intialize FXS\n");
/* Set Reset Low */
x=inb(wc->ioaddr + WC_CNTL);
outb((~0x1)&x, wc->ioaddr + WC_CNTL);
@@ -2311,7 +2311,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
pci_set_drvdata(pdev, wc);
if (request_irq(pdev->irq, wctdm_interrupt, DAHDI_IRQ_SHARED, "wctdm", wc)) {
- printk("wctdm: Unable to request IRQ %d\n", pdev->irq);
+ printk(KERN_NOTICE "wctdm: Unable to request IRQ %d\n", pdev->irq);
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
pci_free_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, (void *)wc->writechunk, wc->writedma);
@@ -2354,7 +2354,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
cardcount++;
}
- printk("Found a Wildcard TDM: %s (%d modules)\n", wc->variety, cardcount);
+ printk(KERN_INFO "Found a Wildcard TDM: %s (%d modules)\n", wc->variety, cardcount);
res = 0;
} else
res = -ENOMEM;
@@ -2368,7 +2368,7 @@ static void wctdm_release(struct wctdm *wc)
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc);
- printk("Freed a Wildcard\n");
+ printk(KERN_INFO "Freed a Wildcard\n");
}
static void __devexit wctdm_remove_one(struct pci_dev *pdev)
@@ -2440,10 +2440,10 @@ static int __init wctdm_init(void)
if (x < sizeof(fxo_modes) / sizeof(fxo_modes[0])) {
_opermode = x;
} else {
- printk("Invalid/unknown operating mode '%s' specified. Please choose one of:\n", opermode);
+ printk(KERN_NOTICE "Invalid/unknown operating mode '%s' specified. Please choose one of:\n", opermode);
for (x = 0; x < sizeof(fxo_modes) / sizeof(fxo_modes[0]); x++)
- printk(" %s\n", fxo_modes[x].name);
- printk("Note this option is CASE SENSITIVE!\n");
+ printk(KERN_INFO " %s\n", fxo_modes[x].name);
+ printk(KERN_INFO "Note this option is CASE SENSITIVE!\n");
return -ENODEV;
}
diff --git a/drivers/dahdi/wctdm24xxp/GpakApi.c b/drivers/dahdi/wctdm24xxp/GpakApi.c
index b569a12..2184aac 100644
--- a/drivers/dahdi/wctdm24xxp/GpakApi.c
+++ b/drivers/dahdi/wctdm24xxp/GpakApi.c
@@ -950,7 +950,7 @@ gpakReadEventFIFOMessageStat_t gpakReadEventFIFOMessage(
{
gpakUnlockAccess(DspId);
#if 0
- printk("EventDataLength > WORD_BUFFER_SIZE (%d)\n", EventDataLength);
+ printk(KERN_DEBUG "EventDataLength > WORD_BUFFER_SIZE (%d)\n", EventDataLength);
#endif
return (RefInvalidEvent);
}
@@ -966,7 +966,7 @@ gpakReadEventFIFOMessageStat_t gpakReadEventFIFOMessage(
TakeIndex -= BufrSize;
if (EventDataLength != 4) {
#if 0
- printk("EventDataLength != 4 it's %d\n", EventDataLength);
+ printk(KERN_DEBUG "EventDataLength != 4 it's %d\n", EventDataLength);
#endif
EventError = 1;
}
@@ -974,7 +974,7 @@ gpakReadEventFIFOMessageStat_t gpakReadEventFIFOMessage(
default:
#if 0
- printk("Event Code not in switch\n");
+ printk(KERN_DEBUG "Event Code not in switch\n");
#endif
EventError = 1;
break;
diff --git a/drivers/dahdi/wctdm24xxp/GpakCust.c b/drivers/dahdi/wctdm24xxp/GpakCust.c
index c94c119..36b5f7e 100644
--- a/drivers/dahdi/wctdm24xxp/GpakCust.c
+++ b/drivers/dahdi/wctdm24xxp/GpakCust.c
@@ -251,7 +251,7 @@ unsigned short wctdm_vpm150m_getreg(struct wctdm *wc, unsigned int len, unsigned
unsigned short res;
wctdm_vpm150m_setpage(wc, addr >> 16);
if ((addr >> 16) != ((addr + len) >> 16))
- printk("getreg: You found it!\n");
+ printk(KERN_INFO "getreg: You found it!\n");
res = wctdm_vpm150m_getreg_full(wc, 0, len, addr & 0xffff, data);
return res;
}
@@ -261,7 +261,7 @@ int wctdm_vpm150m_setreg(struct wctdm *wc, unsigned int len, unsigned int addr,
int res;
wctdm_vpm150m_setpage(wc, addr >> 16);
if ((addr >> 16) != ((addr + len) >> 16))
- printk("getreg: You found it!\n");
+ printk(KERN_INFO "getreg: You found it!\n");
res = wctdm_vpm150m_setreg_full(wc, 0, len, addr & 0xffff, data);
return res;
}
@@ -345,7 +345,7 @@ void gpakWriteDspMemory(
int i;
int transcount;
- //printk("Writing %d words to memory\n", NumWords);
+ //printk(KERN_DEBUG "Writing %d words to memory\n", NumWords);
if (wc && wc->vpm150m) {
for (i = 0; i < NumWords;) {
if ((NumWords - i) > VPM150M_MAX_DATA)
@@ -359,7 +359,7 @@ void gpakWriteDspMemory(
#if 0
for (i = 0; i < NumWords; i++) {
if (wctdm_vpm150m_getreg(wc, DspAddress + i) != pWordValues[i]) {
- printk("Error in write. Address %x is not %x\n", DspAddress + i, pWordValues[i]);
+ printk(KERN_NOTICE "Error in write. Address %x is not %x\n", DspAddress + i, pWordValues[i]);
}
}
#endif
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index b827f95..81de80f 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -270,7 +270,7 @@ static inline void cmd_dequeue_vpm150m(struct wctdm *wc, volatile unsigned char
if (test_bit(VPM150M_SPIRESET, &vpm150m->control) || test_bit(VPM150M_HPIRESET, &vpm150m->control)) {
if (debug & DEBUG_ECHOCAN)
- printk("HW Resetting VPMADT032...\n");
+ printk(KERN_INFO "HW Resetting VPMADT032...\n");
for (x = 24; x < 28; x++) {
if (x == 24) {
if (test_and_clear_bit(VPM150M_SPIRESET, &vpm150m->control))
@@ -299,7 +299,7 @@ static inline void cmd_dequeue_vpm150m(struct wctdm *wc, volatile unsigned char
}
if (curcmd) {
#if 0
- printk("Found command txident = %d, desc = 0x%x, addr = 0x%x, data = 0x%x\n", curcmd->txident, curcmd->desc, curcmd->addr, curcmd->data);
+ printk(KERN_DEBUG "Found command txident = %d, desc = 0x%x, addr = 0x%x, data = 0x%x\n", curcmd->txident, curcmd->desc, curcmd->addr, curcmd->data);
#endif
if (curcmd->desc & __VPM150M_RWPAGE) {
/* Set CTRL access to page*/
@@ -379,7 +379,7 @@ static inline void cmd_dequeue_vpm150m(struct wctdm *wc, volatile unsigned char
}
} else if (test_and_clear_bit(VPM150M_SWRESET, &vpm150m->control)) {
- printk("Booting VPMADT032\n");
+ printk(KERN_INFO "Booting VPMADT032\n");
for (x = 24; x < 28; x++) {
if (x == 24)
writechunk[CMD_BYTE(x, 0, 0)] = (0x8 << 4);
@@ -446,7 +446,7 @@ static inline void cmd_dequeue(struct wctdm *wc, volatile unsigned char *writech
!(wc->cmdq[card].cmds[x] & (__CMD_TX | __CMD_FIN))) {
curcmd = wc->cmdq[card].cmds[x];
#if 0
- printk("Transmitting command '%08x' in slot %d\n", wc->cmdq[card].cmds[x], wc->txident);
+ printk(KERN_DEBUG "Transmitting command '%08x' in slot %d\n", wc->cmdq[card].cmds[x], wc->txident);
#endif
wc->cmdq[card].cmds[x] |= (wc->txident << 24) | __CMD_TX;
break;
@@ -531,7 +531,7 @@ static inline void cmd_dequeue(struct wctdm *wc, volatile unsigned char *writech
#if 0
/* XXX */
if (cmddesc < 40)
- printk("Pass %d, card = %d (modtype=%d), pos = %d, CMD_BYTES = %d,%d,%d, (%02x,%02x,%02x) curcmd = %08x\n", cmddesc, card, wc->modtype[card], pos, CMD_BYTE(card, 0), CMD_BYTE(card, 1), CMD_BYTE(card, 2), writechunk[CMD_BYTE(card, 0)], writechunk[CMD_BYTE(card, 1)], writechunk[CMD_BYTE(card, 2)], curcmd);
+ printk(KERN_DEBUG "Pass %d, card = %d (modtype=%d), pos = %d, CMD_BYTES = %d,%d,%d, (%02x,%02x,%02x) curcmd = %08x\n", cmddesc, card, wc->modtype[card], pos, CMD_BYTE(card, 0), CMD_BYTE(card, 1), CMD_BYTE(card, 2), writechunk[CMD_BYTE(card, 0)], writechunk[CMD_BYTE(card, 1)], writechunk[CMD_BYTE(card, 2)], curcmd);
#endif
spin_unlock_irqrestore(&wc->reglock, flags);
#if 0
@@ -614,7 +614,7 @@ static inline void cmd_decifer(struct wctdm *wc, volatile unsigned char *readchu
#if 0
/* XXX */
if (!pos && (cmddesc < 256))
- printk("Card %d: Command '%08x' => %02x\n",card, wc->cmdq[card].lasttx[pos], wc->cmdq[card].lastrd[pos]);
+ printk(KERN_DEBUG "Card %d: Command '%08x' => %02x\n",card, wc->cmdq[card].lasttx[pos], wc->cmdq[card].lastrd[pos]);
#endif
spin_unlock_irqrestore(&wc->reglock, flags);
}
@@ -811,7 +811,7 @@ static inline void cmd_vpm150m_retransmit(struct wctdm *wc)
spin_lock_irqsave(&wc->reglock, flags);
for (x = 0; x < VPM150M_MAX_COMMANDS; x++) {
if (!(wc->vpm150m->cmdq[x].desc & __VPM150M_FIN)) {
- //printk("Retransmit!\n");
+ //printk(KERN_DEBUG "Retransmit!\n");
wc->vpm150m->cmdq[x].desc &= ~(__VPM150M_TX);
}
}
@@ -905,7 +905,7 @@ static int wait_access(struct wctdm *wc, int card)
}
- if(count > (MAX-1)) printk(" ##### Loop error (%02x) #####\n", data);
+ if(count > (MAX-1)) printk(KERN_NOTICE " ##### Loop error (%02x) #####\n", data);
return 0;
}
@@ -962,7 +962,7 @@ static int wctdm_proslic_getreg_indirect(struct wctdm *wc, int card, unsigned ch
} else
p = "failed to wait\n";
if (p)
- printk(p);
+ printk(KERN_NOTICE "%s", p);
return res;
}
@@ -988,14 +988,14 @@ static int wctdm_proslic_verify_indirect_regs(struct wctdm *wc, int card)
for (i=0; i<sizeof(indirect_regs) / sizeof(indirect_regs[0]); i++)
{
if((j = wctdm_proslic_getreg_indirect(wc, card, (unsigned char) indirect_regs[i].address)) < 0) {
- printk("Failed to read indirect register %d\n", i);
+ printk(KERN_NOTICE "Failed to read indirect register %d\n", i);
return -1;
}
initial= indirect_regs[i].initial;
if ( j != initial && (!(wc->flags[card] & FLAG_3215) || (indirect_regs[i].altaddr != 255)))
{
- printk("!!!!!!! %s iREG %X = %X should be %X\n",
+ printk(KERN_NOTICE "!!!!!!! %s iREG %X = %X should be %X\n",
indirect_regs[i].name,indirect_regs[i].address,j,initial );
passed = 0;
}
@@ -1003,9 +1003,9 @@ static int wctdm_proslic_verify_indirect_regs(struct wctdm *wc, int card)
if (passed) {
if (debug & DEBUG_CARD)
- printk("Init Indirect Registers completed successfully.\n");
+ printk(KERN_DEBUG "Init Indirect Registers completed successfully.\n");
} else {
- printk(" !!!!! Init Indirect Registers UNSUCCESSFULLY.\n");
+ printk(KERN_NOTICE " !!!!! Init Indirect Registers UNSUCCESSFULLY.\n");
return -1;
}
return 0;
@@ -1021,7 +1021,7 @@ static inline void wctdm_proslic_recheck_sanity(struct wctdm *wc, int card)
wc->cmdq[card].isrshadow[1]=0;
wc->mods[card].fxs.palarms++;
if (wc->mods[card].fxs.palarms < MAX_ALARMS) {
- printk("Power alarm (%02x) on module %d, resetting!\n", res, card + 1);
+ printk(KERN_NOTICE "Power alarm (%02x) on module %d, resetting!\n", res, card + 1);
if (wc->mods[card].fxs.lasttxhook == 4)
wc->mods[card].fxs.lasttxhook = 0x11;
wc->sethook[card] = CMD_WR(19, res);
@@ -1034,7 +1034,7 @@ static inline void wctdm_proslic_recheck_sanity(struct wctdm *wc, int card)
wc->cmdq[card].isrshadow[1] = 0;
} else {
if (wc->mods[card].fxs.palarms == MAX_ALARMS)
- printk("Too many power alarms on card %d, NOT resetting!\n", card + 1);
+ printk(KERN_NOTICE "Too many power alarms on card %d, NOT resetting!\n", card + 1);
}
}
#else
@@ -1050,7 +1050,7 @@ static inline void wctdm_proslic_recheck_sanity(struct wctdm *wc, int card)
if (res) {
wc->mods[card].fxs.palarms++;
if (wc->mods[card].fxs.palarms < MAX_ALARMS) {
- printk("Power alarm on module %d, resetting!\n", card + 1);
+ printk(KERN_NOTICE "Power alarm on module %d, resetting!\n", card + 1);
if (wc->mods[card].fxs.lasttxhook == 4)
wc->mods[card].fxs.lasttxhook = 0x11;
wc->mods[card].fxs.lasttxhook |= 0x10;
@@ -1061,7 +1061,7 @@ static inline void wctdm_proslic_recheck_sanity(struct wctdm *wc, int card)
wc->cmdq[card].isrshadow[1] = wc->mods[card].fxs.lasttxhook;
} else {
if (wc->mods[card].fxs.palarms == MAX_ALARMS)
- printk("Too many power alarms on card %d, NOT resetting!\n", card + 1);
+ printk(KERN_NOTICE "Too many power alarms on card %d, NOT resetting!\n", card + 1);
}
}
#endif
@@ -1099,7 +1099,7 @@ static inline void wctdm_qrvdri_check_hook(struct wctdm *wc, int card)
if (wc->qrvdebtime[qrvcard] == 1)
{
b1 = wc->qrvhook[qrvcard + 2];
-if (debug) printk("QRV channel %d rx state changed to %d\n",qrvcard,wc->qrvhook[qrvcard + 2]);
+if (debug) printk(KERN_DEBUG "QRV channel %d rx state changed to %d\n",qrvcard,wc->qrvhook[qrvcard + 2]);
dahdi_hooksig(wc->chans[qrvcard],
(b1) ? DAHDI_RXSIG_OFFHOOK : DAHDI_RXSIG_ONHOOK);
wc->qrvdebtime[card] = 0;
@@ -1113,7 +1113,7 @@ if (debug) printk("QRV channel %d rx state changed to %d\n",qrvcard,wc->qrvhook[
if (wc->qrvdebtime[qrvcard + 1] == 1)
{
b1 = wc->qrvhook[qrvcard + 3];
-if (debug) printk("QRV channel %d rx state changed to %d\n",qrvcard + 1,wc->qrvhook[qrvcard + 3]);
+if (debug) printk(KERN_DEBUG "QRV channel %d rx state changed to %d\n",qrvcard + 1,wc->qrvhook[qrvcard + 3]);
dahdi_hooksig(wc->chans[qrvcard + 1],
(b1) ? DAHDI_RXSIG_OFFHOOK : DAHDI_RXSIG_ONHOOK);
wc->qrvdebtime[card] = 0;
@@ -1147,7 +1147,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (!fxo->wasringing) {
fxo->wasringing = 1;
if (debug)
- printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "RING on %d/%d!\n", wc->span.spanno, card + 1);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING);
}
fxo->lastrdtx = res;
@@ -1156,7 +1156,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if ((fxo->ringdebounce == 0) && fxo->wasringing) {
fxo->wasringing = 0;
if (debug)
- printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO RING on %d/%d!\n", wc->span.spanno, card + 1);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
}
}
@@ -1173,7 +1173,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
fxo->wasringing = 1;
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING);
if (debug)
- printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "RING on %d/%d!\n", wc->span.spanno, card + 1);
}
fxo->ringdebounce = DAHDI_CHUNKSIZE * ringdebounce;
}
@@ -1184,7 +1184,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
fxo->wasringing = 0;
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
if (debug)
- printk("NO RING on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO RING on %d/%d!\n", wc->span.spanno, card + 1);
}
fxo->ringdebounce = 0;
}
@@ -1197,7 +1197,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (fxovoltage) {
if (!(wc->intcount % 100)) {
- printk("Port %d: Voltage: %d Debounce %d\n", card + 1,
+ printk(KERN_INFO "Port %d: Voltage: %d Debounce %d\n", card + 1,
b, fxo->battdebounce);
}
}
@@ -1222,12 +1222,12 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (--fxo->battdebounce == 0) {
fxo->battery = BATTERY_LOST;
if (debug)
- printk("NO BATTERY on %d/%d!\n", wc->span.spanno, card + 1);
+ printk(KERN_DEBUG "NO BATTERY on %d/%d!\n", wc->span.spanno, card + 1);
#ifdef JAPAN
if (!wc->ohdebounce && wc->offhook) {
dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_ONHOOK);
if (debug)
- printk("Signalled On Hook\n");
+ printk(KERN_DEBUG "Signalled On Hook\n");
#ifdef ZERO_BATT_RING
wc->onhook++;
#endif
@@ -1264,14 +1264,14 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (--fxo->battdebounce == 0) {
fxo->battery = BATTERY_PRESENT;
if (debug)
- printk("BATTERY on %d/%d (%s)!\n", wc->span.spanno, card + 1,
+ printk(KERN_DEBUG "BATTERY on %d/%d (%s)!\n", wc->span.spanno, card + 1,
(b < 0) ? "-" : "+");
#ifdef ZERO_BATT_RING
if (wc->onhook) {
wc->onhook = 0;
dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK);
if (debug)
- printk("Signalled Off Hook\n");
+ printk(KERN_DEBUG "Signalled Off Hook\n");
}
#else
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
@@ -1313,7 +1313,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
if (fxo->polaritydebounce < 1) {
if (fxo->lastpol != fxo->polarity) {
if (debug & DEBUG_CARD)
- printk("%lu Polarity reversed (%d -> %d)\n", jiffies,
+ printk(KERN_DEBUG "%lu Polarity reversed (%d -> %d)\n", jiffies,
fxo->polarity,
fxo->lastpol);
if (fxo->polarity)
@@ -1340,24 +1340,24 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
/* Reset the debounce (must be multiple of 4ms) */
wc->mods[card].fxs.debounce = 8 * (4 * 8);
#if 0
- printk("Resetting debounce card %d hook %d, %d\n", card, hook, wc->mods[card].fxs.debounce);
+ printk(KERN_DEBUG "Resetting debounce card %d hook %d, %d\n", card, hook, wc->mods[card].fxs.debounce);
#endif
} else {
if (wc->mods[card].fxs.debounce > 0) {
wc->mods[card].fxs.debounce-= 4 * DAHDI_CHUNKSIZE;
#if 0
- printk("Sustaining hook %d, %d\n", hook, wc->mods[card].fxs.debounce);
+ printk(KERN_DEBUG "Sustaining hook %d, %d\n", hook, wc->mods[card].fxs.debounce);
#endif
if (!wc->mods[card].fxs.debounce) {
#if 0
- printk("Counted down debounce, newhook: %d...\n", hook);
+ printk(KERN_DEBUG "Counted down debounce, newhook: %d...\n", hook);
#endif
wc->mods[card].fxs.debouncehook = hook;
}
if (!wc->mods[card].fxs.oldrxhook && wc->mods[card].fxs.debouncehook) {
/* Off hook */
if (debug & DEBUG_CARD)
- printk("wctdm: Card %d Going off hook\n", card);
+ printk(KERN_DEBUG "wctdm: Card %d Going off hook\n", card);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK);
if (robust)
wctdm_init_proslic(wc, card, 1, 0, 1);
@@ -1366,7 +1366,7 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
} else if (wc->mods[card].fxs.oldrxhook && !wc->mods[card].fxs.debouncehook) {
/* On hook */
if (debug & DEBUG_CARD)
- printk("wctdm: Card %d Going on hook\n", card);
+ printk(KERN_DEBUG "wctdm: Card %d Going on hook\n", card);
dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_ONHOOK);
wc->mods[card].fxs.oldrxhook = 0;
}
@@ -1381,14 +1381,14 @@ static inline void wctdm_vpm_check(struct wctdm *wc, int x)
{
if (wc->cmdq[x].isrshadow[0]) {
if (debug & DEBUG_ECHOCAN)
- printk("VPM: Detected dtmf ON channel %02x on chip %d!\n", wc->cmdq[x].isrshadow[0], x - NUM_CARDS);
+ printk(KERN_DEBUG "VPM: Detected dtmf ON channel %02x on chip %d!\n", wc->cmdq[x].isrshadow[0], x - NUM_CARDS);
wc->sethook[x] = CMD_WR(0xb9, wc->cmdq[x].isrshadow[0]);
wc->cmdq[x].isrshadow[0] = 0;
/* Cancel most recent lookup, if there is one */
wc->cmdq[x].cmds[USER_COMMANDS+0] = 0x00000000;
} else if (wc->cmdq[x].isrshadow[1]) {
if (debug & DEBUG_ECHOCAN)
- printk("VPM: Detected dtmf OFF channel %02x on chip %d!\n", wc->cmdq[x].isrshadow[1], x - NUM_CARDS);
+ printk(KERN_DEBUG "VPM: Detected dtmf OFF channel %02x on chip %d!\n", wc->cmdq[x].isrshadow[1], x - NUM_CARDS);
wc->sethook[x] = CMD_WR(0xbd, wc->cmdq[x].isrshadow[1]);
wc->cmdq[x].isrshadow[1] = 0;
/* Cancel most recent lookup, if there is one */
@@ -1412,7 +1412,7 @@ static int wctdm_echocan_with_params(struct dahdi_chan *chan, struct dahdi_echoc
channel >>= 2;
if(debug & DEBUG_ECHOCAN)
- printk("echocan: Unit is %d, Channel is %d length %d\n",
+ printk(KERN_DEBUG "echocan: Unit is %d, Channel is %d length %d\n",
unit, channel, ecp->tap_length);
if (ecp->tap_length)
wctdm_vpm_out(wc,unit,channel,0x3e);
@@ -1521,7 +1521,7 @@ static int wctdm_voicedaa_insane(struct wctdm *wc, int card)
return -2;
blah = wctdm_getreg(wc, card, 11);
if (debug & DEBUG_CARD)
- printk("VoiceDAA System: %02x\n", blah & 0xf);
+ printk(KERN_DEBUG "VoiceDAA System: %02x\n", blah & 0xf);
return 0;
}
@@ -1532,11 +1532,11 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card)
blah = wctdm_getreg(wc, card, 0);
if (debug & DEBUG_CARD)
- printk("ProSLIC on module %d, product %d, version %d\n", card, (blah & 0x30) >> 4, (blah & 0xf));
+ printk(KERN_DEBUG "ProSLIC on module %d, product %d, version %d\n", card, (blah & 0x30) >> 4, (blah & 0xf));
#if 0
if ((blah & 0x30) >> 4) {
- printk("ProSLIC on module %d is not a 3210.\n", card);
+ printk(KERN_DEBUG "ProSLIC on module %d is not a 3210.\n", card);
return -1;
}
#endif
@@ -1545,7 +1545,7 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card)
return -1;
}
if ((blah & 0xf) < 2) {
- printk("ProSLIC 3210 version %d is too old\n", blah & 0xf);
+ printk(KERN_INFO "ProSLIC 3210 version %d is too old\n", blah & 0xf);
return -1;
}
if (wctdm_getreg(wc, card, 1) & 0x80)
@@ -1554,30 +1554,30 @@ static int wctdm_proslic_insane(struct wctdm *wc, int card)
blah = wctdm_getreg(wc, card, 8);
if (blah != 0x2) {
- printk("ProSLIC on module %d insane (1) %d should be 2\n", card, blah);
+ printk(KERN_NOTICE "ProSLIC on module %d insane (1) %d should be 2\n", card, blah);
return -1;
} else if ( insane_report)
- printk("ProSLIC on module %d Reg 8 Reads %d Expected is 0x2\n",card,blah);
+ printk(KERN_NOTICE "ProSLIC on module %d Reg 8 Reads %d Expected is 0x2\n",card,blah);
blah = wctdm_getreg(wc, card, 64);
if (blah != 0x0) {
- printk("ProSLIC on module %d insane (2)\n", card);
+ printk(KERN_NOTICE "ProSLIC on module %d insane (2)\n", card);
return -1;
} else if ( insane_report)
- printk("ProSLIC on module %d Reg 64 Reads %d Expected is 0x0\n",card,blah);
+ printk(KERN_NOTICE "ProSLIC on module %d Reg 64 Reads %d Expected is 0x0\n",card,blah);
blah = wctdm_getreg(wc, card, 11);
if (blah != 0x33) {
- printk("ProSLIC on module %d insane (3)\n", card);
+ printk(KERN_NOTICE "ProSLIC on module %d insane (3)\n", card);
return -1;
} else if ( insane_report)
- printk("ProSLIC on module %d Reg 11 Reads %d Expected is 0x33\n",card,blah);
+ printk(KERN_NOTICE "ProSLIC on module %d Reg 11 Reads %d Expected is 0x33\n",card,blah);
/* Just be sure it's setup right. */
wctdm_setreg(wc, card, 30, 0);
if (debug & DEBUG_CARD)
- printk("ProSLIC on module %d seems sane.\n", card);
+ printk(KERN_DEBUG "ProSLIC on module %d seems sane.\n", card);
return 0;
}
@@ -1601,11 +1601,11 @@ static int wctdm_proslic_powerleak_test(struct wctdm *wc, int card)
}
if (vbat < 0x06) {
- printk("Excessive leakage detected on module %d: %d volts (%02x) after %d ms\n", card,
+ printk(KERN_NOTICE "Excessive leakage detected on module %d: %d volts (%02x) after %d ms\n", card,
376 * vbat / 1000, vbat, (int)((jiffies - origjiffies) * 1000 / HZ));
return -1;
} else if (debug & DEBUG_CARD) {
- printk("Post-leakage voltage: %d volts\n", 376 * vbat / 1000);
+ printk(KERN_DEBUG "Post-leakage voltage: %d volts\n", 376 * vbat / 1000);
}
return 0;
}
@@ -1637,12 +1637,12 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
}
if (vbat < 0xc0) {
- printk("ProSLIC on module %d failed to powerup within %d ms (%d mV only)\n\n -- DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM CARD??\n",
+ printk(KERN_NOTICE "ProSLIC on module %d failed to powerup within %d ms (%d mV only)\n\n -- DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM CARD??\n",
card, (int)(((jiffies - origjiffies) * 1000 / HZ)),
vbat * 375);
return -1;
} else if (debug & DEBUG_CARD) {
- printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
+ printk(KERN_DEBUG "ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ)));
}
@@ -1652,10 +1652,10 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
if ( loopcurrent > 41 ) {
lim = 0;
if (debug & DEBUG_CARD)
- printk("Loop current out of range! Setting to default 20mA!\n");
+ printk(KERN_DEBUG "Loop current out of range! Setting to default 20mA!\n");
}
else if (debug & DEBUG_CARD)
- printk("Loop current set to %dmA!\n",(lim*3)+20);
+ printk(KERN_DEBUG "Loop current set to %dmA!\n",(lim*3)+20);
wctdm_setreg(wc,card,LOOP_I_LIMIT,lim);
/* Engage DC-DC converter */
@@ -1664,7 +1664,7 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
origjiffies = jiffies;
while(0x80 & wctdm_getreg(wc, card, 93)) {
if ((jiffies - origjiffies) > 2 * HZ) {
- printk("Timeout waiting for DC-DC calibration on module %d\n", card);
+ printk(KERN_DEBUG "Timeout waiting for DC-DC calibration on module %d\n", card);
return -1;
}
}
@@ -1675,7 +1675,7 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast)
/* Just check to be sure */
vbat = wctdm_getreg(wc, card, 82);
- printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
+ printk(KERN_DEBUG "ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n",
card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ)));
#endif
#endif
@@ -1772,16 +1772,16 @@ static int wctdm_proslic_calibrate(struct wctdm *wc, int card)
origjiffies = jiffies;
while(wctdm_getreg(wc, card, 96)) {
if ((jiffies - origjiffies) > 2 * HZ) {
- printk("Timeout waiting for calibration of module %d\n", card);
+ printk(KERN_NOTICE "Timeout waiting for calibration of module %d\n", card);
return -1;
}
}
if (debug & DEBUG_CARD) {
/* Print calibration parameters */
- printk("Calibration Vector Regs 98 - 107: \n");
+ printk(KERN_DEBUG "Calibration Vector Regs 98 - 107: \n");
for (x=98;x<108;x++) {
- printk("%d: %02x\n", x, wctdm_getreg(wc, card, x));
+ printk(KERN_DEBUG "%d: %02x\n", x, wctdm_getreg(wc, card, x));
}
}
return 0;
@@ -1805,12 +1805,12 @@ static void wait_just_a_bit(int foo)
static int wctdm_set_hwgain(struct wctdm *wc, int card, __s32 gain, __u32 tx)
{
if (!(wc->modtype[card] == MOD_TYPE_FXO)) {
- printk("Cannot adjust gain. Unsupported module type!\n");
+ printk(KERN_NOTICE "Cannot adjust gain. Unsupported module type!\n");
return -1;
}
if (tx) {
if (debug)
- printk("setting FXO tx gain for card=%d to %d\n", card, gain);
+ printk(KERN_DEBUG "setting FXO tx gain for card=%d to %d\n", card, gain);
if (gain >= -150 && gain <= 0) {
wctdm_setreg(wc, card, 38, 16 + (gain/-10));
wctdm_setreg(wc, card, 40, 16 + (-gain%10));
@@ -1818,12 +1818,12 @@ static int wctdm_set_hwgain(struct wctdm *wc, int card, __s32 gain, __u32 tx)
wctdm_setreg(wc, card, 38, gain/10);
wctdm_setreg(wc, card, 40, (gain%10));
} else {
- printk("FXO tx gain is out of range (%d)\n", gain);
+ printk(KERN_NOTICE "FXO tx gain is out of range (%d)\n", gain);
return -1;
}
} else { /* rx */
if (debug)
- printk("setting FXO rx gain for card=%d to %d\n", card, gain);
+ printk(KERN_DEBUG "setting FXO rx gain for card=%d to %d\n", card, gain);
if (gain >= -150 && gain <= 0) {
wctdm_setreg(wc, card, 39, 16+ (gain/-10));
wctdm_setreg(wc, card, 41, 16 + (-gain%10));
@@ -1831,7 +1831,7 @@ static int wctdm_set_hwgain(struct wctdm *wc, int card, __s32 gain, __u32 tx)
wctdm_setreg(wc, card, 39, gain/10);
wctdm_setreg(wc, card, 41, (gain%10));
} else {
- printk("FXO rx gain is out of range (%d)\n", gain);
+ printk(KERN_NOTICE "FXO rx gain is out of range (%d)\n", gain);
return -1;
}
}
@@ -1920,11 +1920,11 @@ static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int manual,
wait_just_a_bit(HZ/10);
if (!(wctdm_getreg(wc, card, 11) & 0xf0)) {
- printk("VoiceDAA did not bring up ISO link properly!\n");
+ printk(KERN_NOTICE "VoiceDAA did not bring up ISO link properly!\n");
return -1;
}
if (debug & DEBUG_CARD)
- printk("ISO-Cap is now up, line side: %02x rev %02x\n",
+ printk(KERN_DEBUG "ISO-Cap is now up, line side: %02x rev %02x\n",
wctdm_getreg(wc, card, 11) >> 4,
(wctdm_getreg(wc, card, 13) >> 2) & 0xf);
/* Enable on-hook line monitor */
@@ -1935,7 +1935,7 @@ static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int manual,
wctdm_set_hwgain(wc, card, fxorxgain, 0);
if(debug)
- printk("DEBUG fxotxgain:%i.%i fxorxgain:%i.%i\n", (wctdm_getreg(wc, card, 38)/16) ? -(wctdm_getreg(wc, card, 38) - 16) : wctdm_getreg(wc, card, 38), (wctdm_getreg(wc, card, 40)/16) ? -(wctdm_getreg(wc, card, 40) - 16) : wctdm_getreg(wc, card, 40), (wctdm_getreg(wc, card, 39)/16) ? -(wctdm_getreg(wc, card, 39) - 16): wctdm_getreg(wc, card, 39), (wctdm_getreg(wc, card, 41)/16)?-(wctdm_getreg(wc, card, 41) - 16) : wctdm_getreg(wc, card, 41));
+ printk(KERN_DEBUG "DEBUG fxotxgain:%i.%i fxorxgain:%i.%i\n", (wctdm_getreg(wc, card, 38)/16) ? -(wctdm_getreg(wc, card, 38) - 16) : wctdm_getreg(wc, card, 38), (wctdm_getreg(wc, card, 40)/16) ? -(wctdm_getreg(wc, card, 40) - 16) : wctdm_getreg(wc, card, 40), (wctdm_getreg(wc, card, 39)/16) ? -(wctdm_getreg(wc, card, 39) - 16): wctdm_getreg(wc, card, 39), (wctdm_getreg(wc, card, 41)/16)?-(wctdm_getreg(wc, card, 41) - 16) : wctdm_getreg(wc, card, 41));
return 0;
@@ -1995,7 +1995,7 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
/* Power up the DC-DC converter */
if (wctdm_powerup_proslic(wc, card, fast)) {
- printk("Unable to do INITIAL ProSLIC powerup on module %d\n", card);
+ printk(KERN_NOTICE "Unable to do INITIAL ProSLIC powerup on module %d\n", card);
return -1;
}
@@ -2003,40 +2003,40 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
/* Check for power leaks */
if (wctdm_proslic_powerleak_test(wc, card)) {
- printk("ProSLIC module %d failed leakage test. Check for short circuit\n", card);
+ printk(KERN_NOTICE "ProSLIC module %d failed leakage test. Check for short circuit\n", card);
}
/* Power up again */
if (wctdm_powerup_proslic(wc, card, fast)) {
- printk("Unable to do FINAL ProSLIC powerup on module %d\n", card);
+ printk(KERN_NOTICE "Unable to do FINAL ProSLIC powerup on module %d\n", card);
return -1;
}
#ifndef NO_CALIBRATION
/* Perform calibration */
if(manual) {
if (wctdm_proslic_manual_calibrate(wc, card)) {
- //printk("Proslic failed on Manual Calibration\n");
+ //printk(KERN_NOTICE "Proslic failed on Manual Calibration\n");
if (wctdm_proslic_manual_calibrate(wc, card)) {
- printk("Proslic Failed on Second Attempt to Calibrate Manually. (Try -DNO_CALIBRATION in Makefile)\n");
+ printk(KERN_NOTICE "Proslic Failed on Second Attempt to Calibrate Manually. (Try -DNO_CALIBRATION in Makefile)\n");
return -1;
}
- printk("Proslic Passed Manual Calibration on Second Attempt\n");
+ printk(KERN_INFO "Proslic Passed Manual Calibration on Second Attempt\n");
}
}
else {
if(wctdm_proslic_calibrate(wc, card)) {
- //printk("ProSlic died on Auto Calibration.\n");
+ //printk(KERN_NOTICE "ProSlic died on Auto Calibration.\n");
if (wctdm_proslic_calibrate(wc, card)) {
- printk("Proslic Failed on Second Attempt to Auto Calibrate\n");
+ printk(KERN_NOTICE "Proslic Failed on Second Attempt to Auto Calibrate\n");
return -1;
}
- printk("Proslic Passed Auto Calibration on Second Attempt\n");
+ printk(KERN_INFO "Proslic Passed Auto Calibration on Second Attempt\n");
}
}
/* Perform DC-DC calibration */
wctdm_setreg(wc, card, 93, 0x99);
r19 = wctdm_getreg(wc, card, 107);
if ((r19 < 0x2) || (r19 > 0xd)) {
- printk("DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19);
+ printk(KERN_NOTICE "DC-DC cal has a surprising direct 107 of 0x%02x!\n", r19);
wctdm_setreg(wc, card, 107, 0x8);
}
@@ -2122,24 +2122,24 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
wctdm_setreg(wc, card, 74, 0x3f);
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x247))
return -1;
- printk("Boosting fast ringer on slot %d (89V peak)\n", card + 1);
+ printk(KERN_INFO "Boosting fast ringer on slot %d (89V peak)\n", card + 1);
} else if (lowpower) {
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x14b))
return -1;
- printk("Reducing fast ring power on slot %d (50V peak)\n", card + 1);
+ printk(KERN_INFO "Reducing fast ring power on slot %d (50V peak)\n", card + 1);
} else
- printk("Speeding up ringer on slot %d (25Hz)\n", card + 1);
+ printk(KERN_INFO "Speeding up ringer on slot %d (25Hz)\n", card + 1);
} else {
/* Beef up Ringing voltage to 89V */
if (boostringer) {
wctdm_setreg(wc, card, 74, 0x3f);
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x1d1))
return -1;
- printk("Boosting ringer on slot %d (89V peak)\n", card + 1);
+ printk(KERN_INFO "Boosting ringer on slot %d (89V peak)\n", card + 1);
} else if (lowpower) {
if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x108))
return -1;
- printk("Reducing ring power on slot %d (50V peak)\n", card + 1);
+ printk(KERN_INFO "Reducing ring power on slot %d (50V peak)\n", card + 1);
}
}
@@ -2172,7 +2172,7 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
}
if (debug)
- printk("DEBUG: fxstxgain:%s fxsrxgain:%s\n",((wctdm_getreg(wc, card, 9)/8) == 1)?"3.5":(((wctdm_getreg(wc,card,9)/4) == 1)?"-3.5":"0.0"),((wctdm_getreg(wc, card, 9)/2) == 1)?"3.5":((wctdm_getreg(wc,card,9)%2)?"-3.5":"0.0"));
+ printk(KERN_DEBUG "DEBUG: fxstxgain:%s fxsrxgain:%s\n",((wctdm_getreg(wc, card, 9)/8) == 1)?"3.5":(((wctdm_getreg(wc,card,9)/4) == 1)?"-3.5":"0.0"),((wctdm_getreg(wc, card, 9)/2) == 1)?"3.5":((wctdm_getreg(wc,card,9)%2)?"-3.5":"0.0"));
wc->mods[card].fxs.lasttxhook = 0x11;
wctdm_setreg(wc, card, 64, 0x01);
@@ -2260,7 +2260,7 @@ long l;
/* actually do something with the values */
qrvcard = (chan->chanpos - 1) & 0xfc;
- if (debug) printk("@@@@@ radmodes: %d,%d rxgains: %d,%d txgains: %d,%d\n",
+ if (debug) printk(KERN_DEBUG "@@@@@ radmodes: %d,%d rxgains: %d,%d txgains: %d,%d\n",
wc->radmode[qrvcard],wc->radmode[qrvcard + 1],
wc->rxgain[qrvcard],wc->rxgain[qrvcard + 1],
wc->txgain[qrvcard],wc->txgain[qrvcard + 1]);
@@ -2270,7 +2270,7 @@ long l;
if (wc->rxgain[qrvcard] < 1200) r |= 1;
if (wc->rxgain[qrvcard + 1] < 1200) r |= 2;
wctdm_setreg(wc, qrvcard, 7, r);
- if (debug) printk("@@@@@ setting reg 7 to %02x hex\n",r);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 7 to %02x hex\n",r);
r = 0;
if (wc->radmode[qrvcard] & RADMODE_PREEMP) r |= 3;
else if (wc->txgain[qrvcard] >= 3600) r |= 1;
@@ -2279,35 +2279,35 @@ long l;
else if (wc->txgain[qrvcard + 1] >= 3600) r |= 4;
else if (wc->txgain[qrvcard + 1] >= 1200) r |= 8;
wctdm_setreg(wc, qrvcard, 4, r);
- if (debug) printk("@@@@@ setting reg 4 to %02x hex\n",r);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 4 to %02x hex\n",r);
r = 0;
if (wc->rxgain[qrvcard] >= 2400) r |= 1;
if (wc->rxgain[qrvcard + 1] >= 2400) r |= 2;
wctdm_setreg(wc, qrvcard, 0x25, r);
- if (debug) printk("@@@@@ setting reg 0x25 to %02x hex\n",r);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 0x25 to %02x hex\n",r);
r = 0;
if (wc->txgain[qrvcard] < 2400) r |= 1; else r |= 4;
if (wc->txgain[qrvcard + 1] < 2400) r |= 8; else r |= 0x20;
wctdm_setreg(wc, qrvcard, 0x26, r);
- if (debug) printk("@@@@@ setting reg 0x26 to %02x hex\n",r);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 0x26 to %02x hex\n",r);
l = ((long)(wc->rxgain[qrvcard] % 1200) * 10000) / 46875;
if (l == 0) l = 1;
if (wc->rxgain[qrvcard] >= 2400) l += 181;
wctdm_setreg(wc, qrvcard, 0x0b, (unsigned char)l);
- if (debug) printk("@@@@@ setting reg 0x0b to %02x hex\n",(unsigned char)l);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 0x0b to %02x hex\n",(unsigned char)l);
l = ((long)(wc->rxgain[qrvcard + 1] % 1200) * 10000) / 46875;
if (l == 0) l = 1;
if (wc->rxgain[qrvcard + 1] >= 2400) l += 181;
wctdm_setreg(wc, qrvcard, 0x0c, (unsigned char)l);
- if (debug) printk("@@@@@ setting reg 0x0c to %02x hex\n",(unsigned char)l);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 0x0c to %02x hex\n",(unsigned char)l);
l = ((long)(wc->txgain[qrvcard] % 1200) * 10000) / 46875;
if (l == 0) l = 1;
wctdm_setreg(wc, qrvcard, 0x0f, (unsigned char)l);
- if (debug) printk("@@@@@ setting reg 0x0f to %02x hex\n", (unsigned char)l);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 0x0f to %02x hex\n", (unsigned char)l);
l = ((long)(wc->txgain[qrvcard + 1] % 1200) * 10000) / 46875;
if (l == 0) l = 1;
wctdm_setreg(wc, qrvcard, 0x10,(unsigned char)l);
- if (debug) printk("@@@@@ setting reg 0x10 to %02x hex\n",(unsigned char)l);
+ if (debug) printk(KERN_DEBUG "@@@@@ setting reg 0x10 to %02x hex\n",(unsigned char)l);
return;
}
@@ -2378,19 +2378,19 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
if (regop.indirect) {
if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS)
return -EINVAL;
- printk("Setting indirect %d to 0x%04x on %d\n", regop.reg, regop.val, chan->chanpos);
+ printk(KERN_INFO "Setting indirect %d to 0x%04x on %d\n", regop.reg, regop.val, chan->chanpos);
wctdm_proslic_setreg_indirect(wc, chan->chanpos - 1, regop.reg, regop.val);
} else {
regop.val &= 0xff;
if (regop.reg == 64)
wc->mods[chan->chanpos-1].fxs.lasttxhook = (regop.val & 0x0f) | 0x10;
- printk("Setting direct %d to %04x on %d\n", regop.reg, regop.val, chan->chanpos);
+ printk(KERN_INFO "Setting direct %d to %04x on %d\n", regop.reg, regop.val, chan->chanpos);
wctdm_setreg(wc, chan->chanpos - 1, regop.reg, regop.val);
}
break;
case WCTDM_SET_ECHOTUNE:
- printk("-- Setting echo registers: \n");
+ printk(KERN_INFO "-- Setting echo registers: \n");
if (copy_from_user(&echoregs, (struct wctdm_echo_coefs*)data, sizeof(echoregs)))
return -EFAULT;
@@ -2408,7 +2408,7 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
wctdm_setreg(wc, chan->chanpos - 1, 51, echoregs.coef7);
wctdm_setreg(wc, chan->chanpos - 1, 52, echoregs.coef8);
- printk("-- Set echo registers successfully\n");
+ printk(KERN_INFO "-- Set echo registers successfully\n");
break;
} else {
@@ -2423,7 +2423,7 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
wctdm_set_hwgain(wc, chan->chanpos-1, hwgain.newgain, hwgain.tx);
if (debug)
- printk("Setting hwgain on channel %d to %d for %s direction\n",
+ printk(KERN_DEBUG "Setting hwgain on channel %d to %d for %s direction\n",
chan->chanpos-1, hwgain.newgain, hwgain.tx ? "tx" : "rx");
break;
#ifdef VPM_SUPPORT
@@ -2608,7 +2608,7 @@ static int wctdm_open(struct dahdi_chan *chan)
static int wctdm_watchdog(struct dahdi_span *span, int event)
{
- printk("TDM: Called watchdog\n");
+ printk(KERN_INFO "TDM: Called watchdog\n");
return 0;
}
@@ -2661,7 +2661,7 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
wc->qrvhook[chan->chanpos - 1] = 0;
break;
default:
- printk("wctdm24xxp: Can't set tx state to %d\n", txsig);
+ printk(KERN_NOTICE "wctdm24xxp: Can't set tx state to %d\n", txsig);
}
reg = 0;
if (!wc->qrvhook[qrvcard]) reg |= 1;
@@ -2682,7 +2682,7 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
/* wctdm_setreg(wc, chan->chanpos - 1, 5, 0x8); */
break;
default:
- printk("wctdm24xxp: Can't set tx state to %d\n", txsig);
+ printk(KERN_NOTICE "wctdm24xxp: Can't set tx state to %d\n", txsig);
}
} else {
switch(txsig) {
@@ -2717,10 +2717,10 @@ static int wctdm_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig)
wc->mods[chan->chanpos - 1].fxs.lasttxhook = 0x10;
break;
default:
- printk("wctdm24xxp: Can't set tx state to %d\n", txsig);
+ printk(KERN_NOTICE "wctdm24xxp: Can't set tx state to %d\n", txsig);
}
if (debug & DEBUG_CARD)
- printk("Setting FXS hook state to %d (%02x)\n", txsig, reg);
+ printk(KERN_DEBUG "Setting FXS hook state to %d (%02x)\n", txsig, reg);
wc->sethook[chan->chanpos - 1] = CMD_WR(64, wc->mods[chan->chanpos - 1].fxs.lasttxhook);
@@ -2733,19 +2733,19 @@ static void wctdm_dacs_connect(struct wctdm *wc, int srccard, int dstcard)
{
if (wc->dacssrc[dstcard] > - 1) {
- printk("wctdm_dacs_connect: Can't have double sourcing yet!\n");
+ printk(KERN_NOTICE "wctdm_dacs_connect: Can't have double sourcing yet!\n");
return;
}
if (!((wc->modtype[srccard] == MOD_TYPE_FXS)||(wc->modtype[srccard] == MOD_TYPE_FXO))){
- printk("wctdm_dacs_connect: Unsupported modtype for card %d\n", srccard);
+ printk(KERN_NOTICE "wctdm_dacs_connect: Unsupported modtype for card %d\n", srccard);
return;
}
if (!((wc->modtype[dstcard] == MOD_TYPE_FXS)||(wc->modtype[dstcard] == MOD_TYPE_FXO))){
- printk("wctdm_dacs_connect: Unsupported modtype for card %d\n", dstcard);
+ printk(KERN_NOTICE "wctdm_dacs_connect: Unsupported modtype for card %d\n", dstcard);
return;
}
if (debug)
- printk("connect %d => %d\n", srccard, dstcard);
+ printk(KERN_DEBUG "connect %d => %d\n", srccard, dstcard);
wc->dacssrc[dstcard] = srccard;
/* make srccard transmit to srccard+24 on the TDM bus */
@@ -2776,7 +2776,7 @@ static void wctdm_dacs_disconnect(struct wctdm *wc, int card)
{
if (wc->dacssrc[card] > -1) {
if (debug)
- printk("wctdm_dacs_disconnect: restoring TX for %d and RX for %d\n",wc->dacssrc[card], card);
+ printk(KERN_DEBUG "wctdm_dacs_disconnect: restoring TX for %d and RX for %d\n",wc->dacssrc[card], card);
/* restore TX (source card) */
if(wc->modtype[wc->dacssrc[card]] == MOD_TYPE_FXS){
@@ -2786,7 +2786,7 @@ static void wctdm_dacs_disconnect(struct wctdm *wc, int card)
wctdm_setreg(wc, card, 34, (card * 8) & 0xff);
wctdm_setreg(wc, card, 35, (card * 8) >> 8);
} else {
- printk("WARNING: wctdm_dacs_disconnect() called on unsupported modtype\n");
+ printk(KERN_WARNING "WARNING: wctdm_dacs_disconnect() called on unsupported modtype\n");
}
/* restore RX (this card) */
@@ -2797,7 +2797,7 @@ static void wctdm_dacs_disconnect(struct wctdm *wc, int card)
wctdm_setreg(wc, card, 36, (card * 8) & 0xff);
wctdm_setreg(wc, card, 37, (card * 8) >> 8);
} else {
- printk("WARNING: wctdm_dacs_disconnect() called on unsupported modtype\n");
+ printk(KERN_WARNING "WARNING: wctdm_dacs_disconnect() called on unsupported modtype\n");
}
wc->dacssrc[card] = -1;
@@ -2816,11 +2816,11 @@ static int wctdm_dacs(struct dahdi_chan *dst, struct dahdi_chan *src)
if(src) {
wctdm_dacs_connect(wc, src->chanpos - 1, dst->chanpos - 1);
if (debug)
- printk("dacs connecct: %d -> %d!\n\n", src->chanpos, dst->chanpos);
+ printk(KERN_DEBUG "dacs connecct: %d -> %d!\n\n", src->chanpos, dst->chanpos);
} else {
wctdm_dacs_disconnect(wc, dst->chanpos - 1);
if (debug)
- printk("dacs disconnect: %d!\n", dst->chanpos);
+ printk(KERN_DEBUG "dacs disconnect: %d!\n", dst->chanpos);
}
return 0;
}
@@ -2839,7 +2839,7 @@ static int wctdm_initialize(struct wctdm *wc)
wc->span.manufacturer = "Digium";
strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1);
if (alawoverride) {
- printk("ALAW override parameter detected. Device will be operating in ALAW\n");
+ printk(KERN_INFO "ALAW override parameter detected. Device will be operating in ALAW\n");
wc->span.deflaw = DAHDI_LAW_ALAW;
} else
wc->span.deflaw = DAHDI_LAW_MULAW;
@@ -2990,11 +2990,11 @@ static void vpm150m_bh(struct work_struct *data)
if (enable) {
res = gpakAlgControl(vpm150m->dspid, i, EnableDTMFMuteA, &pstatus);
if (debug & DEBUG_ECHOCAN)
- printk("DTMF mute enable took %d ms\n", wc->intcount - start);
+ printk(KERN_DEBUG "DTMF mute enable took %d ms\n", wc->intcount - start);
} else {
res = gpakAlgControl(vpm150m->dspid, i, DisableDTMFMuteA, &pstatus);
if (debug & DEBUG_ECHOCAN)
- printk("DTMF mute disable took %d ms\n", wc->intcount - start);
+ printk(KERN_DEBUG "DTMF mute disable took %d ms\n", wc->intcount - start);
}
if (!res)
change_bit(i, &vpm150m->curdtmfmutestate);
@@ -3012,10 +3012,10 @@ static void vpm150m_bh(struct work_struct *data)
res = gpakReadEventFIFOMessage(vpm150m->dspid, &channel, &eventcode, &eventdata);
if (debug & DEBUG_ECHOCAN)
- printk("ReadEventFIFOMessage took %d ms\n", wc->intcount - start);
+ printk(KERN_DEBUG "ReadEventFIFOMessage took %d ms\n", wc->intcount - start);
if (res == RefInvalidEvent || res == RefDspCommFailure) {
- printk("VPM Comm Error\n");
+ printk(KERN_NOTICE "VPM Comm Error\n");
continue;
}
@@ -3029,7 +3029,7 @@ static void vpm150m_bh(struct work_struct *data)
char zaptone = vpm150mtone_to_zaptone(tone);
if (debug & DEBUG_ECHOCAN)
- printk("Channel %d: Detected DTMF tone %d of duration %d!!!\n", channel + 1, tone, duration);
+ printk(KERN_DEBUG "Channel %d: Detected DTMF tone %d of duration %d!!!\n", channel + 1, tone, duration);
if (test_bit(channel, &wc->dtmfmask) && (eventdata.toneEvent.ToneDuration > 0)) {
struct dahdi_chan *chan = wc->chans[channel];
@@ -3051,13 +3051,13 @@ static void vpm150m_bh(struct work_struct *data)
}
if (!test_bit(channel, &wc->dtmfactive)) {
if (debug & DEBUG_ECHOCAN)
- printk("Queuing DTMFDOWN %c\n", zaptone);
+ printk(KERN_DEBUG "Queuing DTMFDOWN %c\n", zaptone);
set_bit(channel, &wc->dtmfactive);
dahdi_qevent_lock(chan, (DAHDI_EVENT_DTMFDOWN | zaptone));
}
} else if ((tone == EndofMFDigit) && test_bit(channel, &wc->dtmfactive)) {
if (debug & DEBUG_ECHOCAN)
- printk("Queuing DTMFUP %c\n", vpm150mtone_to_zaptone(vpm150m->curtone[channel]));
+ printk(KERN_DEBUG "Queuing DTMFUP %c\n", vpm150mtone_to_zaptone(vpm150m->curtone[channel]));
dahdi_qevent_lock(chan, (DAHDI_EVENT_DTMFUP | vpm150mtone_to_zaptone(vpm150m->curtone[channel])));
clear_bit(channel, &wc->dtmfactive);
}
@@ -3080,7 +3080,7 @@ static void vpm150m_bh(struct work_struct *data)
GpakChannelConfig_t chanconfig;
if (debug & DEBUG_ECHOCAN)
- printk("Reconfiguring chan %d for nlp %d, nlp_thresh %d, and max_supp %d\n", i + 1, vpm150m->desiredecstate[i].nlp_type,
+ printk(KERN_DEBUG "Reconfiguring chan %d for nlp %d, nlp_thresh %d, and max_supp %d\n", i + 1, vpm150m->desiredecstate[i].nlp_type,
vpm150m->desiredecstate[i].nlp_threshold, vpm150m->desiredecstate[i].nlp_max_suppress);
vpm150m_set_chanconfig_from_state(&vpm150m->desiredecstate[i], i, &chanconfig);
@@ -3100,11 +3100,11 @@ static void vpm150m_bh(struct work_struct *data)
if (vpm150m->desiredecstate[i].tap_length) {
res = gpakAlgControl(vpm150m->dspid, i, EnableEcanA, &pstatus);
if (debug & DEBUG_ECHOCAN)
- printk("Echocan enable took %d ms\n", wc->intcount - start);
+ printk(KERN_DEBUG "Echocan enable took %d ms\n", wc->intcount - start);
} else {
res = gpakAlgControl(vpm150m->dspid, i, BypassEcanA, &pstatus);
if (debug & DEBUG_ECHOCAN)
- printk("Echocan disable took %d ms\n", wc->intcount - start);
+ printk(KERN_DEBUG "Echocan disable took %d ms\n", wc->intcount - start);
}
}
@@ -3197,15 +3197,15 @@ static int vpm150m_config_hw(struct wctdm *wc)
portconfig.EightSlotMask3 = 0x0000;
if ((configportstatus = gpakConfigurePorts(vpm150m->dspid, &portconfig, &pstatus))) {
- printk("Configuration of ports failed (%d)!\n", configportstatus);
+ printk(KERN_NOTICE "Configuration of ports failed (%d)!\n", configportstatus);
return -1;
} else {
if (debug & DEBUG_ECHOCAN)
- printk("Configured McBSP ports successfully\n");
+ printk(KERN_DEBUG "Configured McBSP ports successfully\n");
}
if ((res = gpakPingDsp(vpm150m->dspid, &vpm150m->version))) {
- printk("Error pinging DSP (%d)\n", res);
+ printk(KERN_NOTICE "Error pinging DSP (%d)\n", res);
return -1;
}
@@ -3223,29 +3223,30 @@ static int vpm150m_config_hw(struct wctdm *wc)
vpm150m_set_chanconfig_from_state(&vpm150m->curecstate[i], i, &chanconfig);
if ((res = gpakConfigureChannel(vpm150m->dspid, i, tdmToTdm, &chanconfig, &cstatus))) {
- printk("Unable to configure channel (%d)\n", res);
+ printk(KERN_NOTICE "Unable to configure channel (%d)", res);
if (res == 1) {
- printk("Reason %d\n", cstatus);
+ printk(", reason %d", cstatus);
}
+ printk("\n");
return -1;
}
if ((res = gpakAlgControl(vpm150m->dspid, i, BypassEcanA, &algstatus))) {
- printk("Unable to disable echo can on channel %d (reason %d:%d)\n", i + 1, res, algstatus);
+ printk(KERN_NOTICE "Unable to disable echo can on channel %d (reason %d:%d)\n", i + 1, res, algstatus);
return -1;
}
if (vpmdtmfsupport) {
if ((res = gpakAlgControl(vpm150m->dspid, i, DisableDTMFMuteA, &algstatus))) {
- printk("Unable to disable dtmf muting on channel %d (reason %d:%d)\n", i + 1, res, algstatus);
+ printk(KERN_NOTICE "Unable to disable dtmf muting on channel %d (reason %d:%d)\n", i + 1, res, algstatus);
return -1;
}
}
}
if ((res = gpakPingDsp(vpm150m->dspid, &vpm150m->version))) {
- printk("Error pinging DSP (%d)\n", res);
+ printk(KERN_NOTICE "Error pinging DSP (%d)\n", res);
return -1;
}
@@ -3253,7 +3254,7 @@ static int vpm150m_config_hw(struct wctdm *wc)
vpm150m->wc = wc;
if (!vpm150m->wq) {
- printk("Unable to create work queue!\n");
+ printk(KERN_NOTICE "Unable to create work queue!\n");
return -1;
}
@@ -3304,7 +3305,7 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
#endif
if (!vpmsupport) {
- printk("VPM: Support Disabled\n");
+ printk(KERN_NOTICE "VPM: Support Disabled\n");
wc->vpm150m = NULL;
return VPMADT032_DISABLED;
}
@@ -3312,7 +3313,7 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
vpm150m = kmalloc(sizeof(struct vpm150m), GFP_KERNEL);
if (!vpm150m) {
- printk("Unable to allocate VPM150M!\n");
+ printk(KERN_NOTICE "Unable to allocate VPM150M!\n");
return VPMADT032_FAILED;
}
@@ -3328,7 +3329,7 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
}
if (debug & DEBUG_ECHOCAN)
- printk("Setting VPMADT032 DSP ID to %d\n", vpm150m->dspid);
+ printk(KERN_DEBUG "Setting VPMADT032 DSP ID to %d\n", vpm150m->dspid);
spin_lock_irqsave(&wc->reglock, flags);
wc->vpm150m = vpm150m;
@@ -3338,7 +3339,7 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
schluffen(&wc->regq);
if (debug & DEBUG_ECHOCAN)
- printk("VPMADT032 Testing page access: ");
+ printk(KERN_DEBUG "VPMADT032 Testing page access: ");
for (i = 0; i < 0xf; i++) {
int x;
for (x = 0; x < 3; x++) {
@@ -3346,19 +3347,19 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
reg = wctdm_vpm150m_getpage(wc);
if (reg != i) {
if (debug & DEBUG_ECHOCAN)
- printk("Failed: Sent %x != %x VPMADT032 Failed HI page test\n", i, reg);
+ printk(KERN_DEBUG "Failed: Sent %x != %x VPMADT032 Failed HI page test\n", i, reg);
res = VPMADT032_NOT_FOUND;
goto failed_exit;
}
}
}
if (debug & DEBUG_ECHOCAN)
- printk("Passed\n");
+ printk(KERN_DEBUG "Passed\n");
/* Set us up to page 0 */
wctdm_vpm150m_setpage(wc, 0);
if (debug & DEBUG_ECHOCAN)
- printk("VPMADT032 now doing address test: ");
+ printk(KERN_DEBUG "VPMADT032 now doing address test: ");
for (i = 0; i < 16; i++) {
int x;
for (x = 0; x < 2; x++) {
@@ -3375,8 +3376,8 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
printk("Passed\n");
#ifndef VPM150M_SUPPORT
- printk("Found VPMADT032 module but it is not able to function in anything less than a version 2.6 kernel\n");
- printk("Please update your kernel to a 2.6 or later kernel to enable it\n");
+ printk(KERN_NOTICE "Found VPMADT032 module but it is not able to function in anything less than a version 2.6 kernel\n");
+ printk(KERN_NOTICE "Please update your kernel to a 2.6 or later kernel to enable it\n");
goto failed_exit;
#else
@@ -3394,7 +3395,7 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
#if defined(HOTPLUG_FIRMWARE)
if ((request_firmware(&firmware, vpmadt032_firmware, &pdev->dev) != 0) ||
!firmware) {
- printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
+ printk(KERN_NOTICE "VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
goto failed_exit;
}
#else
@@ -3409,7 +3410,7 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
while (test_bit(VPM150M_HPIRESET, &vpm150m->control))
schluffen(&wc->regq);
- printk("VPMADT032 Loading firwmare... ");
+ printk(KERN_INFO "VPMADT032 Loading firwmare... ");
downloadstatus = gpakDownloadDsp(vpm150m->dspid, &fw);
if (firmware != &embedded_firmware)
@@ -3435,9 +3436,9 @@ static enum vpmadt032_init_result wctdm_vpm150m_init(struct wctdm *wc)
if (!pingstatus) {
if (debug & DEBUG_ECHOCAN)
- printk("Version of DSP is %x\n", vpm150m->version);
+ printk(KERN_DEBUG "Version of DSP is %x\n", vpm150m->version);
} else {
- printk("VPMADT032 Failed! Unable to ping the DSP (%d)!\n", pingstatus);
+ printk(KERN_NOTICE "VPMADT032 Failed! Unable to ping the DSP (%d)!\n", pingstatus);
goto failed_exit;
}
@@ -3465,7 +3466,7 @@ static void wctdm_vpm_set_dtmf_threshold(struct wctdm *wc, unsigned int threshol
wctdm_vpm_out(wc, x, 0xC4, (threshold >> 8) & 0xFF);
wctdm_vpm_out(wc, x, 0xC5, (threshold & 0xFF));
}
- printk("VPM: DTMF threshold set to %d\n", threshold);
+ printk(KERN_INFO "VPM: DTMF threshold set to %d\n", threshold);
}
static void wctdm_vpm_init(struct wctdm *wc)
@@ -3477,7 +3478,7 @@ static void wctdm_vpm_init(struct wctdm *wc)
unsigned int i, x, y;
if (!vpmsupport) {
- printk("VPM: Support Disabled\n");
+ printk(KERN_INFO "VPM: Support Disabled\n");
wc->vpm = 0;
return;
}
@@ -3485,16 +3486,16 @@ static void wctdm_vpm_init(struct wctdm *wc)
for (x=0;x<NUM_EC;x++) {
ver = wctdm_vpm_in(wc, x, 0x1a0); /* revision */
if (debug & DEBUG_ECHOCAN)
- printk("VPM100: Chip %d: ver %02x\n", x, ver);
+ printk(KERN_DEBUG "VPM100: Chip %d: ver %02x\n", x, ver);
if (ver != 0x33) {
- printk("VPM100: %s\n", x ? "Inoperable" : "Not Present");
+ printk(KERN_DEBUG "VPM100: %s\n", x ? "Inoperable" : "Not Present");
wc->vpm = 0;
return;
}
if (!x) {
vpmver = wctdm_vpm_in(wc, x, 0x1a6) & 0xf;
- printk("VPM Revision: %02x\n", vpmver);
+ printk(KERN_INFO "VPM Revision: %02x\n", vpmver);
}
@@ -3535,11 +3536,11 @@ static void wctdm_vpm_init(struct wctdm *wc)
reg &= 0xE0;
if (alawoverride) {
if (!x)
- printk("VPM: A-law mode\n");
+ printk(KERN_INFO "VPM: A-law mode\n");
reg |= 0x01;
} else {
if (!x)
- printk("VPM: U-law mode\n");
+ printk(KERN_INFO "VPM: U-law mode\n");
reg &= ~0x01;
}
wctdm_vpm_out(wc,x,0x20,(reg | 0x20));
@@ -3588,7 +3589,7 @@ static void wctdm_vpm_init(struct wctdm *wc)
else
wc->vpm = 1;
- printk("Enabling VPM100 gain adjustments on any FXO ports found\n");
+ printk(KERN_INFO "Enabling VPM100 gain adjustments on any FXO ports found\n");
for (i = 0; i < wc->type; i++) {
if (wc->modtype[i] == MOD_TYPE_FXO) {
/* Apply negative Tx gain of 4.5db to DAA */
@@ -3652,10 +3653,10 @@ retry:
wc->cardflag |= (1 << x);
if (debug & DEBUG_CARD) {
readi = wctdm_getreg(wc,x,LOOP_I_LIMIT);
- printk("Proslic module %d loop current is %dmA\n",x,
+ printk(KERN_DEBUG "Proslic module %d loop current is %dmA\n",x,
((readi*3)+20));
}
- printk("Port %d: Installed -- AUTO FXS/DPO\n", x + 1);
+ printk(KERN_INFO "Port %d: Installed -- AUTO FXS/DPO\n", x + 1);
} else {
if(ret!=-2) {
sane=1;
@@ -3664,20 +3665,20 @@ retry:
wc->cardflag |= (1 << x);
if (debug & DEBUG_CARD) {
readi = wctdm_getreg(wc,x,LOOP_I_LIMIT);
- printk("Proslic module %d loop current is %dmA\n",x,
+ printk(KERN_DEBUG "Proslic module %d loop current is %dmA\n",x,
((readi*3)+20));
}
- printk("Port %d: Installed -- MANUAL FXS\n",x + 1);
+ printk(KERN_INFO "Port %d: Installed -- MANUAL FXS\n",x + 1);
} else {
- printk("Port %d: FAILED FXS (%s)\n", x + 1, fxshonormode ? fxo_modes[_opermode].name : "FCC");
+ printk(KERN_NOTICE "Port %d: FAILED FXS (%s)\n", x + 1, fxshonormode ? fxo_modes[_opermode].name : "FCC");
wc->chans[x]->sigcap = DAHDI_SIG_BROKEN | __DAHDI_SIG_FXO;
}
} else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) {
wc->cardflag |= (1 << x);
- printk("Port %d: Installed -- AUTO FXO (%s mode)\n",x + 1, fxo_modes[_opermode].name);
+ printk(KERN_INFO "Port %d: Installed -- AUTO FXO (%s mode)\n",x + 1, fxo_modes[_opermode].name);
} else if (!wctdm_init_qrvdri(wc,x)) {
wc->cardflag |= 1 << x;
- printk("Port %d: Installed -- QRV DRI card\n",x + 1);
+ printk(KERN_INFO "Port %d: Installed -- QRV DRI card\n",x + 1);
} else {
if ((wc->type != 24) && ((x & 0x3) == 1) && !wc->altcs[x]) {
spin_lock_irqsave(&wc->reglock, flags);
@@ -3695,10 +3696,10 @@ retry:
wc->modtype[x] = MOD_TYPE_FXS;
spin_unlock_irqrestore(&wc->reglock, flags);
if (debug & DEBUG_CARD)
- printk("Trying port %d with alternate chip select\n", x + 1);
+ printk(KERN_DEBUG "Trying port %d with alternate chip select\n", x + 1);
goto retry;
} else {
- printk("Port %d: Not installed\n", x + 1);
+ printk(KERN_NOTICE "Port %d: Not installed\n", x + 1);
wc->modtype[x] = MOD_TYPE_NONE;
wc->cardflag |= (1 << x);
}
@@ -3708,7 +3709,7 @@ retry:
#ifdef VPM_SUPPORT
wctdm_vpm_init(wc);
if (wc->vpm) {
- printk("VPM: Present and operational (Rev %c)\n", 'A' + wc->vpm - 1);
+ printk(KERN_INFO "VPM: Present and operational (Rev %c)\n", 'A' + wc->vpm - 1);
wc->ctlreg |= 0x10;
} else {
enum vpmadt032_init_result res;
@@ -3723,7 +3724,7 @@ retry:
}
switch (res) {
case VPMADT032_SUCCESS:
- printk("VPMADT032: Present and operational (Firmware version %x)\n", wc->vpm150m->version);
+ printk(KERN_INFO "VPMADT032: Present and operational (Firmware version %x)\n", wc->vpm150m->version);
wc->ctlreg |= 0x10;
break;
case VPMADT032_DISABLED:
@@ -3853,13 +3854,13 @@ retry:
/* We should be ready for DAHDI to come in now. */
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;
}
wc->initialized = 1;
- printk("Found a Wildcard TDM: %s (%d modules)\n", wc->variety, wc->type);
+ printk(KERN_INFO "Found a Wildcard TDM: %s (%d modules)\n", wc->variety, wc->type);
ret = 0;
return ret;
@@ -3919,7 +3920,7 @@ static void __devexit wctdm_remove_one(struct pci_dev *pdev)
/* Release span, possibly delayed */
if (!wc->usecount) {
wctdm_release(wc);
- printk("Freed a Wildcard\n");
+ printk(KERN_INFO "Freed a Wildcard\n");
}
else
wc->dead = 1;
@@ -3959,10 +3960,10 @@ static int __init wctdm_init(void)
if (x < sizeof(fxo_modes) / sizeof(fxo_modes[0])) {
_opermode = x;
} else {
- printk("Invalid/unknown operating mode '%s' specified. Please choose one of:\n", opermode);
+ printk(KERN_NOTICE "Invalid/unknown operating mode '%s' specified. Please choose one of:\n", opermode);
for (x = 0; x < sizeof(fxo_modes) / sizeof(fxo_modes[0]); x++)
- printk(" %s\n", fxo_modes[x].name);
- printk("Note this option is CASE SENSITIVE!\n");
+ printk(KERN_NOTICE " %s\n", fxo_modes[x].name);
+ printk(KERN_NOTICE "Note this option is CASE SENSITIVE!\n");
return -ENODEV;
}
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;
}
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index ab16e0d..51e7be7 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -194,7 +194,7 @@ static inline void cmd_decipher(struct t1 *wc, volatile unsigned char *readchunk
if (ident == wc->rxident) {
/* Store result */
wc->cmdq.cmds[x].data |= readchunk[CMD_BYTE(cs_slot,2,is_vpm)];
- /*printk("answer in rxident=%d cs_slot=%d is %d CMD_BYTE=%d jiffies=%d\n", ident, cs_slot, last_read_command, CMD_BYTE(cs_slot, 2), jiffies); */
+ /*printk(KERN_INFO "answer in rxident=%d cs_slot=%d is %d CMD_BYTE=%d jiffies=%d\n", ident, cs_slot, last_read_command, CMD_BYTE(cs_slot, 2), jiffies); */
wc->cmdq.cmds[x].flags |= __CMD_FIN;
if (wc->cmdq.cmds[x].flags & (__CMD_WR | __CMD_LEDS))
/* clear out writes (and leds) since they need no ack */
@@ -458,7 +458,7 @@ static void t1_release(struct t1 *wc)
kfree(wc->chans[x]);
}
kfree(wc);
- printk("Freed a Wildcard TE12xP\n");
+ printk(KERN_INFO "Freed a Wildcard TE12xP\n");
}
static void t4_serial_setup(struct t1 *wc)
diff --git a/drivers/dahdi/wcte12xp/vpmadt032.c b/drivers/dahdi/wcte12xp/vpmadt032.c
index 9e63923..1abba90 100644
--- a/drivers/dahdi/wcte12xp/vpmadt032.c
+++ b/drivers/dahdi/wcte12xp/vpmadt032.c
@@ -88,7 +88,7 @@ inline void vpm150m_cmd_dequeue(struct t1 *wc, volatile unsigned char *writechun
}
if (curcmd) {
#if 0
- printk("Found command txident = %d, desc = 0x%x, addr = 0x%x, data = 0x%x\n", curcmd->txident, curcmd->desc, curcmd->addr, curcmd->data);
+ printk(KERN_DEBUG "Found command txident = %d, desc = 0x%x, addr = 0x%x, data = 0x%x\n", curcmd->txident, curcmd->desc, curcmd->addr, curcmd->data);
#endif
if (curcmd->flags & __VPM150M_RWPAGE) {
/* Set CTRL access to page*/
@@ -782,6 +782,7 @@ void t1_vpm150m_init(struct t1 *wc) {
set_bit(VPM150M_HPIRESET, &vpm150m->control);
msleep(2000);
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
@@ -790,10 +791,12 @@ void t1_vpm150m_init(struct t1 *wc) {
gpakWriteDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
gpakWriteDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
@@ -801,10 +804,12 @@ void t1_vpm150m_init(struct t1 *wc) {
msg[i] = 0xbeef;
gpakWriteDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
@@ -812,10 +817,12 @@ void t1_vpm150m_init(struct t1 *wc) {
msg[i] = 0x1111;
gpakWriteDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
@@ -823,10 +830,12 @@ void t1_vpm150m_init(struct t1 *wc) {
msg[i] = 0x2222;
gpakWriteDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
gpakReadDspMemory(vpm150m->dspid, 0x1000, TEST_SIZE, msg);
+ debug_printk(1, "");
for (i = 0; i< TEST_SIZE; i++)
printk("%x ", msg[i]);
printk("\n");
@@ -835,7 +844,7 @@ void t1_vpm150m_init(struct t1 *wc) {
#if defined(HOTPLUG_FIRMWARE)
if ((request_firmware(&firmware, vpmadt032_firmware, &pdev->dev) != 0) ||
!firmware) {
- printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
+ printk(KERN_NOTICE "VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
goto failed_exit;
}
#else
diff --git a/drivers/dahdi/wcte12xp/wcte12xp.h b/drivers/dahdi/wcte12xp/wcte12xp.h
index 93bda0d..79b0295 100644
--- a/drivers/dahdi/wcte12xp/wcte12xp.h
+++ b/drivers/dahdi/wcte12xp/wcte12xp.h
@@ -88,8 +88,8 @@
#define NOT_VPM -1
-#define module_printk(fmt, args...) printk("%s: " fmt, te12xp_driver.name, ## args)
-#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, te12xp_driver.name, __FUNCTION__, ## args)
+#define module_printk(fmt, args...) printk(KERN_INFO "%s: " fmt, te12xp_driver.name, ## args)
+#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, te12xp_driver.name, __FUNCTION__, ## args)
extern spinlock_t ifacelock;
struct command {
diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c
index 8110fa2..e6d4f99 100644
--- a/drivers/dahdi/xpp/card_fxs.c
+++ b/drivers/dahdi/xpp/card_fxs.c
@@ -1010,10 +1010,10 @@ static void detect_vmwi(xpd_t *xpd)
LINE_DBG(GENERAL, xpd, pos, "MSG:");
for(j = 0; j < DAHDI_CHUNKSIZE; j++) {
if(debug)
- printk(" %02X", writechunk[j]);
+ printk(KERN_DEBUG " %02X", writechunk[j]);
}
if(debug)
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
#endif
if(unlikely(mem_equal(writechunk, FSK_COMMON_PATTERN, DAHDI_CHUNKSIZE)))
@@ -1033,7 +1033,7 @@ static void detect_vmwi(xpd_t *xpd)
LINE_NOTICE(xpd, i, "MSG WAITING Unexpected:");
for(j = 0; j < DAHDI_CHUNKSIZE; j++) {
- printk(" %02X", writechunk[j]);
+ printk( " %02X", writechunk[j]);
}
printk("\n");
}
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index 2d36ea4..a20fd8a 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -803,23 +803,23 @@ int xpp_maint(struct dahdi_span *span, int cmd)
DBG(GENERAL, "span->mainttimer=%d\n", span->mainttimer);
switch(cmd) {
case DAHDI_MAINT_NONE:
- printk("XXX Turn off local and remote loops XXX\n");
+ printk(KERN_INFO "XXX Turn off local and remote loops XXX\n");
break;
case DAHDI_MAINT_LOCALLOOP:
- printk("XXX Turn on local loopback XXX\n");
+ printk(KERN_INFO "XXX Turn on local loopback XXX\n");
break;
case DAHDI_MAINT_REMOTELOOP:
- printk("XXX Turn on remote loopback XXX\n");
+ printk(KERN_INFO "XXX Turn on remote loopback XXX\n");
break;
case DAHDI_MAINT_LOOPUP:
- printk("XXX Send loopup code XXX\n");
+ printk(KERN_INFO "XXX Send loopup code XXX\n");
// CALL_XMETHOD(LOOPBACK_AX, xpd->xbus, xpd, loopback_data, ARRAY_SIZE(loopback_data));
break;
case DAHDI_MAINT_LOOPDOWN:
- printk("XXX Send loopdown code XXX\n");
+ printk(KERN_INFO "XXX Send loopdown code XXX\n");
break;
case DAHDI_MAINT_LOOPSTOP:
- printk("XXX Stop sending loop codes XXX\n");
+ printk(KERN_INFO "XXX Stop sending loop codes XXX\n");
break;
default:
ERR("XPP: Unknown maint command: %d\n", cmd);
diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c
index 72686e3..b0d5768 100644
--- a/drivers/dahdi/xpp/xproto.c
+++ b/drivers/dahdi/xpp/xproto.c
@@ -309,7 +309,7 @@ void dump_packet(const char *msg, const xpacket_t *packet, bool debug)
int i;
byte *p = (byte *)packet;
- printk(" BYTES: ");
+ printk(KERN_DEBUG " BYTES: ");
for(i = 0; i < XPACKET_LEN(packet); i++) {
static int limiter = 0;
@@ -325,11 +325,11 @@ void dump_packet(const char *msg, const xpacket_t *packet, bool debug)
break;
}
if (debug)
- printk("%02X ", p[i]);
+ printk(KERN_DEBUG "%02X ", p[i]);
}
}
#endif
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
void dump_reg_cmd(const char msg[], bool writing, xbus_t *xbus,