Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150463
b: refs/heads/master
c: 7df3bb8
h: refs/heads/master
i:
  150461: b0367a1
  150459: 7955cb0
  150455: 41613cb
  150447: 2e54210
  150431: 9ab152f
  150399: 18e263d
v: v3
  • Loading branch information
Andreas Eversberg authored and David S. Miller committed May 25, 2009
1 parent 39a06d4 commit 695dc2c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bcb97cace615a9f57fca0b9d788e7d234d7fc95
refs/heads/master: 7df3bb8f59ca8e346bb834006c257cc367c6250a
1 change: 1 addition & 0 deletions trunk/drivers/isdn/hardware/mISDN/hfc_multi.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct hfcm_hw {
u_char r_sci_msk;
u_char r_tx0, r_tx1;
u_char a_st_ctrl0[8];
u_char r_bert_wd_md;
timer_t timer;
};

Expand Down
32 changes: 31 additions & 1 deletion trunk/drivers/isdn/hardware/mISDN/hfcmulti.c
Original file line number Diff line number Diff line change
Expand Up @@ -4013,11 +4013,41 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch,
static int
channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
{
struct hfc_multi *hc = dch->hw;
int ret = 0;
int wd_mode, wd_cnt;

switch (cq->op) {
case MISDN_CTRL_GETOP:
cq->op = 0;
cq->op = MISDN_CTRL_HFC_OP;
break;
case MISDN_CTRL_HFC_WD_INIT: /* init the watchdog */
wd_cnt = cq->p1 & 0xf;
wd_mode = !!(cq->p1 >> 4);
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
"%s: MISDN_CTRL_HFC_WD_INIT mode %s counter 0x%x\n",
__func__, wd_mode ? "AUTO" : "MANUAL", wd_cnt);
/* set the watchdog timer */
HFC_outb(hc, R_TI_WD, poll_timer | (wd_cnt << 4));
hc->hw.r_bert_wd_md = (wd_mode ? V_AUTO_WD_RES : 0);
if (hc->ctype == HFC_TYPE_XHFC)
hc->hw.r_bert_wd_md |= 0x40 /* V_WD_EN */;
/* init the watchdog register and reset the counter */
HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
/* enable the watchdog output for Speech-Design */
HFC_outb(hc, R_GPIO_SEL, V_GPIO_SEL7);
HFC_outb(hc, R_GPIO_EN1, V_GPIO_EN15);
HFC_outb(hc, R_GPIO_OUT1, 0);
HFC_outb(hc, R_GPIO_OUT1, V_GPIO_OUT15);
}
break;
case MISDN_CTRL_HFC_WD_RESET: /* reset the watchdog counter */
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: MISDN_CTRL_HFC_WD_RESET\n",
__func__);
HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n",
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/mISDNif.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ clear_channelmap(u_int nr, u_char *map)
#define MISDN_CTRL_HFC_RECEIVE_ON 0x4006
#define MISDN_CTRL_HFC_ECHOCAN_ON 0x4007
#define MISDN_CTRL_HFC_ECHOCAN_OFF 0x4008

#define MISDN_CTRL_HFC_WD_INIT 0x4009
#define MISDN_CTRL_HFC_WD_RESET 0x400A

/* socket options */
#define MISDN_TIME_STAMP 0x0001
Expand Down

0 comments on commit 695dc2c

Please sign in to comment.