Commit 7b0b00eb authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: adapt to task queue changes

Use a tasklet for pushing supervisory frames down the ISDN line and
schedule_task() for flipping ttyI's buffers.
parent b2b109e8
......@@ -88,7 +88,7 @@ ifneq ($(filter all,$(MAKECMDGOALS)),)
KBUILD_MODULES := 1
endif
export KBUILD_MODULES KBUILD_BUILTIN
export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE
# Beautify output
# ---------------------------------------------------------------------------
......
......@@ -164,13 +164,11 @@ isdn_net_dec_frame_cnt(isdn_net_dev *idev)
{
atomic_dec(&idev->frame_cnt);
if (!(isdn_net_device_busy(idev))) {
if (!skb_queue_empty(&idev->super_tx_queue)) {
queue_task(&idev->tqueue, &tq_immediate);
mark_bh(IMMEDIATE_BH);
} else {
if (!isdn_net_device_busy(idev)) {
if (!skb_queue_empty(&idev->super_tx_queue))
tasklet_schedule(&idev->tlet);
else
isdn_net_dev_wake_queue(idev);
}
}
}
......@@ -858,8 +856,7 @@ isdn_net_write_super(isdn_net_dev *idev, struct sk_buff *skb)
// we can't grab the lock from irq context,
// so we just queue the packet
skb_queue_tail(&idev->super_tx_queue, skb);
queue_task(&idev->tqueue, &tq_immediate);
mark_bh(IMMEDIATE_BH);
tasklet_schedule(&idev->tlet);
return;
}
......@@ -872,12 +869,9 @@ isdn_net_write_super(isdn_net_dev *idev, struct sk_buff *skb)
spin_unlock_bh(&idev->xmit_lock);
}
/*
* called from tq_immediate
*/
static void isdn_net_softint(void *private)
static void isdn_net_tasklet(unsigned long data)
{
isdn_net_dev *idev = private;
isdn_net_dev *idev = (isdn_net_dev *) data;
struct sk_buff *skb;
spin_lock_bh(&idev->xmit_lock);
......@@ -1594,9 +1588,7 @@ isdn_net_new(char *name, struct net_device *master)
netdev->next = netdev;
netdev->local.netdev = netdev;
netdev->tqueue.sync = 0;
netdev->tqueue.routine = isdn_net_softint;
netdev->tqueue.data = netdev;
tasklet_init(&netdev->tlet, isdn_net_tasklet, (unsigned long) netdev);
spin_lock_init(&netdev->xmit_lock);
netdev->isdn_slot = -1;
......
......@@ -101,7 +101,7 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb)
#endif
if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP)
tty->flip.flag_buf_ptr[len - 1] = 0xff;
queue_task(&tty->flip.tqueue, &tq_timer);
schedule_task(&tty->flip.tqueue);
kfree_skb(skb);
return 1;
}
......@@ -153,7 +153,7 @@ isdn_tty_readmodem(void)
tty->flip.flag_buf_ptr += r;
tty->flip.char_buf_ptr += r;
if (r)
queue_task(&tty->flip.tqueue, &tq_timer);
schedule_task(&tty->flip.tqueue);
restore_flags(flags);
}
} else
......@@ -2498,7 +2498,7 @@ isdn_tty_at_cout(char *msg, modem_info * info)
} else {
restore_flags(flags);
queue_task(&tty->flip.tqueue, &tq_timer);
schedule_task(&tty->flip.tqueue);
}
}
......
......@@ -399,7 +399,7 @@ typedef struct isdn_net_dev_s {
/* be transmitted asap */
atomic_t frame_cnt; /* number of frames currently */
/* queued in HL driver */
struct tq_struct tqueue;
struct tasklet_struct tlet;
isdn_net_local *master; /* Ptr to Master device for slaves */
struct isdn_net_dev_s *slave; /* Ptr to Slave device for masters */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment