summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/act2000/act2000_isa.c3
-rw-r--r--drivers/isdn/avmb1/b1capi.c3
-rw-r--r--drivers/isdn/hisax/arcofi.c3
-rw-r--r--drivers/isdn/hisax/asuscom.c6
-rw-r--r--drivers/isdn/hisax/diva.c6
-rw-r--r--drivers/isdn/hisax/elsa.c9
-rw-r--r--drivers/isdn/hisax/isdnl1.c3
-rw-r--r--drivers/isdn/hisax/netjet.c6
-rw-r--r--drivers/isdn/hisax/sedlbauer.c6
-rw-r--r--drivers/isdn/hisax/sportster.c6
-rw-r--r--drivers/isdn/hisax/teleint.c6
-rw-r--r--drivers/isdn/hisax/teles3c.c9
-rw-r--r--drivers/isdn/icn/icn.c18
-rw-r--r--drivers/isdn/isdn_net.c2
-rw-r--r--drivers/isdn/isdn_tty.c8
-rw-r--r--drivers/isdn/isdnloop/isdnloop.c6
-rw-r--r--drivers/isdn/sc/init.c12
-rw-r--r--drivers/isdn/sc/message.c3
18 files changed, 40 insertions, 75 deletions
diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c
index 76d2b3a6a..d19ff99e4 100644
--- a/drivers/isdn/act2000/act2000_isa.c
+++ b/drivers/isdn/act2000/act2000_isa.c
@@ -61,8 +61,7 @@ isa_delay(long t)
{
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + t;
- schedule();
+ schedule_timeout(t);
sti();
}
diff --git a/drivers/isdn/avmb1/b1capi.c b/drivers/isdn/avmb1/b1capi.c
index 648f19fc2..dbf3606f4 100644
--- a/drivers/isdn/avmb1/b1capi.c
+++ b/drivers/isdn/avmb1/b1capi.c
@@ -965,9 +965,8 @@ static int capi_manufacturer(unsigned int cmd, void *data)
while (card->cardstate != CARD_RUNNING) {
- current->timeout = jiffies + HZ / 10; /* 0.1 sec */
current->state = TASK_INTERRUPTIBLE;
- schedule();
+ schedule_timeout(HZ/10); /* 0.1 sec */
if (signal_pending(current))
return -EINTR;
diff --git a/drivers/isdn/hisax/arcofi.c b/drivers/isdn/hisax/arcofi.c
index dad1711c3..1717b3a27 100644
--- a/drivers/isdn/hisax/arcofi.c
+++ b/drivers/isdn/hisax/arcofi.c
@@ -40,8 +40,7 @@ send_arcofi(struct IsdnCardState *cs, const u_char *msg) {
while (cnt && !test_bit(HW_MON1_TX_END, &cs->HW_Flags)) {
cnt--;
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
}
restore_flags(flags);
sprintf(tmp, "arcofi tout %d", cnt);
diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c
index c84917446..6980a2888 100644
--- a/drivers/isdn/hisax/asuscom.c
+++ b/drivers/isdn/hisax/asuscom.c
@@ -201,12 +201,10 @@ reset_asuscom(struct IsdnCardState *cs)
save_flags(flags);
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
byteout(cs->hw.asus.adr, 0); /* Reset Off */
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
restore_flags(flags);
}
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
index fa3a45b72..a533272c8 100644
--- a/drivers/isdn/hisax/diva.c
+++ b/drivers/isdn/hisax/diva.c
@@ -241,13 +241,11 @@ reset_diva(struct IsdnCardState *cs)
cs->hw.diva.ctrl_reg = 0; /* Reset On */
byteout(cs->hw.diva.ctrl, cs->hw.diva.ctrl_reg);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
cs->hw.diva.ctrl_reg |= DIVA_RESET; /* Reset Off */
byteout(cs->hw.diva.ctrl, cs->hw.diva.ctrl_reg);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
if (cs->subtyp == DIVA_ISA)
cs->hw.diva.ctrl_reg |= DIVA_ISA_LED_A;
else
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
index 6a9966431..008178065 100644
--- a/drivers/isdn/hisax/elsa.c
+++ b/drivers/isdn/hisax/elsa.c
@@ -450,12 +450,10 @@ reset_elsa(struct IsdnCardState *cs)
sti();
writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_POTA2, 0x20);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_POTA2, 0x00);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_MASK, 0xc0);
schedule();
restore_flags(flags);
@@ -658,8 +656,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
} else
return(0);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (110 * HZ) / 1000; /* Timeout 110ms */
- schedule();
+ schedule_timeout((110*HZ)/1000); /* Timeout 110ms */
restore_flags(flags);
cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT;
byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c
index 8c4431b04..833a72ffd 100644
--- a/drivers/isdn/hisax/isdnl1.c
+++ b/drivers/isdn/hisax/isdnl1.c
@@ -639,8 +639,7 @@ HISAX_INITFUNC(static int init_card(struct IsdnCardState *cs))
sti();
current->state = TASK_INTERRUPTIBLE;
/* Timeout 10ms */
- current->timeout = jiffies + (10 * HZ) / 1000;
- schedule();
+ schedule_timeout((10 * HZ) / 1000);
restore_flags(flags);
printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ],
cs->irq, kstat_irqs(cs->irq));
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
index 0686598e2..54f9c14d8 100644
--- a/drivers/isdn/hisax/netjet.c
+++ b/drivers/isdn/hisax/netjet.c
@@ -971,13 +971,11 @@ reset_netjet(struct IsdnCardState *cs)
cs->hw.njet.ctrl_reg = 0xff; /* Reset On */
byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
cs->hw.njet.ctrl_reg = 0x00; /* Reset Off and status read clear */
byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (10 * HZ) / 1000; /* Timeout 10ms */
- schedule();
+ schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
restore_flags(flags);
cs->hw.njet.auxd = 0;
cs->hw.njet.dmactrl = 0;
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
index 40dc8e622..46d3edaf0 100644
--- a/drivers/isdn/hisax/sedlbauer.c
+++ b/drivers/isdn/hisax/sedlbauer.c
@@ -242,12 +242,10 @@ reset_sedlbauer(struct IsdnCardState *cs)
save_flags(flags);
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
byteout(cs->hw.sedl.reset_off, 0); /* Reset Off */
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
restore_flags(flags);
}
}
diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c
index cb867a13f..43d0641da 100644
--- a/drivers/isdn/hisax/sportster.c
+++ b/drivers/isdn/hisax/sportster.c
@@ -165,13 +165,11 @@ reset_sportster(struct IsdnCardState *cs)
save_flags(flags);
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
cs->hw.spt.res_irq &= ~SPORTSTER_RESET; /* Reset Off */
byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
restore_flags(flags);
}
diff --git a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c
index d86dd79a4..f7e38253b 100644
--- a/drivers/isdn/hisax/teleint.c
+++ b/drivers/isdn/hisax/teleint.c
@@ -246,13 +246,11 @@ reset_TeleInt(struct IsdnCardState *cs)
save_flags(flags);
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 3;
- schedule();
+ schedule_timeout(3);
cs->hw.hfc.cirm &= ~HFC_RESET;
byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.cirm); /* Reset Off */
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
restore_flags(flags);
}
diff --git a/drivers/isdn/hisax/teles3c.c b/drivers/isdn/hisax/teles3c.c
index 848c46be9..3042f7139 100644
--- a/drivers/isdn/hisax/teles3c.c
+++ b/drivers/isdn/hisax/teles3c.c
@@ -79,13 +79,11 @@ reset_t163c(struct IsdnCardState *cs)
save_flags(flags);
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 3;
- schedule();
+ schedule_timeout(3);
cs->hw.hfcD.cirm = HFCD_MEM8K;
cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm); /* Reset Off */
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
cs->hw.hfcD.cirm |= HFCD_INTB;
cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm); /* INT B */
cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CLKDEL, 0x0e);
@@ -136,8 +134,7 @@ t163c_card_msg(struct IsdnCardState *cs, int mt, void *arg)
save_flags(flags);
sti();
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + (80*HZ)/1000;
- schedule();
+ schedule_timeout((80*HZ)/1000);
cs->hw.hfcD.ctmt |= HFCD_TIM800;
cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt);
cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
index 15c767b43..fe5737344 100644
--- a/drivers/isdn/icn/icn.c
+++ b/drivers/isdn/icn/icn.c
@@ -914,8 +914,7 @@ icn_check_loader(int cardnumber)
printk(KERN_DEBUG "Loader %d TO?\n", cardnumber);
#endif
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + ICN_BOOT_TIMEOUT1;
- schedule();
+ schedule_timeout(ICN_BOOT_TIMEOUT1);
} else {
#ifdef BOOT_DEBUG
printk(KERN_DEBUG "Loader %d OK\n", cardnumber);
@@ -941,8 +940,7 @@ int slsec = sec; \
printk(KERN_DEBUG "SLEEP(%d)\n",slsec); \
while (slsec) { \
current->state = TASK_INTERRUPTIBLE; \
- current->timeout = jiffies + HZ; \
- schedule(); \
+ schedule_timeout(HZ); \
slsec--; \
} \
}
@@ -1104,8 +1102,7 @@ icn_loadproto(u_char * buffer, icn_card * card)
return -EIO;
}
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 10;
- schedule();
+ schedule_timeout(10);
}
}
writeb(0x20, &sbuf_n);
@@ -1129,8 +1126,7 @@ icn_loadproto(u_char * buffer, icn_card * card)
printk(KERN_DEBUG "Proto TO?\n");
#endif
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + ICN_BOOT_TIMEOUT1;
- schedule();
+ schedule_timeout(ICN_BOOT_TIMEOUT1);
} else {
if ((card->secondhalf) || (!card->doubleS0)) {
#ifdef BOOT_DEBUG
@@ -1425,11 +1421,9 @@ icn_command(isdn_ctrl * c, icn_card * card)
if (!card->leased) {
card->leased = 1;
while (card->ptype == ISDN_PTYPE_UNKNOWN) {
- current->timeout = jiffies + ICN_BOOT_TIMEOUT1;
- schedule();
+ schedule_timeout(ICN_BOOT_TIMEOUT1);
}
- current->timeout = jiffies + ICN_BOOT_TIMEOUT1;
- schedule();
+ schedule_timeout(ICN_BOOT_TIMEOUT1);
sprintf(cbuf, "00;FV2ON\n01;EAZ%c\n02;EAZ%c\n",
(a & 1)?'1':'C', (a & 2)?'2':'C');
i = icn_writecmd(cbuf, strlen(cbuf), 0, card);
diff --git a/drivers/isdn/isdn_net.c b/drivers/isdn/isdn_net.c
index e976d0e87..33b122c96 100644
--- a/drivers/isdn/isdn_net.c
+++ b/drivers/isdn/isdn_net.c
@@ -1042,12 +1042,14 @@ isdn_net_send_skb(struct device *ndev, isdn_net_local * lp,
if (ret == len) {
lp->transcount += len;
clear_bit(0, (void *) &(ndev->tbusy));
+ mark_bh(NET_BH);
return 0;
}
if (ret < 0) {
dev_kfree_skb(skb);
lp->stats.tx_errors++;
clear_bit(0, (void *) &(ndev->tbusy));
+ mark_bh(NET_BH);
return 0;
}
return 1;
diff --git a/drivers/isdn/isdn_tty.c b/drivers/isdn/isdn_tty.c
index fd976ff50..a37178676 100644
--- a/drivers/isdn/isdn_tty.c
+++ b/drivers/isdn/isdn_tty.c
@@ -1820,9 +1820,8 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
timeout = jiffies + HZ;
while (!(info->lsr & UART_LSR_TEMT)) {
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 20;
- schedule();
- if (jiffies > timeout)
+ schedule_timeout(20);
+ if (time_after(jiffies,timeout))
break;
}
}
@@ -1837,8 +1836,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
tty->closing = 0;
if (info->blocked_open) {
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 50;
- schedule();
+ schedule_timeout(50);
wake_up_interruptible(&info->open_wait);
}
info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE |
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index b3fabad2f..46d4f6518 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -1179,11 +1179,9 @@ isdnloop_command(isdn_ctrl * c, isdnloop_card * card)
if (!card->leased) {
card->leased = 1;
while (card->ptype == ISDN_PTYPE_UNKNOWN) {
- current->timeout = jiffies + 10;
- schedule();
+ schedule_timeout(10);
}
- current->timeout = jiffies + 10;
- schedule();
+ schedule_timeout(10);
sprintf(cbuf, "00;FV2ON\n01;EAZ1\n02;EAZ2\n");
i = isdnloop_writecmd(cbuf, strlen(cbuf), 0, card);
printk(KERN_INFO
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index d34dd03b9..788950eeb 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -165,8 +165,7 @@ int init_sc(void)
pr_debug("Doing a SAFE probe reset\n");
outb(0xFF, io[b] + RESET_OFFSET);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + milliseconds(10000);
- schedule();
+ schedule_timeout(milliseconds(10000));
}
pr_debug("RAM Base for board %d is 0x%x, %s probe\n", b, ram[b],
ram[b] == 0 ? "will" : "won't");
@@ -514,8 +513,7 @@ int identify_board(unsigned long rambase, unsigned int iobase)
*/
outb(PRI_BASEPG_VAL, pgport);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + HZ;
- schedule();
+ schedule_timeout(HZ);
sig = readl(rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%x\n", sig);
#if 0
@@ -535,8 +533,7 @@ int identify_board(unsigned long rambase, unsigned int iobase)
*/
outb(BRI_BASEPG_VAL, pgport);
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + HZ;
- schedule();
+ schedule_timeout(HZ);
sig = readl(rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%x\n", sig);
#if 0
@@ -571,8 +568,7 @@ int identify_board(unsigned long rambase, unsigned int iobase)
x = 0;
while((inb(iobase + FIFOSTAT_OFFSET) & RF_HAS_DATA) && x < 100) {
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
x++;
}
if(x == 100) {
diff --git a/drivers/isdn/sc/message.c b/drivers/isdn/sc/message.c
index 2cbdcdae8..628cdc803 100644
--- a/drivers/isdn/sc/message.c
+++ b/drivers/isdn/sc/message.c
@@ -267,8 +267,7 @@ int send_and_receive(int card,
/* wait for the response */
while (tries < timeout) {
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 1;
- schedule();
+ schedule_timeout(1);
pr_debug("SAR waiting..\n");