diff options
author | Karsten Keil <isdn@linux-pingi.de> | 2012-05-04 08:15:33 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-04 19:55:05 +0400 |
commit | c626c127279b265ab293348763e043864d58d42c (patch) | |
tree | 476fa67d42bff3a1a27d97818fa66d16bf501a88 /drivers/isdn/hardware/mISDN/mISDNipac.c | |
parent | 8423e6b212a19d5f02232855dec73196297b5ee9 (diff) | |
download | linux-c626c127279b265ab293348763e043864d58d42c.tar.xz |
mISDN: Make layer1 timer 3 value configurable
For certification test it is very useful to change the layer1
timer3 value on runtime.
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/mISDNipac.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/mISDNipac.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index 884369f09cad..92d4a78bc0a5 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c @@ -603,10 +603,11 @@ isac_l1hw(struct mISDNchannel *ch, struct sk_buff *skb) } static int -isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para) +isac_ctrl(struct isac_hw *isac, u32 cmd, unsigned long para) { u8 tl = 0; - u_long flags; + unsigned long flags; + int ret = 0; switch (cmd) { case HW_TESTLOOP: @@ -626,12 +627,15 @@ isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para) } spin_unlock_irqrestore(isac->hwlock, flags); break; + case HW_TIMER3_VALUE: + ret = l1_event(isac->dch.l1, HW_TIMER3_VALUE | (para & 0xff)); + break; default: pr_debug("%s: %s unknown command %x %lx\n", isac->name, __func__, cmd, para); - return -1; + ret = -1; } - return 0; + return ret; } static int @@ -1526,7 +1530,7 @@ channel_ctrl(struct ipac_hw *ipac, struct mISDN_ctrl_req *cq) switch (cq->op) { case MISDN_CTRL_GETOP: - cq->op = MISDN_CTRL_LOOP; + cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3; break; case MISDN_CTRL_LOOP: /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */ @@ -1536,6 +1540,9 @@ channel_ctrl(struct ipac_hw *ipac, struct mISDN_ctrl_req *cq) } ret = ipac->ctrl(ipac, HW_TESTLOOP, cq->channel); break; + case MISDN_CTRL_L1_TIMER3: + ret = ipac->isac.ctrl(&ipac->isac, HW_TIMER3_VALUE, cq->p1); + break; default: pr_info("%s: unknown CTRL OP %x\n", ipac->name, cq->op); ret = -EINVAL; |