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)),) ...@@ -88,7 +88,7 @@ ifneq ($(filter all,$(MAKECMDGOALS)),)
KBUILD_MODULES := 1 KBUILD_MODULES := 1
endif endif
export KBUILD_MODULES KBUILD_BUILTIN export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE
# Beautify output # Beautify output
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
...@@ -164,14 +164,12 @@ isdn_net_dec_frame_cnt(isdn_net_dev *idev) ...@@ -164,14 +164,12 @@ isdn_net_dec_frame_cnt(isdn_net_dev *idev)
{ {
atomic_dec(&idev->frame_cnt); atomic_dec(&idev->frame_cnt);
if (!(isdn_net_device_busy(idev))) { if (!isdn_net_device_busy(idev)) {
if (!skb_queue_empty(&idev->super_tx_queue)) { if (!skb_queue_empty(&idev->super_tx_queue))
queue_task(&idev->tqueue, &tq_immediate); tasklet_schedule(&idev->tlet);
mark_bh(IMMEDIATE_BH); else
} else {
isdn_net_dev_wake_queue(idev); isdn_net_dev_wake_queue(idev);
} }
}
} }
static inline static inline
...@@ -858,8 +856,7 @@ isdn_net_write_super(isdn_net_dev *idev, struct sk_buff *skb) ...@@ -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, // we can't grab the lock from irq context,
// so we just queue the packet // so we just queue the packet
skb_queue_tail(&idev->super_tx_queue, skb); skb_queue_tail(&idev->super_tx_queue, skb);
queue_task(&idev->tqueue, &tq_immediate); tasklet_schedule(&idev->tlet);
mark_bh(IMMEDIATE_BH);
return; return;
} }
...@@ -872,12 +869,9 @@ isdn_net_write_super(isdn_net_dev *idev, struct sk_buff *skb) ...@@ -872,12 +869,9 @@ isdn_net_write_super(isdn_net_dev *idev, struct sk_buff *skb)
spin_unlock_bh(&idev->xmit_lock); spin_unlock_bh(&idev->xmit_lock);
} }
/* static void isdn_net_tasklet(unsigned long data)
* called from tq_immediate
*/
static void isdn_net_softint(void *private)
{ {
isdn_net_dev *idev = private; isdn_net_dev *idev = (isdn_net_dev *) data;
struct sk_buff *skb; struct sk_buff *skb;
spin_lock_bh(&idev->xmit_lock); spin_lock_bh(&idev->xmit_lock);
...@@ -1594,9 +1588,7 @@ isdn_net_new(char *name, struct net_device *master) ...@@ -1594,9 +1588,7 @@ isdn_net_new(char *name, struct net_device *master)
netdev->next = netdev; netdev->next = netdev;
netdev->local.netdev = netdev; netdev->local.netdev = netdev;
netdev->tqueue.sync = 0; tasklet_init(&netdev->tlet, isdn_net_tasklet, (unsigned long) netdev);
netdev->tqueue.routine = isdn_net_softint;
netdev->tqueue.data = netdev;
spin_lock_init(&netdev->xmit_lock); spin_lock_init(&netdev->xmit_lock);
netdev->isdn_slot = -1; netdev->isdn_slot = -1;
......
...@@ -101,7 +101,7 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb) ...@@ -101,7 +101,7 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb)
#endif #endif
if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP) if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP)
tty->flip.flag_buf_ptr[len - 1] = 0xff; tty->flip.flag_buf_ptr[len - 1] = 0xff;
queue_task(&tty->flip.tqueue, &tq_timer); schedule_task(&tty->flip.tqueue);
kfree_skb(skb); kfree_skb(skb);
return 1; return 1;
} }
...@@ -153,7 +153,7 @@ isdn_tty_readmodem(void) ...@@ -153,7 +153,7 @@ isdn_tty_readmodem(void)
tty->flip.flag_buf_ptr += r; tty->flip.flag_buf_ptr += r;
tty->flip.char_buf_ptr += r; tty->flip.char_buf_ptr += r;
if (r) if (r)
queue_task(&tty->flip.tqueue, &tq_timer); schedule_task(&tty->flip.tqueue);
restore_flags(flags); restore_flags(flags);
} }
} else } else
...@@ -2498,7 +2498,7 @@ isdn_tty_at_cout(char *msg, modem_info * info) ...@@ -2498,7 +2498,7 @@ isdn_tty_at_cout(char *msg, modem_info * info)
} else { } else {
restore_flags(flags); 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 { ...@@ -399,7 +399,7 @@ typedef struct isdn_net_dev_s {
/* be transmitted asap */ /* be transmitted asap */
atomic_t frame_cnt; /* number of frames currently */ atomic_t frame_cnt; /* number of frames currently */
/* queued in HL driver */ /* queued in HL driver */
struct tq_struct tqueue; struct tasklet_struct tlet;
isdn_net_local *master; /* Ptr to Master device for slaves */ isdn_net_local *master; /* Ptr to Master device for slaves */
struct isdn_net_dev_s *slave; /* Ptr to Slave device for masters */ 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