From 59fce3f780a759de7286ec399d4c1d75143f7f33 Mon Sep 17 00:00:00 2001 From: Russ Meyerriecks Date: Mon, 8 Mar 2010 23:22:54 +0000 Subject: wct4xxp, wcte12xp: Fixed broken E1 and unsupported function bugs * Fixed the bug where the card could not be brought out of local loopback in E1 mode. * Fixed a bunch of issues where the drivers didn't report unsupported maintenance functions correctly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8291 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 1 + drivers/dahdi/wct4xxp/base.c | 7 ++++--- drivers/dahdi/wcte12xp/base.c | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 673b84e..601aa59 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -4545,6 +4545,7 @@ static int dahdi_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long da module_printk(KERN_NOTICE, "Unknown maintenance event: %d\n", maint.command); + return -ENOSYS; } dahdi_alarm_notify(spans[maint.spanno]); /* process alarm-related events */ spin_unlock_irqrestore(&spans[maint.spanno]->lock, flags); diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 2109b34..33ce3f5 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -1437,6 +1437,7 @@ static int t4_maint(struct dahdi_span *span, int cmd) switch(cmd) { case DAHDI_MAINT_NONE: dev_info(&wc->dev->dev, "Clearing all maint modes\n"); + t4_clear_maint(span); break; case DAHDI_MAINT_LOCALLOOP: dev_info(&wc->dev->dev, @@ -1451,11 +1452,11 @@ static int t4_maint(struct dahdi_span *span, int cmd) case DAHDI_MAINT_LOOPSTOP: dev_info(&wc->dev->dev, "Only local loop supported in E1 mode\n"); - break; + return -ENOSYS; default: dev_info(&wc->dev->dev, "Unknown E1 maint command: %d\n", cmd); - break; + return -ENOSYS; } } else { switch(cmd) { @@ -1535,7 +1536,7 @@ static int t4_maint(struct dahdi_span *span, int cmd) reg &= ~FLLB; t4_framer_out(wc, span->offset, LCR1_T, reg); #endif - break; + return -ENOSYS; case DAHDI_RESET_COUNTERS: t4_reset_counters(span); break; diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index b7f8dc8..3ac2727 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -1111,6 +1111,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd) switch (cmd) { case DAHDI_MAINT_NONE: t1_info(wc, "Clearing all maint modes\n"); + t1xxp_clear_maint(span); break; case DAHDI_MAINT_LOCALLOOP: t1xxp_clear_maint(span); @@ -1122,10 +1123,10 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd) case DAHDI_MAINT_LOOPDOWN: case DAHDI_MAINT_LOOPSTOP: t1_info(wc, "Only local loop supported in E1 mode\n"); - break; + return -ENOSYS; default: t1_info(wc, "Unknown E1 maint command: %d\n", cmd); - break; + return -ENOSYS; } } else { switch (cmd) { @@ -1161,7 +1162,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd) break; default: t1_info(wc, "Unknown T1 maint command: %d\n", cmd); - break; + return -ENOSYS; } } -- cgit v1.2.3