aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/mISDN/mISDNipac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware/mISDN/mISDNipac.c')
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNipac.c17
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)
603} 603}
604 604
605static int 605static int
606isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para) 606isac_ctrl(struct isac_hw *isac, u32 cmd, unsigned long para)
607{ 607{
608 u8 tl = 0; 608 u8 tl = 0;
609 u_long flags; 609 unsigned long flags;
610 int ret = 0;
610 611
611 switch (cmd) { 612 switch (cmd) {
612 case HW_TESTLOOP: 613 case HW_TESTLOOP:
@@ -626,12 +627,15 @@ isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para)
626 } 627 }
627 spin_unlock_irqrestore(isac->hwlock, flags); 628 spin_unlock_irqrestore(isac->hwlock, flags);
628 break; 629 break;
630 case HW_TIMER3_VALUE:
631 ret = l1_event(isac->dch.l1, HW_TIMER3_VALUE | (para & 0xff));
632 break;
629 default: 633 default:
630 pr_debug("%s: %s unknown command %x %lx\n", isac->name, 634 pr_debug("%s: %s unknown command %x %lx\n", isac->name,
631 __func__, cmd, para); 635 __func__, cmd, para);
632 return -1; 636 ret = -1;
633 } 637 }
634 return 0; 638 return ret;
635} 639}
636 640
637static int 641static int
@@ -1526,7 +1530,7 @@ channel_ctrl(struct ipac_hw *ipac, struct mISDN_ctrl_req *cq)
1526 1530
1527 switch (cq->op) { 1531 switch (cq->op) {
1528 case MISDN_CTRL_GETOP: 1532 case MISDN_CTRL_GETOP:
1529 cq->op = MISDN_CTRL_LOOP; 1533 cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
1530 break; 1534 break;
1531 case MISDN_CTRL_LOOP: 1535 case MISDN_CTRL_LOOP:
1532 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */ 1536 /* 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)
1536 } 1540 }
1537 ret = ipac->ctrl(ipac, HW_TESTLOOP, cq->channel); 1541 ret = ipac->ctrl(ipac, HW_TESTLOOP, cq->channel);
1538 break; 1542 break;
1543 case MISDN_CTRL_L1_TIMER3:
1544 ret = ipac->isac.ctrl(&ipac->isac, HW_TIMER3_VALUE, cq->p1);
1545 break;
1539 default: 1546 default:
1540 pr_info("%s: unknown CTRL OP %x\n", ipac->name, cq->op); 1547 pr_info("%s: unknown CTRL OP %x\n", ipac->name, cq->op);
1541 ret = -EINVAL; 1548 ret = -EINVAL;