aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/mISDN/hfc_multi.h1
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c32
2 files changed, 32 insertions, 1 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfc_multi.h b/drivers/isdn/hardware/mISDN/hfc_multi.h
index 663b77f578be..5765e1962911 100644
--- a/drivers/isdn/hardware/mISDN/hfc_multi.h
+++ b/drivers/isdn/hardware/mISDN/hfc_multi.h
@@ -62,6 +62,7 @@ struct hfcm_hw {
62 u_char r_sci_msk; 62 u_char r_sci_msk;
63 u_char r_tx0, r_tx1; 63 u_char r_tx0, r_tx1;
64 u_char a_st_ctrl0[8]; 64 u_char a_st_ctrl0[8];
65 u_char r_bert_wd_md;
65 timer_t timer; 66 timer_t timer;
66}; 67};
67 68
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 0b28141e43bf..ca153de6954e 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -4013,11 +4013,41 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch,
4013static int 4013static int
4014channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq) 4014channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
4015{ 4015{
4016 struct hfc_multi *hc = dch->hw;
4016 int ret = 0; 4017 int ret = 0;
4018 int wd_mode, wd_cnt;
4017 4019
4018 switch (cq->op) { 4020 switch (cq->op) {
4019 case MISDN_CTRL_GETOP: 4021 case MISDN_CTRL_GETOP:
4020 cq->op = 0; 4022 cq->op = MISDN_CTRL_HFC_OP;
4023 break;
4024 case MISDN_CTRL_HFC_WD_INIT: /* init the watchdog */
4025 wd_cnt = cq->p1 & 0xf;
4026 wd_mode = !!(cq->p1 >> 4);
4027 if (debug & DEBUG_HFCMULTI_MSG)
4028 printk(KERN_DEBUG
4029 "%s: MISDN_CTRL_HFC_WD_INIT mode %s counter 0x%x\n",
4030 __func__, wd_mode ? "AUTO" : "MANUAL", wd_cnt);
4031 /* set the watchdog timer */
4032 HFC_outb(hc, R_TI_WD, poll_timer | (wd_cnt << 4));
4033 hc->hw.r_bert_wd_md = (wd_mode ? V_AUTO_WD_RES : 0);
4034 if (hc->ctype == HFC_TYPE_XHFC)
4035 hc->hw.r_bert_wd_md |= 0x40 /* V_WD_EN */;
4036 /* init the watchdog register and reset the counter */
4037 HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
4038 if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
4039 /* enable the watchdog output for Speech-Design */
4040 HFC_outb(hc, R_GPIO_SEL, V_GPIO_SEL7);
4041 HFC_outb(hc, R_GPIO_EN1, V_GPIO_EN15);
4042 HFC_outb(hc, R_GPIO_OUT1, 0);
4043 HFC_outb(hc, R_GPIO_OUT1, V_GPIO_OUT15);
4044 }
4045 break;
4046 case MISDN_CTRL_HFC_WD_RESET: /* reset the watchdog counter */
4047 if (debug & DEBUG_HFCMULTI_MSG)
4048 printk(KERN_DEBUG "%s: MISDN_CTRL_HFC_WD_RESET\n",
4049 __func__);
4050 HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
4021 break; 4051 break;
4022 default: 4052 default:
4023 printk(KERN_WARNING "%s: unknown Op %x\n", 4053 printk(KERN_WARNING "%s: unknown Op %x\n",