wct4xxp: Remove unused debugging code
Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10240 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
eae6c0d1e7
commit
ac09987a59
@ -513,11 +513,7 @@ static struct t4 *cards[MAX_T4_CARDS];
|
|||||||
#define MAX_DTMF_DET 16
|
#define MAX_DTMF_DET 16
|
||||||
|
|
||||||
#define HDLC_IMR0_MASK (FRMR_IMR0_RME | FRMR_IMR0_RPF)
|
#define HDLC_IMR0_MASK (FRMR_IMR0_RME | FRMR_IMR0_RPF)
|
||||||
#if 0
|
|
||||||
#define HDLC_IMR1_MASK (FRMR_IMR1_ALLS | FRMR_IMR1_XDU | FRMR_IMR1_XPR)
|
|
||||||
#else
|
|
||||||
#define HDLC_IMR1_MASK (FRMR_IMR1_XDU | FRMR_IMR1_XPR)
|
#define HDLC_IMR1_MASK (FRMR_IMR1_XDU | FRMR_IMR1_XPR)
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline unsigned int __t4_pci_in(struct t4 *wc, const unsigned int addr)
|
static inline unsigned int __t4_pci_in(struct t4 *wc, const unsigned int addr)
|
||||||
{
|
{
|
||||||
@ -788,17 +784,6 @@ static inline void __t4_vpm_out(struct t4 *wc, int unit, const unsigned int addr
|
|||||||
__t4_pci_out(wc, WC_LADDR, 0);
|
__t4_pci_out(wc, WC_LADDR, 0);
|
||||||
if (debug & DEBUG_REGS)
|
if (debug & DEBUG_REGS)
|
||||||
dev_notice(&wc->dev->dev, "Write complete\n");
|
dev_notice(&wc->dev->dev, "Write complete\n");
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
{ unsigned int tmp;
|
|
||||||
tmp = t4_vpm_in(wc, unit, addr);
|
|
||||||
if (tmp != value) {
|
|
||||||
dev_notice(&wc->dev->dev, "Expected %d from unit %d echo "
|
|
||||||
"register %d but got %d instead\n",
|
|
||||||
value, unit, addr, tmp);
|
|
||||||
} }
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __t4_oct_out(struct t4 *wc, unsigned int addr, unsigned int value)
|
static inline void __t4_oct_out(struct t4 *wc, unsigned int addr, unsigned int value)
|
||||||
@ -1147,16 +1132,6 @@ static void __set_clear(struct t4 *wc, int span)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void set_clear(struct t4 *wc, int span)
|
|
||||||
{
|
|
||||||
unsigned long flags;
|
|
||||||
spin_lock_irqsave(&wc->reglock, flags);
|
|
||||||
__set_clear(wc, span);
|
|
||||||
spin_unlock_irqrestore(&wc->reglock, flags);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int t4_dacs(struct dahdi_chan *dst, struct dahdi_chan *src)
|
static int t4_dacs(struct dahdi_chan *dst, struct dahdi_chan *src)
|
||||||
{
|
{
|
||||||
struct t4 *wc;
|
struct t4 *wc;
|
||||||
@ -1421,9 +1396,6 @@ static void inline t4_hdlc_xmit_fifo(struct t4 *wc, unsigned int span, struct t4
|
|||||||
dev_notice(&wc->dev->dev,
|
dev_notice(&wc->dev->dev,
|
||||||
"transmiting XHF|XME\n");
|
"transmiting XHF|XME\n");
|
||||||
t4_framer_cmd_wait(wc, span, FRMR_CMDR_XHF | FRMR_CMDR_XME);
|
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;
|
++ts->frames_out;
|
||||||
if ((debug & DEBUG_FRAMER) && !(ts->frames_out & 0x0f))
|
if ((debug & DEBUG_FRAMER) && !(ts->frames_out & 0x0f))
|
||||||
dev_notice(&wc->dev->dev, "Transmitted %d "
|
dev_notice(&wc->dev->dev, "Transmitted %d "
|
||||||
@ -1600,22 +1572,6 @@ static int t4_maint(struct dahdi_span *span, int cmd)
|
|||||||
break;
|
break;
|
||||||
case DAHDI_MAINT_PRBS:
|
case DAHDI_MAINT_PRBS:
|
||||||
dev_info(&wc->dev->dev, "PRBS not supported\n");
|
dev_info(&wc->dev->dev, "PRBS not supported\n");
|
||||||
#if 0
|
|
||||||
dev_notice(&wc->dev->dev, "Enabling PRBS!\n");
|
|
||||||
span->mainttimer = 1;
|
|
||||||
/* Enable PRBS monitor */
|
|
||||||
reg = t4_framer_in(wc, span->offset, LCR1_T);
|
|
||||||
reg |= EPRM;
|
|
||||||
|
|
||||||
/* Setup PRBS xmit */
|
|
||||||
t4_framer_out(wc, span->offset, TPC0_T, 0);
|
|
||||||
|
|
||||||
/* Enable PRBS transmit */
|
|
||||||
reg |= XPRBS;
|
|
||||||
reg &= ~LLBP;
|
|
||||||
reg &= ~FLLB;
|
|
||||||
t4_framer_out(wc, span->offset, LCR1_T, reg);
|
|
||||||
#endif
|
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
case DAHDI_RESET_COUNTERS:
|
case DAHDI_RESET_COUNTERS:
|
||||||
t4_reset_counters(span);
|
t4_reset_counters(span);
|
||||||
@ -2318,7 +2274,6 @@ static int __t4_findsync(struct t4 *wc)
|
|||||||
int newsyncnum = 0; /* wct4xxp card number */
|
int newsyncnum = 0; /* wct4xxp card number */
|
||||||
int newsyncspan = 0; /* span on given wct4xxp card */
|
int newsyncspan = 0; /* span on given wct4xxp card */
|
||||||
spin_lock_irqsave(&synclock, flags);
|
spin_lock_irqsave(&synclock, flags);
|
||||||
#if 1
|
|
||||||
if (!wc->num) {
|
if (!wc->num) {
|
||||||
/* If we're the first card, go through all the motions, up to 8 levels
|
/* If we're the first card, go through all the motions, up to 8 levels
|
||||||
of sync source */
|
of sync source */
|
||||||
@ -2364,7 +2319,6 @@ found:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
__t4_update_timing(wc);
|
__t4_update_timing(wc);
|
||||||
#endif
|
|
||||||
spin_unlock_irqrestore(&synclock, flags);
|
spin_unlock_irqrestore(&synclock, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2676,10 +2630,6 @@ static int t4_startup(struct file *file, struct dahdi_span *span)
|
|||||||
__t4_pci_out(wc, 5, (ms_per_irq << 16) | wc->numbufs);
|
__t4_pci_out(wc, 5, (ms_per_irq << 16) | wc->numbufs);
|
||||||
/* enable interrupts */
|
/* enable interrupts */
|
||||||
/* Start DMA, enabling DMA interrupts on read only */
|
/* Start DMA, enabling DMA interrupts on read only */
|
||||||
#if 0
|
|
||||||
/* Enable framer only interrupts */
|
|
||||||
wc->dmactrl |= 1 << 27;
|
|
||||||
#endif
|
|
||||||
wc->dmactrl |= (ts->spanflags & FLAG_2NDGEN) ? 0xc0000000 : 0xc0000003;
|
wc->dmactrl |= (ts->spanflags & FLAG_2NDGEN) ? 0xc0000000 : 0xc0000003;
|
||||||
#ifdef VPM_SUPPORT
|
#ifdef VPM_SUPPORT
|
||||||
wc->dmactrl |= wc->vpm;
|
wc->dmactrl |= wc->vpm;
|
||||||
@ -3478,16 +3428,8 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
|
|||||||
if (isr0 & FRMR_ISR0_RME) {
|
if (isr0 & FRMR_ISR0_RME) {
|
||||||
/* Do checks for HDLC problems */
|
/* Do checks for HDLC problems */
|
||||||
unsigned char rsis = readbuf[readsize-1];
|
unsigned char rsis = readbuf[readsize-1];
|
||||||
#if 0
|
|
||||||
unsigned int olddebug = debug;
|
|
||||||
#endif
|
|
||||||
unsigned char rsis_reg = t4_framer_in(wc, span, FRMR_RSIS);
|
unsigned char rsis_reg = t4_framer_in(wc, span, FRMR_RSIS);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if ((rsis != 0xA2) || (rsis != rsis_reg))
|
|
||||||
debug |= DEBUG_FRAMER;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
++ts->frames_in;
|
++ts->frames_in;
|
||||||
if ((debug & DEBUG_FRAMER) && !(ts->frames_in & 0x0f))
|
if ((debug & DEBUG_FRAMER) && !(ts->frames_in & 0x0f))
|
||||||
dev_notice(&wc->dev->dev, "Received %d frames "
|
dev_notice(&wc->dev->dev, "Received %d frames "
|
||||||
@ -3527,9 +3469,6 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span)
|
|||||||
"valid HDLC frame on span %d"
|
"valid HDLC frame on span %d"
|
||||||
"\n", span);
|
"\n", span);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
debug = olddebug;
|
|
||||||
#endif
|
|
||||||
} else if (isr0 & FRMR_ISR0_RPF)
|
} else if (isr0 & FRMR_ISR0_RPF)
|
||||||
dahdi_hdlc_putbuf(sigchan, readbuf, readsize);
|
dahdi_hdlc_putbuf(sigchan, readbuf, readsize);
|
||||||
}
|
}
|
||||||
@ -3567,11 +3506,6 @@ DAHDI_IRQ_HANDLER(t4_interrupt)
|
|||||||
unsigned int status;
|
unsigned int status;
|
||||||
unsigned int status2;
|
unsigned int status2;
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (wc->intcount < 20)
|
|
||||||
dev_notice(&wc->dev->dev, "Pre-interrupt\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Make sure it's really for us */
|
/* Make sure it's really for us */
|
||||||
status = __t4_pci_in(wc, WC_INTR);
|
status = __t4_pci_in(wc, WC_INTR);
|
||||||
|
|
||||||
@ -3596,28 +3530,12 @@ DAHDI_IRQ_HANDLER(t4_interrupt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wc->intcount++;
|
wc->intcount++;
|
||||||
#if 0
|
|
||||||
if (wc->intcount < 20)
|
|
||||||
dev_notice(&wc->dev->dev, "Got interrupt, status = %08x\n",
|
|
||||||
status);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (status & 0x3) {
|
if (status & 0x3) {
|
||||||
t4_receiveprep(wc, status);
|
t4_receiveprep(wc, status);
|
||||||
t4_transmitprep(wc, status);
|
t4_transmitprep(wc, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if ((wc->intcount < 10) || !(wc->intcount % 1000)) {
|
|
||||||
status2 = t4_framer_in(wc, 0, FRMR_CIS);
|
|
||||||
dev_notice(&wc->dev->dev, "Status2: %04x\n", status2);
|
|
||||||
for (x = 0;x<wc->numspans;x++) {
|
|
||||||
status2 = t4_framer_in(wc, x, FRMR_FRS0);
|
|
||||||
dev_notice(&wc->dev->dev, "FRS0/%d: %04x\n", x,
|
|
||||||
status2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
t4_do_counters(wc);
|
t4_do_counters(wc);
|
||||||
|
|
||||||
x = wc->intcount & 15 /* 63 */;
|
x = wc->intcount & 15 /* 63 */;
|
||||||
@ -3773,12 +3691,6 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
|
|||||||
unsigned int status;
|
unsigned int status;
|
||||||
unsigned char rxident, expected;
|
unsigned char rxident, expected;
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (unlikely(test_bit(T4_CHANGE_LATENCY, &wc->checkflag))) {
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Check this first in case we get a spurious interrupt */
|
/* Check this first in case we get a spurious interrupt */
|
||||||
if (unlikely(test_bit(T4_STOP_DMA, &wc->checkflag))) {
|
if (unlikely(test_bit(T4_STOP_DMA, &wc->checkflag))) {
|
||||||
/* Stop DMA cleanly if requested */
|
/* Stop DMA cleanly if requested */
|
||||||
@ -3900,24 +3812,12 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
|
|||||||
|
|
||||||
if (wc->devtype->flags & FLAG_5THGEN) {
|
if (wc->devtype->flags & FLAG_5THGEN) {
|
||||||
unsigned int current_index = (reg5 >> 8) & 0x7f;
|
unsigned int current_index = (reg5 >> 8) & 0x7f;
|
||||||
#if 0
|
|
||||||
int catchup = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (((wc->lastindex + 1) % wc->numbufs) != current_index) {
|
while (((wc->lastindex + 1) % wc->numbufs) != current_index) {
|
||||||
#if 0
|
|
||||||
catchup++;
|
|
||||||
#endif
|
|
||||||
wc->lastindex = (wc->lastindex + 1) % wc->numbufs;
|
wc->lastindex = (wc->lastindex + 1) % wc->numbufs;
|
||||||
setup_chunks(wc, wc->lastindex);
|
setup_chunks(wc, wc->lastindex);
|
||||||
t4_prep_gen2(wc);
|
t4_prep_gen2(wc);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
if (catchup > 1) {
|
|
||||||
dev_info(&wc->dev->dev, "Caught up %d "
|
|
||||||
"chunks\n", catchup);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
t4_prep_gen2(wc);
|
t4_prep_gen2(wc);
|
||||||
}
|
}
|
||||||
@ -4635,11 +4535,6 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
|
|||||||
wc->membase = pci_iomap(pdev, 0, 0);
|
wc->membase = pci_iomap(pdev, 0, 0);
|
||||||
/* This rids of the Double missed interrupt message after loading */
|
/* This rids of the Double missed interrupt message after loading */
|
||||||
wc->last0 = 1;
|
wc->last0 = 1;
|
||||||
#if 0
|
|
||||||
if (!request_mem_region(wc->memaddr, wc->memlen, wc->variety))
|
|
||||||
dev_info(&wc->dev->dev, "wct4: Unable to request memory "
|
|
||||||
"region :(, using anyway...\n");
|
|
||||||
#endif
|
|
||||||
if (pci_request_regions(pdev, wc->devtype->desc))
|
if (pci_request_regions(pdev, wc->devtype->desc))
|
||||||
dev_info(&pdev->dev, "wct%dxxp: Unable to request regions\n",
|
dev_info(&pdev->dev, "wct%dxxp: Unable to request regions\n",
|
||||||
wc->numspans);
|
wc->numspans);
|
||||||
@ -4795,19 +4690,6 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i
|
|||||||
|
|
||||||
create_sysfs_files(wc);
|
create_sysfs_files(wc);
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (x=0;x<0x10000;x++) {
|
|
||||||
__t4_raw_oct_out(wc, 0x0004, x);
|
|
||||||
__t4_raw_oct_out(wc, 0x000a, x ^ 0xffff);
|
|
||||||
if (__t4_raw_oct_in(wc, 0x0004) != x)
|
|
||||||
dev_notice(&wc->dev->dev, "Register 4 failed %04x\n",
|
|
||||||
x);
|
|
||||||
if (__t4_raw_oct_in(wc, 0x000a) != (x ^ 0xffff))
|
|
||||||
dev_notice(&wc->dev->dev, "Register 10 failed %04x\n",
|
|
||||||
x);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
res = 0;
|
res = 0;
|
||||||
if (ignore_rotary)
|
if (ignore_rotary)
|
||||||
res = t4_launch(wc);
|
res = t4_launch(wc);
|
||||||
|
Loading…
Reference in New Issue
Block a user