aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorKarsten Keil <isdn@linux-pingi.de>2012-05-04 00:15:33 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-04 11:55:05 -0400
commitc626c127279b265ab293348763e043864d58d42c (patch)
tree476fa67d42bff3a1a27d97818fa66d16bf501a88 /drivers/isdn/hardware
parent8423e6b212a19d5f02232855dec73196297b5ee9 (diff)
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')
-rw-r--r--drivers/isdn/hardware/mISDN/avmfritz.c5
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c5
-rw-r--r--drivers/isdn/hardware/mISDN/hfcpci.c5
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNipac.c17
-rw-r--r--drivers/isdn/hardware/mISDN/netjet.c5
-rw-r--r--drivers/isdn/hardware/mISDN/speedfax.c5
-rw-r--r--drivers/isdn/hardware/mISDN/w6692.c5
7 files changed, 36 insertions, 11 deletions
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
index c0b8c960ee3f..6bf2c58795a3 100644
--- a/drivers/isdn/hardware/mISDN/avmfritz.c
+++ b/drivers/isdn/hardware/mISDN/avmfritz.c
@@ -868,7 +868,7 @@ channel_ctrl(struct fritzcard *fc, struct mISDN_ctrl_req *cq)
868 868
869 switch (cq->op) { 869 switch (cq->op) {
870 case MISDN_CTRL_GETOP: 870 case MISDN_CTRL_GETOP:
871 cq->op = MISDN_CTRL_LOOP; 871 cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
872 break; 872 break;
873 case MISDN_CTRL_LOOP: 873 case MISDN_CTRL_LOOP:
874 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */ 874 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -878,6 +878,9 @@ channel_ctrl(struct fritzcard *fc, struct mISDN_ctrl_req *cq)
878 } 878 }
879 ret = fc->isac.ctrl(&fc->isac, HW_TESTLOOP, cq->channel); 879 ret = fc->isac.ctrl(&fc->isac, HW_TESTLOOP, cq->channel);
880 break; 880 break;
881 case MISDN_CTRL_L1_TIMER3:
882 ret = fc->isac.ctrl(&fc->isac, HW_TIMER3_VALUE, cq->p1);
883 break;
881 default: 884 default:
882 pr_info("%s: %s unknown Op %x\n", fc->name, __func__, cq->op); 885 pr_info("%s: %s unknown Op %x\n", fc->name, __func__, cq->op);
883 ret = -EINVAL; 886 ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 43013316b9b0..4c128e4bb5cf 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -4161,7 +4161,7 @@ channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
4161 4161
4162 switch (cq->op) { 4162 switch (cq->op) {
4163 case MISDN_CTRL_GETOP: 4163 case MISDN_CTRL_GETOP:
4164 cq->op = MISDN_CTRL_HFC_OP; 4164 cq->op = MISDN_CTRL_HFC_OP | MISDN_CTRL_L1_TIMER3;
4165 break; 4165 break;
4166 case MISDN_CTRL_HFC_WD_INIT: /* init the watchdog */ 4166 case MISDN_CTRL_HFC_WD_INIT: /* init the watchdog */
4167 wd_cnt = cq->p1 & 0xf; 4167 wd_cnt = cq->p1 & 0xf;
@@ -4191,6 +4191,9 @@ channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
4191 __func__); 4191 __func__);
4192 HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES); 4192 HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
4193 break; 4193 break;
4194 case MISDN_CTRL_L1_TIMER3:
4195 ret = l1_event(dch->l1, HW_TIMER3_VALUE | (cq->p1 & 0xff));
4196 break;
4194 default: 4197 default:
4195 printk(KERN_WARNING "%s: unknown Op %x\n", 4198 printk(KERN_WARNING "%s: unknown Op %x\n",
4196 __func__, cq->op); 4199 __func__, cq->op);
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index e2c83a2d7691..5fe993e2dee9 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -1819,7 +1819,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
1819 switch (cq->op) { 1819 switch (cq->op) {
1820 case MISDN_CTRL_GETOP: 1820 case MISDN_CTRL_GETOP:
1821 cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_CONNECT | 1821 cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_CONNECT |
1822 MISDN_CTRL_DISCONNECT; 1822 MISDN_CTRL_DISCONNECT | MISDN_CTRL_L1_TIMER3;
1823 break; 1823 break;
1824 case MISDN_CTRL_LOOP: 1824 case MISDN_CTRL_LOOP:
1825 /* channel 0 disabled loop */ 1825 /* channel 0 disabled loop */
@@ -1896,6 +1896,9 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
1896 Write_hfc(hc, HFCPCI_CONNECT, hc->hw.conn); 1896 Write_hfc(hc, HFCPCI_CONNECT, hc->hw.conn);
1897 hc->hw.trm &= 0x7f; /* disable IOM-loop */ 1897 hc->hw.trm &= 0x7f; /* disable IOM-loop */
1898 break; 1898 break;
1899 case MISDN_CTRL_L1_TIMER3:
1900 ret = l1_event(hc->dch.l1, HW_TIMER3_VALUE | (cq->p1 & 0xff));
1901 break;
1899 default: 1902 default:
1900 printk(KERN_WARNING "%s: unknown Op %x\n", 1903 printk(KERN_WARNING "%s: unknown Op %x\n",
1901 __func__, cq->op); 1904 __func__, cq->op);
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;
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index c726e09d0981..27998d7188a5 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -837,7 +837,7 @@ channel_ctrl(struct tiger_hw *card, struct mISDN_ctrl_req *cq)
837 837
838 switch (cq->op) { 838 switch (cq->op) {
839 case MISDN_CTRL_GETOP: 839 case MISDN_CTRL_GETOP:
840 cq->op = MISDN_CTRL_LOOP; 840 cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
841 break; 841 break;
842 case MISDN_CTRL_LOOP: 842 case MISDN_CTRL_LOOP:
843 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */ 843 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -847,6 +847,9 @@ channel_ctrl(struct tiger_hw *card, struct mISDN_ctrl_req *cq)
847 } 847 }
848 ret = card->isac.ctrl(&card->isac, HW_TESTLOOP, cq->channel); 848 ret = card->isac.ctrl(&card->isac, HW_TESTLOOP, cq->channel);
849 break; 849 break;
850 case MISDN_CTRL_L1_TIMER3:
851 ret = card->isac.ctrl(&card->isac, HW_TIMER3_VALUE, cq->p1);
852 break;
850 default: 853 default:
851 pr_info("%s: %s unknown Op %x\n", card->name, __func__, cq->op); 854 pr_info("%s: %s unknown Op %x\n", card->name, __func__, cq->op);
852 ret = -EINVAL; 855 ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c
index 04689935148b..93f344d74e54 100644
--- a/drivers/isdn/hardware/mISDN/speedfax.c
+++ b/drivers/isdn/hardware/mISDN/speedfax.c
@@ -224,7 +224,7 @@ channel_ctrl(struct sfax_hw *sf, struct mISDN_ctrl_req *cq)
224 224
225 switch (cq->op) { 225 switch (cq->op) {
226 case MISDN_CTRL_GETOP: 226 case MISDN_CTRL_GETOP:
227 cq->op = MISDN_CTRL_LOOP; 227 cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_L1_TIMER3;
228 break; 228 break;
229 case MISDN_CTRL_LOOP: 229 case MISDN_CTRL_LOOP:
230 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */ 230 /* cq->channel: 0 disable, 1 B1 loop 2 B2 loop, 3 both */
@@ -234,6 +234,9 @@ channel_ctrl(struct sfax_hw *sf, struct mISDN_ctrl_req *cq)
234 } 234 }
235 ret = sf->isac.ctrl(&sf->isac, HW_TESTLOOP, cq->channel); 235 ret = sf->isac.ctrl(&sf->isac, HW_TESTLOOP, cq->channel);
236 break; 236 break;
237 case MISDN_CTRL_L1_TIMER3:
238 ret = sf->isac.ctrl(&sf->isac, HW_TIMER3_VALUE, cq->p1);
239 break;
237 default: 240 default:
238 pr_info("%s: unknown Op %x\n", sf->name, cq->op); 241 pr_info("%s: unknown Op %x\n", sf->name, cq->op);
239 ret = -EINVAL; 242 ret = -EINVAL;
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index 2183357f0799..1d044670ff66 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -1035,7 +1035,10 @@ channel_ctrl(struct w6692_hw *card, struct mISDN_ctrl_req *cq)
1035 1035
1036 switch (cq->op) { 1036 switch (cq->op) {
1037 case MISDN_CTRL_GETOP: 1037 case MISDN_CTRL_GETOP:
1038 cq->op = 0; 1038 cq->op = MISDN_CTRL_L1_TIMER3;
1039 break;
1040 case MISDN_CTRL_L1_TIMER3:
1041 ret = l1_event(card->dch.l1, HW_TIMER3_VALUE | (cq->p1 & 0xff));
1039 break; 1042 break;
1040 default: 1043 default:
1041 pr_info("%s: unknown CTRL OP %x\n", card->name, cq->op); 1044 pr_info("%s: unknown CTRL OP %x\n", card->name, cq->op);